In this short article we will learn how to install K9S on Ubuntu 22.04 LTS Operating ssteml;
Introduction
K9s is a powerful open-source command-line interface (CLI) tool that provides an efficient way to interact with and manage Kubernetes clusters. Built with a user-friendly and intuitive interface, K9s simplifies complex Kubernetes operations and offers real-time insights into your cluster’s resources. In this article, we’ll delve into the key features of K9s, its benefits, and how to effectively use it to streamline your Kubernetes management tasks.
Key Features of K9s
- Intuitive Interface: K9s offers a terminal-based interface with a clean layout, making it easy to navigate and perform operations within your Kubernetes clusters.
- Real-time Monitoring: Gain real-time insights into your cluster’s resources, including pods, nodes, services, deployments, and more.
- Efficient Navigation: K9s allows you to quickly switch between different Kubernetes resources, namespaces, and contexts, enhancing your navigation experience.
- Interactivity: Perform actions like viewing logs, describing resources, and executing commands directly from K9s, eliminating the need for multiple terminal sessions.
- Resource Management: K9s enables you to create, update, delete, and scale Kubernetes resources without leaving the terminal.
Search and Filter: Easily search and filter resources using regular expressions, making it simple to locate specific pods, services, or other resources. - Context Switching: Seamlessly switch between different Kubernetes contexts and clusters, enhancing multi-cluster management.
Benefits of Using K9s
- Enhanced Productivity: K9s’ streamlined interface and interactive features save time and reduce the learning curve associated with Kubernetes operations.
- Real-time Monitoring: Monitor your cluster’s health and resources without the need for additional monitoring tools.
- Reduced Errors: The interactive nature of K9s helps prevent human errors by offering context-aware commands and validation.
Resource Visualization: K9s provides an intuitive representation of your cluster’s architecture, helping you understand and manage complex deployments.
Multi-Cluster Support: Manage multiple Kubernetes clusters efficiently using K9s’ context-switching capabilities.
How To Install K9S On Ubuntu 22.04
K9s is a versatile command-line tool that simplifies the management of Kubernetes clusters. There are two options for installing K9s, namely via snap and manual installation from the source files provided on GitHub. In this tutorial, we will discuss how to install manually. To install K9s on Ubuntu Linux system manually, we will follow these steps:
Step 1. Update System Repository
Step 2. Install Kubectl
Step 3. Installing K9s on Ubuntu 22.04
Update System Repository
Before installing any new software, it’s a good practice to update the system packages. Open a terminal and run the following command :
$ sudo apt update
2. Install Kubectl
Kubectl installation has been discussion on previous tutorial.
We will verify it by querying its version.
$ kubectl version --output=yaml
Output :
ramansah@infodiginet:~$ kubectl version --output=yaml clientVersion: buildDate: "2023-08-24T11:23:10Z" compiler: gc gitCommit: 8dc49c4b984b897d423aab4971090e1879eb4f23 gitTreeState: clean gitVersion: v1.28.1 goVersion: go1.20.7 major: "1" minor: "28" platform: linux/amd64 kustomizeVersion: v5.0.4-0.20230601165947-6ce0bf390ce3
3. Install K9S on Ubuntu 22.04
To install K9S, we will use the source file from K9S official source. We need to download K9S source file by using curl command line :
$ curl -LO https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz
Output :
ramansah@infodiginet:~$ curl -LO https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0 100 17.7M 100 17.7M 0 0 79572 0 0:03:54 0:03:54 --:--:-- 196k
Then we extract it by using tar command line :
$ tar xf k9s_Linux_amd64.tar.gz $ sudo mv k9s /usr/local/bin
After extracting was completed done, then we will verify it by submitting command line :
$ k9s version
Output :
ramansah@infodiginet:~$ k9s version ____ __.________ | |/ _/ __ \______ | < \____ / ___/ | | \ / /\___ \ |____|__ \ /____//____ > \/ \/ Version: v0.27.4 Commit: f4543e9bd2f9e2db922d12ba23363f6f7db38f9c Date: 2023-05-07T16:55:34Z
To use K9S, we just submit the following command line :
$ k9s
The output will be as shown below :
Conclusion
K9s is a valuable tool for Kubernetes administrators and developers, providing an efficient and intuitive way to manage clusters from the command line. With its real-time monitoring, interactive features, and context-aware commands, K9s simplifies Kubernetes operations and enhances your overall management experience. By incorporating K9s into your workflow, you can efficiently navigate, monitor, and manage your Kubernetes resources without leaving the terminal.