Kubernetes cluster management with Monokle
Tags: kubernetes, cluster
Published: 2023-01-19 18:18:27

## If you like OpenLens you will love the new cluster mode in Monokle Desktop

Monokle is a suite of tools designed to help developers and platform engineers manage the application configuration lifecycle in Kubernetes. It includes an open-source [Desktop application](https://monokle.io/download) for Windows, Linux, and Mac, a  [cloud service](https://app.monokle.com/) integrated with GitHub, and an [open-source](https://monokle.io/blog/monokle-cli-flexible-kubernetes-yaml-validation) command-line interface that can be used to validate Kubernetes configurations as part of existing workflows.

When we started working on Monokle in August 2021, our idea was to create the best configuration management system possible for Kubernetes, and we have been adding features for developers and Platform Engineers since then. We have been steadily releasing new versions every few weeks, and up to the current release we have added support for Helm and Kustomize, templates, opa policy visualization in real time, and lately cluster inspection capabilities. We saw ourselves as a complement to other tools, helping with the configuration, while they could focus on the cluster management itself. However, some recent changes in the Lens license and the OpenLens project made their users look for a viable alternative and when they discovered Monokle Desktop, they asked for improvements to what we already had.

We have heard that, and for that reason [Monokle 1.13](https://monokle.io/blog/monokle-1-13-release) introduced a new real time cluster mode that allows you to quickly get an overview of the resources and applications running in your clusters, reducing the cognitive load involved in deploying and maintaining your application in Kubernetes and providing full end to end configuration lifecycle management for your application.


So we are introducing new features that will allow Monokle Desktop to connect to your cluster and show the information required to manage your application, at a basic level, in addition to all the validations, templating and configuration that we already support. And we are using your existing kubectl configuration, so you can start using it as soon as you download it.


![New cluster mode dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7nktqmdczbo9fqptfgz.png)


## Cluster Dashboard with real time updates

Until now, you could use Monokle to get  a snapshot of the list of  resources in your clusters, allowing you to use that as the source for validation and compare to local configuration. Changes in the cluster were not reflected until you hit the refresh button and the management was quite limited. Monokle 1.13 now shows any updates happening to your resources in real-time - making sure you are always viewing the resources as they are actually deployed in your cluster. In addition to real time updates, Monokle has added summary and detailed information for your clusters and their resources, making it easy to assess if your application is behaving correctly or if your cluster has enough free resources to work correctly.

This new dashboard also gives you a direct view of the CPU, memory and Storage in use by the cluster and projects, including information about the Kubernetes version used by your cluster, the container runtime and the alerts generated in your cluster.


## Logs and Terminal

Do you really need to understand how your application is working in your cluster? Is the pod behaving properly but the application is not behaving as expected. You can access the log directly in the tab available for your pods in the navigator.


![Accessing logs from a pod](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caf8039tatzwtpj8gppe.png)



And you have a dedicated link to the terminal, so you can access it directly from the application, without needing you to go to another place.


## Resources and CRDs

Monokle Desktop 1.13 shows you a list of all resource types and the associated resources installed in your cluster, so you can quickly review what is installed in your cluster. If your cluster has been extended using a CRD, Monokle will understand and group resources as instances of the new “Kind”, so you can quickly identify which of them are active. 

Have you installed CertManager or Istio and you want to make sure that the DestinationRule is working? Just select the DestinationRule section of the Navigator and visualize all your installed manifests



![Resource types list after adding a CRD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9egp7kadgvm8djuohhg6.png)




Do you need the IP addresses of your services, or the ports that are opened? Just select services in the Navigator and the list will include those details that are important for your development.




![Ports and IP of services in the cluster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lc2277rr8bjst53cooil.png)




## Monitoring Cluster Activity

How is your cluster behaving? Is there something you need to know about your cluster that can affect the way your application runs?


![List of events in the cluster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/moqh3a9ob2crsxgd4rci.png)



We have added an activity panel to the cluster dashboard in Monokle 1.13, so you can see if some event requires your attention. Right now it is read only but we plan to add additional interactions soon after this release.

## Automatic Resource Validation

Monokle constantly validates your configuration against your Kubernetes schema, links, and different kinds of policies, so it is easy for you to identify if there is something wrong with your configuration or if your cluster policy prevents it from running.


![Real time validation for every resource in the cluster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3v1q8avxwfgpuddov7y6.png)



Even if your manifest is already deployed, you can check the resources inside the cluster to make sure that the configuration is compliant to policies, or whether it will be valid in the next update of your cluster. For example, you can use it to be sure that you didn’t deploy a ReplicaSet that was unintentionally using the “latest” label against your best practices, or review that the APIs used in your cluster will still be valid when you upgrade your cluster to the next major version.


## Details and state of Deployments / Pods


![State of pods](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9pl0wn3lhk064h9z6y6j.png)



Monokle can now show you details of many of the resources installed on your cluster, including deployments and pods, with their reported state. You can also see incoming and outgoing links to your resources, so you can easily navigate through the components of your application.

## Resource Comparison

One of the many utilities included in Monokle is the ability to compare configurations. It doesn’t matter if you want to compare overlays of your Kustomize deployment, the configuration stored in different git branches or commits, or any of the with the actual configuration deployed in your cluster


![Compare configurations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x6hghqkkx8k8244bchkn.png)


Not only that, but you can use Monokle to make local copies of the configuration deployed in your cluster, update them and push it back to your cluster directly or storing the configuration in git, or generating a pull request.


![Synchronize cluster and local config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fy48gvu8jie33bvuegcs.png)



## What’s next?

Cluster mode in Monokle is new and we have a lot of features in our roadmap that will make it better. Our next version, 2.0, will heavily improve the performance, along with a new interface that we think is better suited for interaction with configurations and clusters. Some of the things that you will be able to see in 2.0 and beyond will be:
Performance improvements for cluster with 1000+ resources
New resource focused UX, that will greatly improve the experience
Graph view to quickly  understand the relationship between elements and layers
Additional improvements to the validations supported

And we plan to add new features in upcoming weeks like:



* Easily identify the parts of the YAML that are not editable, to avoid introducing changes that will not be deployable in your cluster.
* Better cluster information, including resource timelines when Prometheus is installed.
* Identify parent/child relationships using ownerRefs to provide additional insight for resources that are managed by the same owner.


## Next steps

We would love to have your input on all these things. We are actively talking to users to discuss use cases and problems that we can help to fix, and we are also establishing partnerships to make Monokle way more useful for your day to day work. You can contact [us](https://calendly.com/sergio-ocon) for a 30’ conversation or join our [Discord channel](https://discord.gg/uNuhy6GDyn), or you can directly open a new issue in [GitHub](https://github.com/kubeshop/monokle/issues) to let us know what you think.


## The Monokle Ecosystem

Monokle is an integrated set of tools for creating and maintaining high-quality Kubernetes configurations throughout the entire lifecycle of your applications.
* **Monokle Desktop** is a unified visual tool for authoring, analysis and deployment of Kubernetes configurations, covering the entire configurations lifecycle, from creation to validation to deployment. 100% free and open source. [[Kubernetes YAML manifests made easy | Monokle](https://monokle.io/)]
* **Monokle Cloud** is a free browser-based tool to explore, validate and manage your Kubernetes configurations and GitOps repositories on GitHub. [[Download Monokle Desktop](https://monokle.io/download)]
* **Monokle CLI** is a flexible and easy to use command-line tool for validating Kubernetes configurations as part of your existing pre-deployment workflows. 100% free and open source. [[Monokle](https://app.monokle.com/)]