Deploying the security configurations
The following instructions will deploy the cluster's Ansible playbook, and it will deploy the security add-ons and configuration to the cluster:
- Initialize the Terraform state and select the workspace by running the following commands:
$ cd terraform/packtclusters $ terraform workspace select prod1
- Retrieve and configure
kubeconfig
for the target cluster:$ aws eks --region $(terraform output aws_region) update-kubeconfig --name $(terraform output cluster_full_name)
- Execute the Ansible playbook:
$ source ~/ansible/bin/activate $ ansible-playbook -i \ ../../ansible/inventories/packtclusters/ \ -e "worker_iam_role_arn=$(terraform output worker_iam_role_arn) \ cluster_name=$(terraform output cluster_full_name) aws_default_region=$(terraform output aws_region)" \ ../../ansible/cluster.yaml
- You will get the following output following successful Ansible execution:
- Execute...