Kubernetes Services

Ishan Liyanage
4 min readFeb 15, 2021

Kubernetes services enable communication between various components within and outside of the application. Kubernetes services helps us connect applications together with other applications or users. Lets assume our application has groups of pods running various sections such as a group for serving our front end load to users and other group for running back end processes. Then third group connecting to an external data source.

It is services that enable connectivity between these groups of pods. Services enable the front end application to be made available to end users. It helps communication between back end and front end pods and helps in establishing connectivity to an external data source.

Services enable loose coupling between micro services in the application

Lets further discuss one use case of services. We deployed our pod having a web application running on it. How do external users access the web page?

The Kubernetes node has an IP address and that is and the host machine is on the same network. It has an IP address The internal pod network is in and the POD has an IP .

Clearly we can not ping or access the pod at address as its in a separate network.

So what are the options to see the web page? First if we were to ssh in to the kubernetes node at Then from the node, we would be able to access the pods web page by doing a curl or if the node has a GUI, we would crack open a web browser and access the web page ( This is from inside the kubernetes node and this is not what we need.

We want to access the web server from externally without having to ssh in to the node and simply by accessing the IP of the kubernetes node. We need something in middle to help us map request to the node from our laptop through the node to the pod running the web container.

This is where the Kubernetes Services comes in to play.

The Kubernetes service is an object just like pods, replica sets or deployments. One of its use case is to listen to a port on the node and forward request on that port to a pod running the web application. This type…

Ishan Liyanage

Passionate Technical Lead, Senior Software Developer and free and open source software advocate. Based in Singapore.