<p>I deployed a service <code>myservice</code> to the k8s cluster. Using <code>kubectl describe serivce ...</code>, I can find that the service ip is <code>172.20.127.114</code>  I am trying to figure out how this service ip is assigned. Is it assigned by K8s controller and stored in DNS?  How does K8S control decide on the IP range?</p>
<pre><code>kubectl describe service myservice                                     

Name:              myservice
Namespace:         default
Labels:            app=myservice
                   app.kubernetes.io/instance=myservice
Annotations:       argocd.argoproj.io/sync-wave: 3
Selector:          app=myservice
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                172.20.127.114
IPs:               172.20.127.114
Port:              &lt;unset&gt;  80/TCP
TargetPort:        5000/TCP
Endpoints:         10.34.188.30:5000,10.34.89.157:5000
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

yuyang
<p>kuebernetes controller accepts service CIDR range using service-cluster-ip-range parameter. Service IP is assigned from this CIDR block.</p>
<p><a href="https://i.stack.imgur.com/Q6QAP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q6QAP.png" alt="enter image description here" /></a></p>
<p>The kubernetes controller pod name might vary in each environment. update the pod name accordingly</p>
