How do you find the cluster/service CIDR for a Kubernetes cluster, once it is already running?
I know for Minikube, it is 10.0.0.1/24.
For GKE, you can find out via
gcloud container clusters describe XXXXXXX --zone=XXXXXX | grep -e clusterIpv4Cidr -e servicesIpv4Cidr
But how do you find out on a generic Kubernetes cluster, particularly via kubectl
?
Cluster values automatically create groups with similar values using a fuzzy matching algorithm, and then maps each column's value to the best-matched group.
The definition of a cluster is a group of people or things gathered or growing together. A bunch of grapes is an example of a cluster. A bouquet of flowers is an example of a cluster. noun.
Get Services IPs range
kubectl cluster-info dump | grep -m 1 service-cluster-ip-range
You will see something like e.g. --service-cluster-ip-range=xxx.yy.0.0/13
Get Pods IPs range
kubectl cluster-info dump | grep -m 1 cluster-cidr
You will see something like e.g. --cluster-cidr=xxx.yy.0.0/11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With