-
Add argument cloud-provider: "external" to apiServer, controllerManager and kubelet
-
Add "kubernetes.io/cluster/kubernetes" = "owned" tags to control nodes, worker nodes, subnets, security groups
-
Add "kubernetes.io/role/elb" = 1 to Public (Internet-facing) subnets
-
Add "kubernetes.io/role/internal-elb" = 1 to private subnets
-
attach aws required control-plane role/policy
-
attach aws required node role/policy
-
arguments to aws cloud-controller-manager daemon-set:
--cluster-cidr=10.244.0.0/16
--allocate-node-cidrs=true
--configure-cloud-routes=false
- Add AWS credentials in .aws_credentials/
terraform init
terraform plan
terraform apply
ansible-playbook -i ./ansible/inventory.yaml ./ansible/playbook.yaml
If the cloud controller manager isn’t started with --configure-cloud-routes: "false", then the route tables also needed to be tagged like the subnets.
##Install the aws cloud-controller-manager with Helm.
helm repo add aws-cloud-controller-manager https://kubernetes.github.io/cloud-provider-aws
helm repo update
Helm 3
helm upgrade --install aws-cloud-controller-manager aws-cloud-controller-manager/aws-cloud-controller-manager
Helm 3
helm uninstall [RELEASE_NAME]
Helm 3
helm upgrade [RELEASE_NAME] cloud-provider-aws/charts/aws-cloud-controller-manager [flags]
or download manifests and adjust values such as image version
helm template aws-cloud-controller-manager aws-cloud-controller-manager/aws-cloud-controller-manager --output-dir /home/user/aws_ccm
reference: https://github.com/kubernetes/cloud-provider-aws/tree/master/charts/aws-cloud-controller-manager https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#cloud-controller-manager https://blog.scottlowe.org/2021/10/12/using-the-external-aws-cloud-provider-for-kubernetes/