Inquiring pod and service subnets from inside Kubernetes cluster
问题 How can one inquire the Kubernetes pod and service subnets in use (e.g. 10.244.0.0/16 and 10.96.0.0/12 respectively) from inside a Kubernetes cluster in a portable and simple way? For instance, kubectl get cm -n kube-system kubeadm-config -o yaml reports podSubnet and serviceSubnet . But this is not fully portable because a cluster may have been set up by another means than kubeadm . kubectl get cm -n kube-system kube-proxy -o yaml reports clusterCIDR (i.e. pod subnet) and kubectl get pod -n