On Master and Worker nodes:
- Add to
/etc/sysconfig/kubelet
KUBELET_EXTRA_ARGS="--cloud-provider=external"
- Restart kubelet service
systemctl restart kubelet
On Master node:
-
Update and copy
cloud-config
to/etc/kubernetes/cloud-config
-
Add
"- --cloud-provider=external"
to configuration to:
/etc/kubernetes/manifests/kube-apiserver.yaml
/etc/kubernetes/manifests/kube-controller-manager.yaml
- Restart kubelet service
systemctl restart kubelet
-
Copy manifests folder on Master node:
-
Create
cloud-config
secret
export CLOUD_CONFIG=/etc/kubernetes/cloud-config
kubectl create secret -n kube-system generic cloud-config --from-literal=cloud.conf="$(cat $CLOUD_CONFIG)" --dry-run -o yaml > manifests/cloud-config-secret.yaml
kubectl apply -f manifests/cloud-config-secret.yaml
- Create RBAC for cloud-controller-manager
kubectl apply -f manifests/rbac/cloud-controller-manager-roles.yaml
kubectl apply -f manifests/rbac/cloud-controller-manager-role-bindings.yaml
- Check logs of cloud-controller-manager
kubectl logs -n kube-system cloud-controller-manager
- Deploy demo examples