Services
Services The only valid port is is port which is the port of the service. because if you do not set the Target Port if is subsituted to the port value of the service and if you do not define a nodePort it will assign a available port with in the range of the 30000 - 32767 There is nothing in the definition file that connect the service to the Pod. We have specified the Target Port , but we haven't specified Target Port in which Pod. There could be hundreds of other pods with webservices running on port 80 we use selectors and labels to do that we know that Pod was created using labels. Pull the labels from the Pod definition file under the selector section. This links the service to the Pod. once done kubectl create -f service-definition.yml The curl command has the IP Address of the node and followed by the host port number . So far we talked about a service mapped to a single Pod, But that is not the case all the time. what if we have multiple pods . It uses a rand...