How to find cluster and CIDR service of Kubernetes cluster?

How do you discover the CIDR of a cluster / service for a Kubernetes cluster as soon as it is already running?

I know Minikube, it's 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 about the shared Kubernetes cluster, especially through kubectl?

+4
source share
2 answers

Have you checked if the following command contains the necessary information?

kubectl cluster-info dump

+2
source

I still can not leave a comment, but I would answer what I found.

For minikube, it looks like CIDR could change, especially for me. I found CIDR in the .minikube directory in

.minikube \ Profiles \ minikube

For windows, you can find that:

C:\Users\_ \.minikube\Profiles\minikube

linux mac , ~/.minikube.

config.json, json- "KubernetesConfig": {} : ServiceCIDR. CIDR .

, kubectl, CIDR, , , / .

0

Source: https://habr.com/ru/post/1677943/


All Articles