Menu
User

DropVPS Team

Writer: Cooper Reagan

How to install kubectl on Debian 13

How to install kubectl on Debian 13

Publication Date

11/21/2025

Category

Articles

Reading Time

1 Min

Table of Contents

kubectl is the main command-line tool for controlling Kubernetes clusters. Debian 13 (Trixie) supports it cleanly using the official Kubernetes repository.

Step 1: Update System Packages

Make sure your Debian 13 system is fully updated:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Dependencies

Enable HTTPS transport and certificates:

sudo apt install -y apt-transport-https ca-certificates curl

Step 3: Add the Kubernetes Repository

Add Google’s GPG key:

curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg

Add the Kubernetes apt repo:

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

Update your package list:

sudo apt update

Step 4: Install kubectl

Install the latest stable version:

sudo apt install -y kubectl

Verify the installation:

kubectl version --client

Expected output example:

Client Version: v1.30.x

Step 5: Enable kubectl Auto-Completion (Optional)

Bash auto-completion:

echo "source <(kubectl completion bash)" >> ~/.bashrc
source ~/.bashrc

Zsh auto-completion:

echo "source <(kubectl completion zsh)" >> ~/.zshrc
source ~/.zshrc

Step 6: Test the Installation (Optional)

If you already have a cluster configured:

kubectl get nodes

If you see output, kubectl is connected and ready to use.

Linux VPS
U
Loading...

Related Posts

How to install kubectl on Debian 13