Search code examples
network-programmingservicekubernetes

Find the cluster CIDR for service IP allocations in Kubernetes


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.


Solution

  • 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