hcloud-cloud-controller-manager
hcloud-cloud-controller-manager copied to clipboard
How to properly set up Environment="KUBELET_EXTRA_ARGS=--cloud-provider=external" in K3S
I have the following set up for the control planes:
The first etcd server:
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--kubelet-arg=cloud-provider=external --node-name=$(hostname -f) --disable=traefik --disable=servicelb --disable-cloud-controller --prefer-bundled-bin --cluster-init --node-ip=$INTERNAL_IP --tls-san $PUBLIC_IP" sh -s - server
And the following when joining additional servers
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--kubelet-arg=cloud-provider=external --node-name=$(hostname -f) --disable=traefik --disable=servicelb --disable-cloud-controller --prefer-bundled-bin --node-ip=$INTERNAL_IP --server https://$FIRST_SERVER_IP:6443 --tls-san $PUBLIC_IP" K3S_TOKEN=$FIRST_SERVER_JOIN_SECRET sh -s - server
And here is the equivalent script when joining worker nodes to the cluster:
export K3S_NODE_NAME=$(hostname -f)
export K3S_KUBELET_EXTRA_ARGS="--cloud-provider=external"
curl -sfL https://get.k3s.io | K3S_TOKEN=$FIRST_SERVER_JOIN_SECRET sh -s - agent --server https://$FIRST_SERVER_IP:6443
I just want to be sure if this way of setting the cloud provider external flag is correct in k3s?