Kubernetes: How to configure hostnetwork pod IP address?
A helpful note for configuring node-ip
to be passed on to kubelet via kubeadm config file:according to https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1 and some experimentation, it should be under kubeletExtraArgs
of the nodeRegistration
section (example using IP from your config file):
apiVersion: kubeadm.k8s.io/v1beta2kind: InitConfigurationnodeRegistration: kubeletExtraArgs: node-ip: 2001:420:293:242d:250:56ff:feaf:1d25
You can configure this behavior using kubeadm config. Have you tried using --pod-network-cidr string
. More details in official documents https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-config/