Skip to main content

5.1.2 Accessing Prod Infrastructure

Youtube ๐Ÿ“บ

  • 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