Monokle 101 - Managing Your Kubernetes Manifests
Tags: kubernetes, programming, opensource, productivity
Published: 2022-04-20 13:35:53

_[This post originally published on the Kubeshop blog.](https://kubeshop.io/blog/monokle-101-managing-your-kubernetes-manifests)_

Managing Kubernetes manifests can be a difficult, time consuming task if you don’t have an easy way to manage them at scale. That is, if you don’t have [Monokle](https://monokle.kubeshop.io/). 

[Monokle is an open source desktop tool](https://github.com/kubeshop/monokle) that takes the grunt work out of working with your Kubernetes manifests, it gives you a high-level view of their contained resources and relationships with the options to edit, refactor, preview, diff, and navigate before deploying them to your clusters. 

And you don’t need more than a working knowledge of YAML to do it.

Monokle’s user interface includes a smörgåsbord (this writer is Swedish...) of components to help you work with your manifests;

- A resource navigator to help you navigate your resources
- Intelligent source and form editors for your resource YAMLs
- Dedicated views and preview functionality for Kustomize and Helm Charts
- Cluster view and compare functionality
- Templates to help you get started with new resources


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uyusmytgkfc93jg99x79.png)

And so much more!

#Getting Started
Upon installing and opening Monokle, you might begin by opening an existing folder containing any number of manifest files. Monokle’s UI is built to help you easily visualize their contained resources and relationships between them. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bva4bpe7bz0gad6ikvt.png)

With a simple hover of your cursor you can visualize incoming links and outgoing links to your resources, clicking into any of these links will navigate you to the target resource. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkgxlr1pwax3edhax534.png)

Monokle validates all resource links it finds and indicates to the user whether there is an error - making it easy to find - and fix - any invalid links in your set of resources. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2vxgh9wzkw70j3euzp0.png)

Beyond links, if you make changes to names, references, or any other line items within your resources source, Monokle will immediately alert you if anything you do is inconsistent with the required syntax or schema.

If you’re not fluent in YAML most resources will have a form-based editor allowing you to make changes to any value in a simple and easy-to-understand format. Those changes are reflected within the source code as you work. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eboet3up3p2za28ysczh.png)

#Working with Kustomize
Monokle has built-in support for Kustomize - allowing you to see all customizations and patch files detected in your folders:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gmmxgwyfkd591ql5xlg.png)

An extremely powerful functionality is the possibility to preview a kustomization;  Monokle will run Kustomize and show you all the resources that were generated by Kustomize in the resource navigator - including links, errors and warnings for each resource. You can easily update the kustomization and update your preview to interactively debug and validate the output created by Kustomize before you deploy these to your cluster.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ft0r8uepkfin53fvcqo6.png)

#Working with Helm Charts 
Monokle offers a similar function for [Helm](https://helm.sh/) - allowing you to visualize your Helm charts and their values files:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2zpixh3e55tp27m2kxb.png)

Just like for Kustomize you can preview a Helm Chart which will run Helm in the background and show you the generated resources in the resource navigator:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5p171if7yd23z9h8203u.png)

You can interactively make changes to your values file and recreate the preview at any time, allowing you to validate the output of Helm before applying it to your cluster.

#Connecting to Clusters
Not only does Monokle allow you to work with local manifest files - it also allows you to explore and work with resources in your cluster - including all the link and content validation available for local resources.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0ukflucq9fhdh18n405.png)

Since the number of resources in your cluster can be overwhelming, Monokle allows you to filter your resources through different criteria via the central Navigator column. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bqmmh946hffljss162z.png)

Another useful tool when working with a cluster is the Diff functionality - allowing you to both compare individual resources to those in your cluster - or you can compare an entire set of resources to see how they differ from those already deployed in your cluster.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lj86762gbgjbnycon4f4.png)

In either case, you can easily deploy your local resources after diffing - or replace your local resources with those in your cluster instead.

#Creating Resources
While much of the above has been focused on existing resources either locally or in your cluster, Monokle has a number of features to help you create new resources from scratch, including a library of templates that can help you quickly get up and running with simple Kubernetes objects:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/818i27eed5yvpdy07a8z.png)

Using a template will prompt you for basic information required to generate the corresponding resources and will result in ready-to-deploy resources that can be deployed to your cluster(s) without any further modifications.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ry1jy1y3yvxdymnypppg.png)

#You’re just getting started!
We’ve just scratched the surface of all the functionality provided by Monokle to make your everyday manifest-related tasks easier - check out our [documentation](https://kubeshop.github.io/monokle/) to see what else you can do - or download Monokle from [GitHub](https://github.com/kubeshop/monokle/) and join our [Discord community](https://discord.gg/kMJxmuYTMu) to ask questions and suggest improvements. 

Thank you!