hcloud-cloud-controller-manager
hcloud-cloud-controller-manager copied to clipboard
missing prefix on k8s 1.24
Hi! First of all:
Client Version: v1.24.2
Kustomize Version: v4.5.4
Server Version: v1.24.2
As described in #80, the missing prefix hcloud://
is caused by the missing --cloud-provider=external
flag. As the README also states, though, this flag has been removed in k8s 1.24. Unfortunately, I am getting this same error on the newer version of Kubernetes. Since the flag has been removed, I am unsure on how to proceed here getting the CCM set up.
E0711 18:28:16.043416 1 node_controller.go:237] hcloud/instances.InstanceExistsByProviderID: missing prefix hcloud://
I0711 18:28:16.043429 1 util.go:63] hcloud/providerIDToServerID: make sure your cluster configured for an external cloud provider
The --cloud-provider=external
flag has not been removed for kubelet, it is only deprecated (see https://github.com/kubernetes/kubernetes/pull/110066 for some background).
I have the same issue. I can confirm that --cloud-provider=external
flag has been added at kubeadm init stage.
Any ideas anyone?
Cluster version is 1.24.3.
OK, I think the reason for this is because the --cloud-provider=external
flag is being set by the systemd drop-in as per the instructions, however is being unset by the following file: /etc/sysconfig/kubelet
.
I've done the following:
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
systemctl enable --now kubelet
systemctl enable --now containerd
systemctl enable --now docker
cat > /etc/sysconfig/kubelet <<EOF
KUBELET_EXTRA_ARGS=--cloud-provider=external
EOF
systemctl restart kubelet
Don't forget to do this on both the leaders and all workers otherwise it will cause errors.
My issues are now gone.
@cschmatzler https://github.com/nicholaspearson/hcloud-kubernetes-terraform
Your welcome :)
This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.