k9scli

All about k9scli for K8s and OpenShift!

OpenShift Hands on Labs

Note: Join our Openshift Tips and Tricks WhatsApp Channel and get regular Updates.

Disclaimer: Please note k9s cli is a opensource and you may have to connect with product owners for any product related questions.

Before proceeding, if you are new to OpenShift, please head to OpenShift for Beginners and learn about OpenShift.

K9sCLI Introduction:

K9s is a powerful and versatile terminal-based user interface for managing Kubernetes clusters.

Created to streamline the process of interacting with Kubernetes, K9s provides a more intuitive and efficient way to navigate, monitor, and manage resources within your clusters.

Unlike the traditional Kubernetes command-line tool kubectl, which can be cumbersome for complex tasks, K9s offers a text-based UI that helps users get real-time information about their clusters with ease.

Its goal is to minimize the learning curve associated with Kubernetes management by providing a consistent and straightforward interface.

Reference: https://k9scli.io/

Installation of K9scli

Windows Installation

  1. Download the Executable:
    • Visit the K9s releases page on GitHub.
    • Find the latest release and download the Windows executable (usually named something like k9s_Windows_x86_64.tar.gz).
  2. Extract the Archive:
    • Use a tool like 7-Zip or WinRAR to extract the contents of the downloaded .tar.gz file.
  3. Move the Executable:
    • Move the extracted k9s.exe file to a directory that is included in your system’s PATH. Commonly, this directory could be C:\Program Files\k9s or simply add it to a folder already in the PATH for convenience.
  4. Verify the Installation:
    • Open Command Prompt or PowerShell and type:shCopy codek9s version
    • If installed correctly, this command should display the version information of K9s.

Linux Installation

  1. Download the Executable:
    • Visit the K9s releases page on GitHub.
    • Find the latest release and download the Linux executable (usually named something like k9s_Linux_x86_64.tar.gz).
  2. Extract the Archive:
    • Open a terminal and navigate to the directory where the file was downloaded.
    • Extract the contents using:shCopy codetar -xvzf k9s_Linux_x86_64.tar.gz
  3. Move the Executable:
    • Move the extracted k9s binary to /usr/local/bin:shCopy codesudo mv k9s /usr/local/bin/
  4. Verify the Installation:
    • In the terminal, type:shCopy codek9s version
    • This should display the version information of K9s if installed correctly.

Installation Demo:

Supported Platforms

K9s supports multiple platforms to cater to a wide range of users across different environments. The supported platforms include:

  • Windows: K9s provides a standalone executable for Windows, making it easy to install and use on Microsoft operating systems.
  • Linux: Various distributions of Linux are supported, including popular ones like Ubuntu, Debian, Fedora, and CentOS.
  • macOS: K9s also supports macOS, allowing users on Apple systems to leverage its powerful features.

This cross-platform compatibility ensures that no matter what operating system you prefer or are required to use, K9s can be seamlessly integrated into your workflow.

Quick Demo:

Benefits of Using K9s

  1. Enhanced Productivity:
    • K9s simplifies the navigation and management of Kubernetes clusters. Its intuitive text-based UI reduces the complexity of performing various Kubernetes operations, making it easier and faster to manage resources.
  2. Real-Time Monitoring:
    • The tool provides real-time updates and information about your cluster’s state. You can quickly see the status of your pods, nodes, and other resources, allowing for prompt detection and resolution of issues.
  3. Efficiency:
    • K9s is designed to be efficient, reducing the number of steps required to perform common tasks. This efficiency is particularly beneficial in production environments where time is critical.
  4. Customizability:
    • Users can customize K9s to fit their specific needs. Configuration options allow for personalized experiences, whether it’s setting preferences for views, colors, or resource filters.
  5. Learning Tool:
    • For those new to Kubernetes, K9s serves as a great learning tool. The visual interface helps users understand the structure and relationships within a Kubernetes cluster, making it easier to grasp complex concepts.
  6. Integration with Existing Workflows:
    • K9s integrates well with existing Kubernetes tools and workflows. It complements kubectl, providing a more user-friendly alternative for certain tasks without replacing the traditional command-line tool.
  7. Open Source:
    • Being open source, K9s has a growing community of users and contributors. This ensures continuous improvement, regular updates, and a wealth of shared knowledge and support.

In summary, K9s is a powerful addition to any Kubernetes administrator’s toolkit. Its ease of installation across various platforms, coupled with its robust feature set, makes it an indispensable tool for efficient Kubernetes management.

Whether you are a seasoned professional or a newcomer to Kubernetes, K9s offers a user-friendly and effective way to manage your clusters.

Yay! 🎉 You made it to the end of the article!