Part 1: Set up

Installing kubectl

Next, we are going to install kubectl, the official Kubernetes CLI.

Despite the Educates CLI wrapping most of the needed functionality to interact with our dedicated Educates cluster later-on, kubectl will come in handy whenever we want to have a closer look at how things work within the platform.

kubectl is available from package managers for almost all common operating systems.

Installing kubectl on Linux

On the Debian, Red Hat, and SUSE families of operating systems, kubectl can be installed via native package management. On other Linux flavors, the release binaries can be downloaded instead. On Windows, follow these instructions inside WSL.

Installing kubectl with Native Package Managers

Debian

Terminal window
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.36/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
sudo chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.36/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo chmod 644 /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

Installing kubectl from GitHub

kubectl can be installed from release binaries:

Installing kubectl from release binaries
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -sSLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# For ARM64
[ $(uname -m) = aarch64 ] && curl -sSLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl

Installing kubectl on macOS

On macOS, kubectl can be installed with either of the common package managers:

Homebrew

Terminal window
brew install kubectl

Testing kubectl

To test if the installation kubectl has been successful, spin up a terminal and run the following command:

Testing kubectl
kubectl version --client

The output should look like this:

Output
kubectl version --client
Client Version: v1.36.5
Kustomize Version: v5.8.1

Edit this page on GitHub