为什么我的Kubernetes集群中有两个IP地址类别?
kubectl describe svc cara
Name: cara
Namespace: default
Labels: app=cara
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"cara"},"name":"cara","namespace":"default"},"spec":{"por...
Selector: app=cara
Type: NodePort
IP: 10.100.35.240
Port: cara 8000/TCP
TargetPort: cara/TCP
NodePort: cara 31614/TCP
Endpoints: 192.168.41.137:8000,192.168.50.89:8000
Port: vrde 6666/TCP
TargetPort: vrde/TCP
NodePort: vrde 30666/TCP
Endpoints: 192.168.41.137:6666,192.168.50.89:6666
Port: rdp 3389/TCP
TargetPort: rdp/TCP
NodePort: rdp 31490/TCP
Endpoints: 192.168.41.137:3389,192.168.50.89:3389
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
在完成主安装后,我做了:
kubeadm init --v=0 --pod-network-cidr=192.167.0.0/16
kubectl apply --v=0 -f https://docs.projectcalico.org/v3.6/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml
我希望群集网络中有一个IP地址范围。我误会了吗?
答案 0 :(得分:2)
Kubernetes集群中有两个主要的CIDR-Pod网络和服务网络。看来您的群集具有Pod网络192.168.0.0/16和服务网络10.0.0.0/8。