Skip to content

Install Kubectl

Christian Hellwig edited this page Mar 8, 2021 · 1 revision

Kubectl

The kubectl command line tool lets you control Kubernetes clusters.

Environment

Ensure that you have a running Minikube kubernetes cluster.

Installation

The installation guide for kubectl can be found on the offical website here

In a nutshell:

sudo apt-get update && sudo apt-get install -y apt-transport-https
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 -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Configuration

By default kubectl will use a kubeconfig file under ~/.kube/config. If you are using Minikube, minikube start will ensure that a valid config file exists.