Skip to content

Instantly share code, notes, and snippets.

@guilhermelinhares
Last active February 27, 2023 20:59
Show Gist options
  • Save guilhermelinhares/c06853c0565c1b02f4c98b1c209e13a4 to your computer and use it in GitHub Desktop.
Save guilhermelinhares/c06853c0565c1b02f4c98b1c209e13a4 to your computer and use it in GitHub Desktop.
Install Kubectl Ubuntu

Install Kubectl + Kubeadm + Kubelet

  • Update the apt package index and install packages needed to use the Kubernetes apt repository:
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
  • Add the Kubernetes apt repository:
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
  • Update apt package index, install kubelet, kubeadm and kubectl, and pin their version:
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo apt-mark hold kubelet kubeadm kubectl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment