cluster-api: kubeadm bootstrap provider does not take into account Cluster APIServerPort
What steps did you take and what happened:
- Create a cluster with a non-default value for
cluster.Spec.ClusterNetwork.APIServerPort(e.g. 6444 instead of 6443) - Create a controller Node using the kubeadm bootstrap provider
- The generated cloud-init ignores the
APIServerPortsetting and uses the default 6443 (or whatever is specified in the controllerKubeadmConfig).
What did you expect to happen:
For the specified apiServer port to be used.
Anything else you would like to add:
I am not sure this is a bug, just seems like strange behaviour - as an infrastructure provider I would need to parse the resulting cloud-init or otherwise to work out which port to forward connections to or health check, so I would expect the kubeadm bootstrap provider to override the default or whatever is configured in the KubeadmConfig with the value given by the cluster.
Environment:
- Cluster-api version: 0.2.8
- kubeadm bootstrap provider version: 0.1.5
- Minikube/KIND version: None (using kubernetes infrastructure provider on GKE)
- Kubernetes version: (use
kubectl version): 1.16.3 - OS (e.g. from
/etc/os-release): Container Optimised Linux for GKE cluster (kind images for cluster-api Nodes)
/kind bug
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 26 (23 by maintainers)
This should also take into account the
spec.livenessProbe.portfield as well. It defaults to6443and if you changeAPIServerPortyou need to ensurespec.livenessProbe.portis updated as well or your container will just get endlessly rebooted.In fact, I just hit this bug and have had to resort to the hackiest of hacks to fix this:
We should probably take a closer look at this after the holidays. /cc @ncdc @vincepri