Find the cluster CIDR for service IP allocations in kuberneted

12/12/2018

How can I find what IP block is used by the api-service (or whatever other component is responsible) to dole out the service IPs, from a live cluster.

We use a self managed Kubernetes cluster deployed on AWS using terraform. The networking is managed by Calico. However from what I have read it seems like calico is only responsible for the pod and container IPs.

-- nitimalh
kubernetes
networking
service

2 Answers

12/12/2018

This is a variable passed to your kube-apiserver at initial runtime, for example:

--service-cluster-ip-range=10.3.0.0/20

-- N. Alston
Source: StackOverflow

12/13/2018

You can run below command, and in the output you will find your cluster ip range like --service-cluster-ip-range=x.x.x.x/x

kubectl cluster-info dump  | grep --color service-cluster-ip-range
-- coolinuxoid
Source: StackOverflow