DEV Community

Cover image for Simple Kubernetes Dashboard - KubeDev
Renan Ferreira
Renan Ferreira

Posted on

Simple Kubernetes Dashboard - KubeDev

TL;DR: check out the GitHub Page

Kubernetes has been in my life since 2018, and it transformed the way I develop and maintain software. It not only made the life of my team much easier, but it also helped us scale our services elastically and decreased our costs with infrastructure.

As you can see, I’m a big fan of this project and the community around it. So I decided to try to give back something in return, and at the same time, improve one area that frustrated me.

The concepts around Kubernetes and Docker are not that easy, and the tasks involved in managing the services deployed in a cluster are repetitive and not optimized for day-to-day use. I found myself doing the same kubectl commands every day at work.

So I decided to create a Kubernetes Dashboard, called KubeDev, that would help beginners to have a better view of the services running in the cluster and, at the same time, simplify the life of the people responsible for keeping everything running.

Installation

The simplest way to run Kubedev is with docker. Just run the following command:

docker run --rm -it -v ~/.kube/:/root/.kube/ --net=host relferreira/kubedev:1.0.0

and visit localhost:9898

Unfortunately, on macOS the --net=host does not work correctly, so I suggest downloading the binary kubedev_darwin in this PAGE, and running the following command in the terminal:

./kubedev_darwin

Search

One of the first areas that I would like to address was the easiness of finding resources by a name search. Usually, to get the logs of a running service, I would list the deployments to remember its name, list the pods, search for the one that I was looking for and then run the logs command.

With Kubedev all of your deployments, services and pods are searchable. Just reach out for the search box or press cmd + k and start typing the name of your resource.

Search

All pages with tables have search functionality too, helping us filter the enormous number of pods inside a namespace (I know, bad practice).

Command Palette

If you are already familiar with kubectl commands, just press cmd + shift + k to access the command palette mode, where most of your commands will work as if in the terminal, plus you get all the search functionality described earlier. Some examples:

  • kubectl get svc will redirect you to the list of services in the namespace
  • kubectl logs POD_NAME to get the pod's logs
  • kubectl get deploy to autocomplete with the name of the resource
  • kubectl edit deploy DEPLOYMENT_NAME to edit the deployment YAML
  • kubectl describe deploy DEPLOYMENT_NAME to get the describe YAML

Those commands work for most of the Kubernetes resources.

Command Palette

Editor

Built-in Kubedev is a text editor, based in Monaco (code editor which powers VS Code), for creating and editing YAML files. So you can edit all your Kubernetes resources using the kubectl edit command, or even create new resources.

Editor

Logs

The logs page will stream all of your pod’s logs to the browser in a way that, I hope, will not crash your tab. It even has a search box to help you debug that bug on production.

Logs

Port Forward

In the Service information page, you can trigger a port-forward command and keep track of all open tunnels, inside the Port Forward page

Port Forward

History

Last but not least, the command pallet has a history mode. Just type cmd + shift + y to access all of your previous commands, just like you would do in your terminal.

Conclusion

KubeDev is still in its early stages, but it is already helping me a lot. I hope that it helps others with the same problems I have.
Feel free to contact me with issues and to request new features. I will be delighted if more people use this tool :)

Top comments (0)