how to create kubeadm init with only hostname/DNS name so if we dont have to worry to change ip later
YZPAWE opened this issue · 2 comments
k8s api server does not allow dns names and only allowes ips. in general if you want to setup your k8s control plane nodes they must use fixed ips. changing the ips is very difficult and unsupported by k8s components without manual interactions.
you can however ensure worker nodes always connect to the control plane by using a dns name and a load balancer.
see
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#considerations-about-apiserver-advertise-address-and-controlplaneendpoint
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ha-topology/
https://github.com/kubernetes/kubeadm/blob/main/docs/ha-considerations.md
/kind support
k8s api server does not allow dns names and only allowes ips. in general if you want to setup your k8s control plane nodes they must use fixed ips. changing the ips is very difficult and unsupported by k8s components without manual interactions.
you can however ensure worker nodes always connect to the control plane by using a dns name and a load balancer.
see https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#considerations-about-apiserver-advertise-address-and-controlplaneendpoint https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/ha-topology/ https://github.com/kubernetes/kubeadm/blob/main/docs/ha-considerations.md
/kind support
thanks your reply