Update Kubectl Command-Line Tools on a Ubuntu Linux System

Kubectl is a command-line tool that provides an interface to control the cluster and its components. It can be used to execute commands in one or more containers, submit new workloads for scheduling on clusters, get logs from containers running in a cluster, and so on.

The Kubernetes CLI (kubectl) is built on top of this library and provides easy access to all these features through commands similar to ssh or SCP.

This tutorial will show you how to update Kubectl command-line tools on Linux systems using the following steps:

Check Version

The check the current version kubectl run the following command.

kubectl version --output yaml

The output is shown below.

Download and Install

To download the latest version of Kuberctl and install it on a Ubuntu Linux system, I will use the following two commands.

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Below you can see that I have the latest version installed.

For more Kubernetes posts please visit the category page.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.