如何查看k8s里的网段
1.获取k8s中pod的网段
[root@host134 ingress-demo]# kubectl get configmap kubeadm-config -n kube-system -o yaml | grep podSubnet
podSubnet: 10.244.0.0/16
2.获取svc网段
[root@host134 nfs]# kubectl -n kube-system get cm kubeadm-config -o yaml | grep serviceSubnet
serviceSubnet: 10.1.0.0/16
3.node网段
[root@host134 nfs]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
host113 Ready <none> 27d v1.24.17 192.168.1.113 <none> CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 containerd://1.6.33
host134 Ready control-plane 27d v1.24.17 192.168.1.134 <none> CentOS Linux 7 (Core) 3.10.0-862.el7.x86_64 containerd://1.6.33
host135 Ready <none> 27d v1.24.17 192.168.1.135 <none> CentOS Linux 7 (Core) 3.10.0-1160.24.1.el7.x86_64 containerd://1.6.33
4.NodePort 范围
默认:30000-32767
浙公网安备 33010602011771号