The purpose of the eks-kubectl
repo is to create a docker container for kubctl to manage k8s clusters in EKS for multiple environments.
Amazon Install kubectl documentation
Amazon Install eksctl documentation
Amazon Install AWS CLI documentation
- Navigate to the
amd64
orarm64
directory according to your CPU architecture.cd $(uname -m)
- Use the following docker command to build the eks docker container
docker build -t aws-kubectl:latest .
- Use the following docker command to run the eks docker container.
docker run --rm -it -v ~/.aws:/root/.aws aws-kubectl:latest bash
- Configure aws cli. Enter your
Access key ID
andSecret Access Key
Sample:aws configure
root@9773b5acae26:/# aws configure AWS Access Key ID [****************7DV5]: AWS Secret Access Key [****************izi3]: Default region name [us-east-2]: Default output format [json]:
- Update k8s config
aws eks update-kubeconfig --name ClusterName
- Run kubectl commands
kubectl get pods --all-namespaces