Extend usage of ControlPlaneEndpoint for HA #726
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/active
Indicates that an issue or PR is actively being worked on by a contributor.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone
The goal of this issue is to discuss possible changes to the current implementation of ControlPlaneEndpoint that will facilitate the implementation of HA in kubeadm
/cc @timothysc @stevesloka @mattkelly @mattkelly @mbert @JamieH
Background
Issue #411 and related PR kubernetes/kubernetes#59288 introduced a new configuration entry named
API.ControlPlaneEndpoint
. This entry allows to specify a DNS name that should be used for composing the API server address that kubeadm embeds in several components - scheduler.conf, controller-manager.conf, admin.conf + kubelet.conf, kube-proxy configMap, kubadm-public configMap (used for discovery/TLS bootstrap).The kube-apiserver manifest instead continues to use the
API.AdvertiseAddress
entry.This issue focuses on the possibility to use the
API.ControlPlaneEndpoint
to explicitly declare the load balancer address in an HA scenario.User Stories
User story 1. Single node cluster, upgradable to HA
A user creates an initial master node with
kubeadm init
passing the following advanced configuration options in the master configuration file :API.ControlPlaneEndpoint
entryAPI.etcd
entryThe resulting single master cluster could be upgraded to HA at any time by joining additional master nodes using
kubeadm join —master
.New master nodes will join the cluster and advertise their-self with their own advertise address, that is the IP of the default network interface if not otherwise specified using the
kubeadm join --master --advertise-address
flag.User story 2. Single node cluster, not upgradable to HA
If a user creates an initial master node without setting the
API.controlPlaneEndpoint
address or without declaring an etcd cluster via theAPI.etcd
entry , the cluster can't be upgraded to HA andkubeadm join —master
will return an error.How this will work?
When joining a new master node we will generate a dedicates API server certificate configured for serving request addressed to the ControlPlaneEndpoint and to the advertise-address of the specific node only.
The existence of many different API server certificates is considered an acceptable trade-off for supporting the desired
kubeadm join --master
dynamic workflow.Proposed changes
--advertise-address
for the joining master node and adapting the flow to the condition described above (API.controlPlaneEndpoint
andAPI.etcd
entry must be set).Open points to be addressed
Self hosting with certificates stored in secrets doesn't allow to have different API server certificates for each master nodes.
As a tactical solution, in case of self hosting with certificates stored in secrets , we will allow
kubeadm join --master
only in case of the joining master node hasadvertise-address
equal toControlPlaneEndpoint
address, and thus the existing certificate can be used without changes.As a long term solution, we will implement a logic that creates a unique certificate with all the advertise addresses (existing masters + joining master), and replaces the existing API server certificate with the new one.
The text was updated successfully, but these errors were encountered: