5 tools for k8s every developer should have
Tags: kubernetes, tooling, productivity, musthave
Published: 2022-02-07 03:04:41

After working very closely with Kubernetes, I created a list of tools used **every day**. Of course, you can use raw kubectl, but let's be honest - we like comfort and user-friendly tools (for the most part)
        

## [Lens | The Kubernetes IDE](https://k8slens.dev/)
![Lens IDE screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1hftviwr58sx2nnsx4g2.png)

**Lens** IDE for Kubernetes. The only system you’ll ever need to take control of your Kubernetes clusters. It's all-in-1 easy-to-use desktop UI tool for managing your k8s resources.
 
## [K9s — Kubernetes CLI To Manage Your Clusters In Style](https://github.com/derailed/k9s)
**K9s** provides a terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources.

It's something similar to Lens but built for terminal use. Also my favorite one over the Lens. In my workflow I split my terminal: 1st part is **k9s** , 2nd part is helm apply smth
![k9s screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lbckgk02gz5r04c7yoez.png)

## [Kubectx and Kubens](https://github.com/ahmetb/kubectx)
A faster way to switch between clusters and namespaces in kubectl. It's something you'll need when you have multiple environments. Boosts your productivity when you are constantly back and forth switching environments

![kubectx preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ax44jjb3brq5l44osmq4.gif)


## [kube-ps1: Kubernetes prompt for bash and zsh](https://github.com/jonmosco/kube-ps1)
A script that lets you add the current Kubernetes context and namespace configured on kubectl to your Bash/Zsh prompt strings (i.e. the $PS1).
For multiple environment workflow so you not mess everything up.

![kube-ps1 preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dggg9nei6ww5sqpqxyz6.gif)

For zsh there is a simple plugin [superbrothers/zsh-kubectl-prompt](https://github.com/superbrothers/zsh-kubectl-prompt) which you can also use

![show the k8s context](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtxfd6k3v1cpsteopat9.png)

## [kubefwd (Kube Forward)](https://github.com/txn2/kubefwd)
kubefwd is a command line utility built to port forward multiple services within one or more namespaces on one or more Kubernetes clusters. kubefwd uses the same port exposed by the service and forwards it from a loopback IP address on your local workstation. kubefwd temporally adds domain entries to your /etc/hosts file with the service names it forwards.

When working on our local workstation, my team and I often build applications that access services through their service names and ports within a Kubernetes namespace. kubefwd allows us to develop locally with services available as they would be in the cluster

![shows that all the ports forwarded](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8na7gnriaqpsx3m84ujg.gif)

### P.S.

As I mentioned before, I've used these tools for some time while working with the k8s environment. There are [a lot of helpful tools for k8s](https://collabnix.github.io/kubetools/), but I suggest keeping your tooling tight and minimal.


![How I treat prod server vs dev](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wny2j87qb9x7dsvgayz5.jpg)