I would like to install kubectx on Ubuntu 20.04. I couldn't find any info on how to do it. Any comment is much appreciated. Thanks!
I would like to install kubectx on Ubuntu 20.04. I couldn't find any info on how to do it. Any comment is much appreciated. Thanks!
This package contains in deb http://ftp.de.debian.org/debian buster main repo which is not available in ubuntu.
First you need to do add this to /etc/apt/sources.list like below
#for kubectlx
deb [trusted=yes] http://ftp.de.debian.org/debian buster main
Then run
sudo apt-get update
Then you can install using this cmd.
sudo apt install kubectx
The following steps worked for me;
There is a kubectx snap package in all currently supported versions of Ubuntu:
sudo snap install kubectx
I successfully installed ctx and ns as kubectl plugin using Krew.
kubectl krew install ctx
kubectl krew install ns
There's one minor catch. You won't use the commands like this:
kubectx
kubens
But rather like this:
kubectl ctx
kubectl ns
To install kubectx without having to edit your /etc/apt/sources.list:
Snapcraft - Install kubectx on Ubuntu
If snapd is not enabled:
Install Snapd
sudo apt updatesudo apt install snapdWith snapd enabled:
Install kubectx
sudo snap install kubectxThis command should work:
sudo apt install kubectx
If you want find completely install kubectx guide, you need to go to this github page. You can use an installation for Debian. APT stands for Advanced Package Tool. It is a set of core tools inside Debian and Ubuntu Linux system. You can use the apt command to install apps, delete or remove apps, keep Ubuntu/Debian server up to date and more. You can read more about it here.
It is possible that you should add the package deb http://ftp.de.debian.org/debian buster main before you install kubectx in the file /etc/apt/sources.list and then run sudo apt-get update. After that installation should work without problems.