5.1.2 Accessing Prod Infrastructure
- Let's now access the application from the browser and CLI
๐๏ธ Viewing the Applicationโ
The application once deployed, can be accessed at https://prod.yourdomain.com
๐ Open AWS Credentials Fileโ
- Open the aws credentials file using the below command.
nano ~/.aws/credentials
โ๏ธ Configure AWS Credentials Fileโ
Add the below lines of code into the file as we need to assume the specific role to access the prod account.
[terraform-prod]
role_arn = arn:aws:iam::<prod-account-id>:role/Administrator
source_profile = admin
๐ Accessing Kubernetes from CLIโ
Using the below commands we can now access the kubernetes using kubectl
export AWS_PROFILE=terraform-prod
aws eks --region us-west-1 update-kubeconfig --name s4cp-us-west-1-prod
kubectl get pods -n s4cp