Home > Net >  Is "service" type kubernetes object a Pod container?
Is "service" type kubernetes object a Pod container?

Time:10-05

Service abstract Pod IP address from consumers, load balances between pods, relies on labels to associate a service with a Pod, holds virtual IP provided by Node's kube-proxy, non-ephemeral

Given below services:

$ kubectl -n mynamespace get services | more
NAME         TYPE          CLUSTER-IP        EXTERNAL-IP   PORT(S)                                          AGE
my-app1     NodePort   192.168.112.249   <none>            80:32082/TCP,2121:30581/TCP   50d
my-app2    NodePort   192.168.113.154   <none>             80:30704/TCP,2121:30822/TCP   50d
my-app3    NodePort   192.168.114.232   <none>            80:32541/TCP,2121:32733/TCP   5d2h
my-app4    NodePort   192.168.115.182    <none>             80:30231/TCP,2121:30992/TCP   5d2h

Is "service" type kubernetes object launched as a separate Pod container in data plane?

CodePudding user response:

Is "service" type kubernetes object launched as a separate Pod container in data plane?

Nope, a Service is an abstract resource in Kubernetes.

From the Service documentation:

An abstract way to expose an application running on a set of Pods as a network service. With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.

  • Related