Kubernetes – what does mean in port in a service?

Port unset means: You didn’t specify a name in service creation.

Service Yaml excerpt (note name: grpc):

  - port: 26257
    targetPort: 26257
    name: grpc
  type: NodePort

kubectl describe services servicename output excerpt:

Type:                   NodePort
Port:                   grpc    26257/TCP
NodePort:               grpc    31045/TCP
Endpoints:    ,,

Port is definition of container ports that service will send the traffic on (Actual Endpoint).

Leave a Comment