Deploying the cluster's network services
The following instructions will deploy the Ansible playbook and configure your cluster with the networking services and add-ons configuration:
- Initialize the Terraform state and select the workspace by running the following commands:
$ cd terraform/packtclusters $ terraform init $ terraform workspace select prod1
- Execute Terraform to apply the infrastructure we added in this chapter – the IAM policy and the policy attachment for ExternalDNS:
$ terraform apply -auto-approve
Then you should get the following output:
Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Releasing state lock. This may take a few moments...
- Retrieve and configure
kubeconfig
for the target cluster:$ aws eks --region $(terraform output aws_region) update-kubeconfig --name $(terraform output cluster_full_name)
- Create
virtualenv
to install and execute Ansible:$ virtualenv $HOME/Ansible-k8s-workspace $ source $HOME/Ansible-k8s-workspace...