Quantcast
Channel: Lingesh, Author at UnixArena
Viewing all articles
Browse latest Browse all 369

kubectl – Let’s colourize the output

$
0
0

kubectl is a command-line tool for interacting with Kubernetes clusters. It is the primary interface for managing and controlling Kubernetes clusters, including deploying applications, inspecting cluster resources, scaling workloads, debugging, and performing various administrative tasks. kubecolor is an alternative command-line tool to interact with kubernetes clusters and provide the colorized output, unlike the kubectl command. “kubecolor” is still under development, and not all the subcommands are supported.

Github Project: https://github.com/hidetatz/kubecolor

Release page: https://github.com/hidetatz/kubecolor/releases

This project offers kubecolor only for Linux and Mac environments.

1. Download the “kubecolor” for your environment. For Mac ARM architecture, use the following command.

uxpro-$ curl -s https://github.com/hidetatz/kubecolor/releases/download/v0.0.25/kubecolor_0.0.25_Darwin_arm64.tar.gz -o kubecolor.tar.gz

2. Extract the downloaded archive.

uxpro-$ ls -lrt |grep kube
-rwxr-xr-x@  1 uxpro  staff     1921250 Dec 31  2022 kubecolor
-rw-r--r--@  1 uxpro  staff      812414 Oct  3 22:42 kubecolor_0.0.25_Darwin_arm64.tar.gz
                                                                                                                            
uxpro-$ 

3. Check the kubecolor version.

kubectl is an essential tool for anyone working with Kubernetes, whether you are a developer deploying applications or an administrator managing the cluster infrastructure. It provides a unified and consistent interface for performing Kubernetes operations across different clusters and environments.

4. Let’s try to execute kubenetes commands to see the difference from traditional kubectl.

kubecolor  vs kubectl

5. Describe the pod using kubecolor and see the colour

kubecolor - describe pod - Kubernetes

6. If you have passed an invalid argument, you will get colourized output like the below for error.

invalid arguments - kubecolor

7. It’s very difficult to use kubecolor since we are familiar with kubectl. You can create an alias for “kubecolor” like below.

alias - kubecolor <-- kubectl

Let’s see what the Kubecolor edit looks like.

kubecolor - deploy edit
kubecolor – deploy edit

7. If you do not want to get the colorized output, you can pass “–plain” flag to get the normal command output.

Kubecolor - to get plain output

Hope this article is informative to you.

The post kubectl – Let’s colourize the output appeared first on UnixArena.


Viewing all articles
Browse latest Browse all 369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>