gentle-spring-91845
05/05/2023, 8:19 AMkubectl cluster-info
Kubernetes control plane is running at <https://10.155.10.115:6443>
CoreDNS is running at <https://10.155.10.115:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy>
It seems that my installation is not in HA (high availability). In fact, if I turn off the node 10.155.10.115 and run "kubectl" with a profile that points to the Rancher server, I am unable to query the cluster.
I would like to modify this installation by defining a load-balanced hostname instead of an IP address. How can I do this? I imagine there is a parameter to define in the RKE configuration file. If so, which one?sparse-fireman-14239
05/05/2023, 12:20 PMhundreds-evening-84071
05/05/2023, 1:31 PMgentle-spring-91845
05/06/2023, 2:29 PMkubectl cluster-info
Kubernetes control plane is running at <https://10.155.10.115:6443>
CoreDNS is running at <https://10.155.10.115:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy>
I obtained the URL with an IP instead of a name. In reality, this happened because I was running the kubectl command with the kubeconfig that is generated during cluster creation by RKE. If I create a user in Rancher and use the kubeconfig with its YAML, the kubectl cluster-info command returns:
kubectl cluster-info
Kubernetes control plane is running at <https://rancher.acme.it/k8s/clusters/c-m-hc7zczql>
I have also verified that using this kubeconfig and turning off the .115 control plane, everything continues to work perfectly. In practice, Rancher determines which control plane is active through its agents, but in reality, only one is active at a time. In fact, we are talking about HA (High Availability) configuration, which does not necessarily imply that both control planes must be active, although, in fact, all of them are usable in writing (there is no active and passive). There are some more advanced configurations that allow, by putting a load balancer in front of the control planes, to exploit both nodes in writing, also having, in addition to HA, a load distribution.