Drop #436 (2024-04-01): TUI Trek

Who Let The Pods Out?; Lollygagging Pods; Git Outta Here

No “fooling” around on the Drop, today, as your friendly neighborhood hrbrmstr has been an anti-fan of this particular annual “celebration” for quite some time now. Plus, it’s harder than ever to know when things posted to the internet outside of April 1st are genuine or not.

We’re taking a trek to TUI land today, with three resources that add some spiffy graphical UX to otherwise command-oriented operations.

BEFORE WE BEGIN: you have updated xz & associated components on all your systems, right?

Estimated reading time: 5 minutes.

TL;DR

(This is an AI-generated summary of today’s Drop.)

(Perplexity did a super good job, today.)

  • Who Let The Pods Out?: This section introduces k9s, a Text-based User Interface (TUI) tool designed to simplify the management of Kubernetes clusters. It enhances productivity by providing a real-time graphical interface for monitoring and managing Kubernetes resources directly from the terminal. The tool is open-source, created by Fernand Galiana, and aims to reduce the complexity associated with Kubernetes cluster management.
  • Lollygagging Pods: Discusses lazydocker, another TUI tool, but for managing Docker containers and resources. Created by Jesse Duffield, lazydocker aims to simplify container management by providing a graphical interface in the terminal, allowing users to navigate through Docker resources, view real-time logs, and perform management tasks without needing to remember complex Docker commands.
  • Git Outta Here: Focuses on tig, a TUI tool for Git repository management. Tig stands out for its simplicity and focus, offering a text-mode interface for browsing Git repositories, staging changes for commit, and acting as a pager for Git command outputs. It’s highlighted for its effectiveness in managing Git repositories with ease.

Who Let The Pods Out?

One of my part-time jobs at work is dealing with Kubernetes (k8s). I generally have some serious disdain for what is usually needless complexity, but — for what I and my team of researchers and data scientists are doing — I do have to admit that we are on the good side of the complexity-vs-utility equation.

I still, however, loathe all of the kubectl commands, especially to perform debugging when things go awry (we have a multi-architecture setup, so this happens more frequently than one might imagine). Navigating its intricacies often requires a deep understanding the tool and a constant pagin through documentation (at least for me).

This is where k9s (GH) steps in, offering a TUI that simplifies the interaction with Kubernetes clusters. This open-source tool, created by Fernand Galiana, is designed to enhance productivity and make Kubernetes cluster management more intuitive.

With k9s, we can monitor and manage Kubernetes resources such as pods, deployments, and services directly from the terminal. It provides real-time feedback and continually watches for changes in the cluster, offering commands to interact with observed resources. It has significantly reduced by kubectl fatigue.

Additionally, k9s tracks real-time metrics associated with resources and provides insights into the performance and health of applications. For “power users”, k9s offers the ability to define custom command shortcuts, enabling quick navigation and operation within the cluster environment.

It even works with minikube, which is what you see via OrbStack in the k9s screenshot in the section header.

If you’re k8s-curious, or need to get some sanity and time back in your existing k8s, k9s is the way to go.

Lollygagging Pods

After using k9s for a while, and also realizing I like working with OrbStack’s Docker GUI more than typing Docker commands, I set out to see if there was some similar TUI’s for Docker and, of course there are!

Today’s pick is something I’ve been using for a few weeks: lazydocker.

The ability to package applications into containers has brought a level of efficiency and portability that was hard to imagine “back in my day”; but, managing these containers, especially as their numbers grow like digital weeds, can quickly become a painful task. Remembering container orchestration commands, or collecting a library of aliases can help with said management, but TUIs definitely help simplify some of the more time-consuming ones.

Jesse Duffield built lazydocekr to help with the pain, and lets us manage Docker containers, images, volumes, and networks. It’s built with Go and uses the Docker API to perform the orchestration. Folks can navigate through different resources, check real-time container logs, and perform a variety of management tasks with simple keystrokes, bypassing the need to remember and type complex Docker commands. One of those screens is in the section header.

If you hit the GH repo, you can see some animations that showcase the charts, graphs, and other features (the README does a great job rounding out the corners on what this tool can do, too).

An unexpected feature is lazydocker’s support for Docker Compose. This facilitates straightforward management of multi-container applications. Another plus is the abiliuty to launch a terminal session inside a running container directly from the Lazydocker interface (similar to what OrbStack lets you do).

Git Outta Here

(This is a short section!)

There is a plethora of TUI/GUI tools for Git. There are many reasons for this, including how easy it is to get a git repo into a really bad place. One tool that I use at least once per week is tig (GH). It’s an ncurses-based text-mode interface for git, and functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.

It is very focused and does what it focuses on very, very well.

FIN

Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev ☮️

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.