What does the colon mean in the list of ports when running kubectl get services

9/13/2019

If I run kubectl get services for a simple demo service I get the following response:

NAME           TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
demo-service   LoadBalancer   10.104.48.115   <pending>     80:32264/TCP   18m

What does the : mean in the port list?

-- tophatsteve
kubectl
kubernetes

3 Answers

9/13/2019

External access to the demo-service will happen via port 32264, which connects to port 80 on the docker container.

-- Blokje5
Source: StackOverflow

9/13/2019

This means that your service demo-service can be reached on port 80 from other containers and on the NodePort 32264 from the "outer" world.

In this particular case it will be accessed by Load Balancer which is provisioned/managed by some sort of Kubernetes controller.

-- Stepan Vrany
Source: StackOverflow

9/13/2019

Meaning 80:32264/TCP this is,

You have demo-service and it is pointing 80 port to your pod and 32264/TCP means you can use NodeIP for accessing the application which is running in pod from external network (outside of cluster). And the : will separate these ports for your understanding which is external and internal port for accessing pod.

-- Sachin Arote
Source: StackOverflow