• Ensure you have access to EKS. This is done by adding your IAM to the EKS in the terraform configuration.

  • Login to the Bastion if the API Key is setup for private access

  • Get the credentials

    KUBECONFIG=./kubeconfig aws --profile=account eks update-kubeconfig --cluster cluster-name

  • There can be multiple clusters so pick the correct cluster.

  • Ensure that you set export KUBECONFIG=./kubeconfig to get the correct KUBECONFIG file. This can be added into you .bashrc or .zshrc

List Running Pods

kubectl get pods --all-namespaces

Kubernetes lets you divide your cluster into namespaces. Each namespace can have its own set of resources. The above command lists all running pods on every cluster. Pods in the kube-system namespace belong to Kubernetes and helps it function.


To connect to the application look at the namespaces:

kubectl get pods --all-namespaces
kubectl exec -it -n <namespace> <pod> -c <container> -- bash


kubectl get pods --all-namespaces
kubectl logs -f -n <namespace> <pod> -c <container>

This lets you view the logs of the running pod. The container running on the pod should be configured to output logs to STDOUT/STDERR.

Describe Pods

Troubleshooting Pods

kubectl describe pods

Common Errors:

  • OOMError
  • CrashLoopBackup
  • ImageNotFound