Install kubectl on Ubuntu

From Bonus Bits
Jump to: navigation, search


This article gives the steps to install the Kubernetes CLI client on Ubuntu.

Install via Snap

The newer versions of Ubuntu come with snapd. If it's not installed you can install the snap package manager. As of the time I wrote this article snapd is not supported by Windows Subsystem for Linux.

sudo snap install kubectl --classic

Install via CLI

sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s | sudo apt-key add -
echo "deb kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Related Articles