Skip to main content
๐ŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy โ€” plus the companion book on Leanpub & Amazon. Start Learning
Install kubectl on Ubuntu 24.04 LTS
DevOps

Install kubectl on Ubuntu 24.04 LTS: Complete Guide (2026)

Step-by-step guide to install kubectl on Ubuntu 24.04 LTS. Repository setup, installation, configuration, and verification.

LB
Luca Berton
ยท 1 min read

Here is how to install kubectl on Ubuntu 24.04 LTS. Tested and verified.

Prerequisites

  • Ubuntu 24.04 LTS installed and updated
  • Root or sudo access
  • Internet connection

Step 1: Update System

sudo apt update && sudo apt upgrade -y

Step 2: Add Official Repository

kubectl should be installed from the official repository to get the latest stable version and security updates.

# Add the official kubectl repository
# Check kubectl documentation for the latest repo URL
sudo apt install -y curl gnupg2

Step 3: Install kubectl

sudo apt install -y kubectl

Step 4: Verify Installation

kubectl version

Expected output should show the installed version.

Step 5: Post-Install Configuration

# Enable and start the service (if applicable)
sudo systemctl enable --now kubectl

# Verify status
sudo systemctl status kubectl

Troubleshooting

Package Not Found

Make sure the repository was added correctly:

# List configured repositories
apt repolist

Permission Denied

Ensure your user has the correct group membership:

sudo usermod -aG kubectl $USER
newgrp kubectl

Uninstall

sudo apt remove -y kubectl

About the Author

I am Luca Berton, AI and Cloud Advisor. Book a consultation to get help with your infrastructure setup.

Free 30-min AI & Cloud consultation

Book Now