Port definitions in Pods have names, and you can reference these names in thetargetPort attribute of a Service. For example, we can bind the targetPortof the Service to the Pod port in the following way:
Port definitions in Pods have names, and you can reference these names in thetargetPort attribute of a Service. For example, we can bind the targetPortof the Service to the Pod port in the following way: