Category: Data, Kubernetes

In Kubernetes, we deploy all kinds of Pods which can be concerned with backend, front-end, and external data sources These logical sets of Pods are exposed to the external world to be discovered by Kubernetes services.

In Kubernetes, a Service is an abstraction that defines a logical set of Pods and a policy by which to access them, this kind of patterns is also sometimes called a micro-service.

So in order to make our mobile app talk to the backend pod, Kubernetes has a service module that is exposed to the outer world and is listening to the node port 30038.

Kubernetes service of type NodePort, which exposes the application pod on a port across each of our cluster nodes, It is a kind of open port available on every Kubernetes nodes of the cluster and it is responsible to route all the inbound traffic towards the service lying inside the nodes.

Well if you carefully examine you will see that there is no mentioning of which pod to map the target port to, our service has not been allocated which pod to connect to on the given target port, so in order to enable it, let’s write a simple pod file below and map it with service-demo.yaml, file

Related Articles