Managing your AWS Kubernetes Cluster from the Command Line
Set up AWS Okta configuration
Next, you’ll need to set up your AWS okta configuration for your profile. Your Okta administrator will need to provision you with the AWS App Embed URL from the General tab of the AWS application in your Okta org.
You’ll navigate to ~/.aws/config, to set the aws_saml_url. Your Okta admin also should provision you with a profile. Your configuration in ~/.aws/config should end up looking like:
role_arn = arn:aws:iam::557625315111:role/Allcode-Admin
getting creds via SAML: Okta credentials are not in your keyring. Please make sure you have added okta credentials with `aws-okta add`
Alternatively, you can setup bash scripts. Remember the alias cannot be referenced in bash scripts. Below is an example of the contents of a bash script entitled get_pods.sh to get all of the available pods:
Leveraging your pods
Once you have the list of pods, you can then perform a number of operations from the command line directly against the pod using kubectl.
In certain situations, we will want to use the labels from the yaml spec, to get details on the pod. To learn more about a specific pod, I’ll write a little script entitled describe_backend.sh, which will give me all of the details on a specific pod: