Skip to content

Instantly share code, notes, and snippets.

@mveeneman
Last active March 19, 2023 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mveeneman/8de2417c8cb06facf8bae885be1bc4bb to your computer and use it in GitHub Desktop.
Save mveeneman/8de2417c8cb06facf8bae885be1bc4bb to your computer and use it in GitHub Desktop.
Getting the right kubectl for EKS cluster on Ubuntu

Getting the right kubectl for EKS cluster on Ubuntu

First make sure you use the latest aws-cli version

pip install awscli --upgrade

Find out your EKS cluster version

aws eks list-clusters
aws eks describe-cluster --name <your cluster name>

With the version of your cluster download the correct kubectl from k8s.io.

curl -LO https://dl.k8s.io/release/v1.25.0/bin/linux/amd64/kubectl
chmod +x kubectl
mv kubectl ~/.local/bin/

In my case I was using version 1.25

Now get EKS credentials

aws eks update-kubeconfig --region <region-code> --name <your cluster name>

Test your kubectl

kubectl get svc

Get helm

curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment