gentle-spring-9184505/05/2023, 8:19 AM
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?
kubectl 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>
sparse-fireman-1423905/05/2023, 12:20 PM
hundreds-evening-8407105/05/2023, 1:31 PM
gentle-spring-9184505/06/2023, 2:29 PM
Kubernetes control plane is running at <https://10.155.10.115:6443>
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:
CoreDNS is running at <https://10.155.10.115:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy>
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.
Kubernetes control plane is running at <https://rancher.acme.it/k8s/clusters/c-m-hc7zczql>