如何提供 2 个不同的 IP 范围? --pod-network-cidr= 用于多个 IP 范围
How to provide for 2 different IP ranges? --pod-network-cidr= for multiple IP ranges
我在同一网络中有 2 个不同的 IP 集。我的 kubeadm 与我的其他节点位于不同的 IP 范围内。我该如何设置这里的属性:kubeadm init --pod-network-cidr=
cat /etc/hosts
#kubernetes slaves ebdp-ch2-d587p.sys.***.net 172.26.0.194, ebdp-ch2-d588p.sys.***.net 172.26.0.195
10.248.43.214 kubemaster
172.26.0.194 kube2
172.26.0.195 kube3
--pod-network-cidr
用于 kubernetes 将管理的 pods 的 IP。与集群节点无关
对于节点,要求是(from Kubernetes doc):
Full network connectivity between all machines in the cluster (public
or private network is fine)
除了@Yavuz Sert 回答之外,--pod-network-cidr
标志标识容器网络接口(CNI) IP pool for Pods communication purpose within a Kubernetes cluster. You have to choose some separate IP subnet for Pod networking, it has to be different against your current given network sets. Since --pod-network-cidr
has successfully applied kube-proxy 反映 Pod IP 子网并通过集群覆盖网络为 Pods 之间的网络通信添加适当的路由. 事实上你可以找到 clusterCIDR
标志与 kube-proxy configmap 对应 --pod-network-cidr
.
我在同一网络中有 2 个不同的 IP 集。我的 kubeadm 与我的其他节点位于不同的 IP 范围内。我该如何设置这里的属性:kubeadm init --pod-network-cidr=
cat /etc/hosts
#kubernetes slaves ebdp-ch2-d587p.sys.***.net 172.26.0.194, ebdp-ch2-d588p.sys.***.net 172.26.0.195
10.248.43.214 kubemaster
172.26.0.194 kube2
172.26.0.195 kube3
--pod-network-cidr
用于 kubernetes 将管理的 pods 的 IP。与集群节点无关
对于节点,要求是(from Kubernetes doc):
Full network connectivity between all machines in the cluster (public or private network is fine)
除了@Yavuz Sert 回答之外,--pod-network-cidr
标志标识容器网络接口(CNI) IP pool for Pods communication purpose within a Kubernetes cluster. You have to choose some separate IP subnet for Pod networking, it has to be different against your current given network sets. Since --pod-network-cidr
has successfully applied kube-proxy 反映 Pod IP 子网并通过集群覆盖网络为 Pods 之间的网络通信添加适当的路由. 事实上你可以找到 clusterCIDR
标志与 kube-proxy configmap 对应 --pod-network-cidr
.