in

LinuxLinux

Kubectl Ubuntu- How to Install Kubectl on Linux Ubuntu 18.04 LTS, 19.04 & More

Install Kubectl Command line client on Linux Ubuntu, Arch, Fedora, CentOS, OpenSUSE, and More

Kubectl Ubuntu

K

ubectl Ubuntu: Kubectl is from official Canonical and it is a command-line client which is used to control Kubernetes Clusters. In general, Kubernetes is a container system that is used for the purpose of Automation. Kubernetes was first designed by Google whereas Cloud Native Computing Foundation is currently maintaining things. In this article, we will see how to install Kubectl on Linux Ubuntu 18.04 LTS versions, Ubuntu 19.04 Disco Dingo and other Ubuntu-based Distros, Fedora, Arch, CentOS, OpenSUSE, Debian, and more. Check out: Install Microk8s on Linux Ubuntu

Jump to:

Install Kubectl on Linux Ubuntu 18.04 LTS/ 19.04 & More:

Note: Snap is pre-installed on Ubuntu 16.04 and Higher versions. However, the command to install snap on Linux Ubuntu is sudo apt install snapd.

Kubectl can be installed using Snappy Package Management system. Kindly use the following commands and steps to install Kubectl on Linux Ubuntu, Debian, Linux Mint 19.2 Cinnamon, and other Ubuntu-based Distros.

  • Open Terminal on Ubuntu the shortcut CTRL + ALT + T.
  • Execute the following command on the terminal to install Kubectl on Linux Ubuntu.
    $sudo snap install kubectl --classic
Install Kubectl Ubuntu
Install Kubectl Ubuntu
  • Kindly enter your system password to authenticate the installation process.
  • Once installed, then you can start using the Kubectl on Terminal.

Install Kubectl on Ubuntu using Ubuntu Software- GUI[Alternate]:

If you are using Ubuntu 16.04 or higher versions Desktop edition, then you can use the following method to install Kubectl on Linux Ubuntu.

  • Go to All Applications(Show Applications on Disco Dingo).
  • Locate Ubuntu Software and open it.
    Kuberctl Ubuntu
    Ubuntu Software
  • Click on the search symbol that is available on the Ubuntu Software.
Kuberctl Ubuntu
Search Symbol
  • A search bar will dropdown. Search for Kubectl. Once found, click on that. 
  • Choose Install.
Kubectl Ubuntu
Install
  • Kindly wait till the installation is done.
  • Once installed, then it can be launched on the terminal.

How to Use Kubectl- Getting Started with Kubectl on Ubuntu:

Once the client is installed then it can be launched on the terminal. To use a command with Kubectl, then kindly use the following syntax.

SYNTAX
kubectl [Command] [TYPE] [NAME] [flags]

Getting Help menu of Kubectl:

Kubectl Help menu
Kubectl Help menu
$kubectl --help

How to Remove Kubectl from Linux Ubuntu & Ubuntu-based Distros:

$sudo snap remove kubectl

App Details:

Basic App Details & Requirements

LicenseOpensource
App Versionv1.15.2[Stable]
App Size10.6 MB
OS RequirementUbuntu 16.04 & Later Versions

How to Install Kubectl on Linux Fedora, Arch, CentOS, and OpenSUSE:

The following are the list of commands available to install Kubectl on Various Linux Distros.

Kubectl for Fedora:

$sudo dnf install snapd
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install kubectl --classic

Kubectl for Arch Linux:

$git clone https://aur.archlinux.org/snapd.git
cd snapd
makepkg -si
$sudo systemctl enable --now snapd.socket
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install kubectl --classic

Kubectl for CentOS:

$sudo yum install epel-release
$sudo yum install snapd
$sudo systemctl enable --now snapd.socket
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install kubectl --classic

Kubectl for OpenSUSE:

$sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.0 snappy
$sudo zypper --gpg-auto-import-keys refresh
$sudo zypper dup --from snappy
$sudo zypper install snapd
$sudo systemctl enable snapd
sudo systemctl start snapd
$sudo systemctl enable snapd.apparmor
sudo systemctl start snapd.apparmor
$sudo snap install kubectl --classic

Get in Touch with Us:

This article provides detailed information on Kubectl and the commands to install Kubectl on various Linux Distros such as Linux Ubuntu 18.04 LTS, 19.04, Linux Mint 19.2 Cinnamon, Debian, Ubuntu-based distros, Fedora, Arch, CentOS, OpenSUSE, and more. If you are looking to install Kubernetes on Ubuntu, check out our article on Install Microk8s on Ubuntu. If you have any Query with the above article then Kindly Comment Us and we will revert to you with a solution ASAP.

  • Article Quality
  • Content Depth
  • Explanation
  • Efficiency of the Article
  • Author Rating
4.4

Summary

For more interesting articles, Kindly visit our Home Page

Check this too  Gitkraken Ubuntu- How To Install Gitkraken on Ubuntu 18.04 LTS & 19.04

Leave a Reply

Your email address will not be published. Required fields are marked *

Written by Ranger

Hey Guys, How you doing? I am Ranger and I am from Philadelphia. Actually, I am a very Lazy person with an active mind and a lazy body and mostly sleeping because of that. Foods and Places are my favorite and I would love to explore places. Contact me through the Contact Us page adding "@Ranger" on the Subject.

Essential Linux Commands

50+ Linux Command Sheet List for Newbies!

Ruby Ubuntu- How To Install Ruby on Ubuntu 18.04 LTS & 19.04