Kubernetes - what does <unset> mean in a port in a service?
I have a service open with type = LoadBalancer, and when I do
kubectl describe services servicename ,
I get this output:
Name: ser1 Namespace: default Labels: app=online1 Selector: app=online1 Type: LoadBalancer IP: 10.0.0.32 External IPs: 192.168.99.100 Port: <unset> 8080/TCP NodePort: <unset> 30545/TCP Endpoints: 172.17.0.10:8080,172.17.0.11:8080,172.17.0.8:8080 + 1 more... Session Affinity: None Can anyone address the following doubts:
1.) I cannot understand what <unset> means in Port and NodePort. Also, how does this affect my service?
2.) When I want to get into the service, I hit the service using <external-ip:NodePort> correctly? Then what port use?
+7
Tarun
source share1 answer
Port unset means: you did not specify a name in the service creation.
Extract Yaml (note name: grpc ):
spec: ports: - port: 26257 targetPort: 26257 name: grpc type: NodePort kubectl describe services servicename output:
Type: NodePort IP: 10.101.87.248 Port: grpc 26257/TCP NodePort: grpc 31045/TCP Endpoints: 10.20.12.71:26257,10.20.12.73:26257,10.20.8.81:26257 Port is the definition of the container ports that the service will send traffic (Actual Endpoint).
+7
Farhad farahi
source share