I am using the master branch of KubeSpray. I use Terraform to provision AWS resources using the scripts in contrib/terraform/aws. However, the aws_cloud_provider is not enabled by default.

The cloud document says to use cloud-provider=aws in the ansible playbook command to run the cluster.yaml playbook is executed. However, I have also seen documentation that says cloud-provider should be set to external.

What is the best method to set cloud-provider given that the cluster will be run on AWS?

1 Answer 1


I have two answers to this question.

one - add the cloud-provider option to your ansible-playbook command as shown below.

ansible-playbook \
  -vvvvv \
  -i ./inventory/hosts \
  ./cluster.yml \
  -e ansible_user=centos \
  -e cloud_provider=aws \
  -e bootstrap_os=centos \
  --become \
  --become-user=root \
  --flush-cache \
  -e ansible_ssh_private_key_file=$PKI_PRIVATE_PEM \
  | tee kubespray-cluster-$(date "+%Y-%m-%d_%H:%M").log


Uncomment the cloud_provider option in group_vars/all.yml and set it to 'aws'


I've tried the first answer. The proof is that the AWS ELB moves out of the pending status.

$ kubectl -n ingress-nginx get svc
NAME                                 TYPE           CLUSTER-IP      EXTERNAL-IP                                                                     PORT(S)                      AGE
ingress-nginx-controller             LoadBalancer   aa....amazonaws.com   80:32111/TCP,443:31854/TCP   109s
ingress-nginx-controller-admission   ClusterIP   <none>                                                                          443/TCP                      109s

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .