DEV Community

Unpublished Post. This URL is public but secret, so share at your own discretion.

KUI: A Better Way to Manage Kubernetes Resources

Kubernetes is one of the most widely used container orchestration systems that helps developers and IT teams manage and deploy their applications in the cloud. Kubernetes offers a powerful command-line interface (CLI) called kubectl that allows users to interact with their Kubernetes clusters and resources.

However, the kubectl CLI has some limitations when it comes to usability and visualization of data. The output of kubectl commands is typically in ASCII format, which can be difficult to read and understand. Additionally, navigating through complex Kubernetes resources can be challenging, especially for new users.

To overcome these challenges, a new tool called KUI was developed. KUI is a graphical user interface (GUI) for kubectl that provides a more intuitive and visual way to manage Kubernetes resources.

In this blog post, we will explore why there is a need for a better CLI and graphics support for kubectl, introduce KUI, explain how KUI works, show how to use KUI, discuss the benefits of using KUI, and provide some real-world usage examples.

Why KUI?

As mentioned earlier, kubectl provides a powerful command-line interface for managing Kubernetes resources. However, its output is usually in ASCII format, which can be difficult to read and understand. Additionally, the process of navigating through complex resources can be tedious, especially for new users.

This is where KUI comes in. KUI is a graphical user interface that provides a more intuitive and visual way to manage Kubernetes resources. With KUI, users can view resources as sortable tables, click to drill down into resource details, and view logs and events related to specific resources.

KUI also provides a more user-friendly way to iterate through tables and find specific data, making it easier for users to locate the information they need. Additionally, KUI allows users to view resources in a tabbed interface, which provides a more organized and intuitive way to view resource details.

Introduction to KUI

Image1

KUI is an open-source project that provides a graphical user interface for kubectl. It was developed by the Kubernetes SIGs (Special Interest Groups) and offers an alternative way to manage Kubernetes resources. KUI uses Electron, a framework for building desktop applications using web technologies, to provide a native desktop experience.

KUI provides a powerful REPL (Read-Eval-Print Loop) that allows users to interact with Kubernetes resources using a more intuitive and visual interface. It offers features such as live tables, auto-completion, and syntax highlighting to make it easier for users to navigate and manage their Kubernetes resources.

How Does KUI work?

Image2

KUI works by leveraging the kubectl CLI and providing a more user-friendly and visual interface for managing Kubernetes resources. When a user enters a kubectl command in KUI, KUI sends that command to the kubectl CLI and displays the output in a more intuitive and visual format.

KUI uses a combination of HTML, CSS, and JavaScript to render the graphical user interface. It also uses the Electron framework to provide a native desktop experience. KUI communicates with the kubectl CLI through a REST API, which allows it to execute kubectl commands and retrieve the output.

How to Use KUI

Image5

Using KUI is straightforward. The first step is to install KUI on your machine. Users on MacOS can use Homebrew to install KUI by running brew install kui. Windows and Linux users can download and unzip the executable and add the unzipped directory to their PATH.

Once KUI is installed, users can launch it by running kubectl kui or launching the KUI executable. Users can then use the KUI REPL to interact with their Kubernetes resources using a more visual and intuitive interface.
There are several ways to install KUI depending on your operating system and personal preferences. Here are some options:

1. Using Homebrew (macOS)

If you are using macOS and have Homebrew installed, you can easily install KUI by running the following commands in your terminal:

brew tap kui-shell/kui brew install kui
Enter fullscreen mode Exit fullscreen mode

2. Downloading the binary (Windows and Linux)

If you are using Windows or Linux, you can download the latest binary release of KUI from the GitHub releases page. Once downloaded, unzip the file and add the unzipped directory to your PATH. You can then use the kubectl kui command to launch KUI.

3. Building from source

If you prefer to build KUI from source, you can clone the repository from GitHub and build it using Node.js. Here are the steps:

git clone git@github.com:kui-shell/kui.git 
cd kui 
npm ci 
npm run build
Enter fullscreen mode Exit fullscreen mode

This will build KUI for your current platform. You can then launch KUI using the ./bin/kui command.

4. Using Docker

If you prefer to use Docker, you can use the kui-shell/kui Docker image. Here's an example command to launch KUI in Docker.

docker run -it -e KUBECONFIG=/path/to/your/kubeconfig kui-shell/kui
Enter fullscreen mode Exit fullscreen mode

This will launch KUI in a Docker container with your Kubernetes configuration file mounted as a volume.
Once you have installed KUI, you can launch it using the kubectl kui command. This will open the KUI interface in your default web browser. From there, you can interact with your Kubernetes cluster using the intuitive graphical interface.

Benefits of Using KUI

  • User-friendly interface: KUI offers a user-friendly interface that is easy to navigate and use. Its graphical user interface eliminates the need to memorize complex commands and flags, making it ideal for beginners and advanced users alike.
  • Enhanced productivity: KUI allows you to perform tasks more efficiently than traditional command-line interfaces. Its intuitive interface and ability to visualize data enable you to work faster and with greater accuracy.
  • Improved visibility: KUI's graphical interface enhances visibility, making it easier to monitor and manage complex environments. Its real-time updates and dynamic tables allow you to see changes as they happen, enabling you to make informed decisions quickly.
  • Simplified debugging: KUI's debugging capabilities allow you to easily identify and troubleshoot issues. Its interactive interface and support for logs and events make it easier to isolate problems and find solutions quickly.
  • Customizability: KUI's framework allows you to create your own Kubernetes enhancements, set custom themes and icons, and enhance your favorite CLI commands. You can also use KUI's hosted client-server architecture or distribute double-clickable applications via Electron.

Usage of KUI in the real world

  • Monitoring: KUI's real-time updates and dynamic tables make it ideal for monitoring Kubernetes clusters. You can easily see the status of your resources and receive notifications of changes as they happen.

  • Debugging: KUI's interactive interface and support for logs and events make it easier to isolate problems and find solutions quickly. You can easily drill down into specific resources and view their logs and events.

  • Deployment: KUI's visual interface allows you to manage deployments and rollouts easily. You can see the status of your resources and perform updates with just a few clicks.

  • Collaboration: KUI's user-friendly interface and support for multiple users make it ideal for collaboration. You can easily share resources and work together in real-time.

  • Customizations: KUI's framework allows you to create your own Kubernetes enhancements and customize the interface to suit your needs. You can add your own commands and create custom themes and icons.

Give it a try

KUI offers a modern, user-friendly interface for interacting with Kubernetes clusters. Its graphical interface and real-time updates make it easier to manage and monitor complex environments, while its debugging capabilities simplify troubleshooting. By enhancing productivity and simplifying tasks, KUI can save time and improve overall efficiency. With its customizability, KUI is a powerful tool for developers and system administrators looking to streamline their Kubernetes workflows.

Top comments (0)