Custom Kubernetes Deployment Template Using Monokle.

Ranjit Kumar Pattnayak
4 min readFeb 21, 2022

What is Kubernetes?

Kubernetes is an open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.

What is Monokle?

Monokle is a Manifest IDE that helps us to create, edit, validate and debug Kubernetes Manifests. By using monokle we can quickly view resources defined in our manifests and how they are linked to each other.
Monokle now comes with lots of features like Resource Templates and Plugins, Project Management: To help us create and switch between projects, Kubernetes Secrets Editor, etc.

In this blog, we will be talking about one such feature of Monokle i.e creating a Custom Kubernetes Deployment Template using Monokle.

To start creating and using the YAML Manifest Templates we will require :
1. Code Editor (I personally use the VSCode)
2. Monokle installed in our system. You can download and install Monokle by visiting: Download

Let’s start creating the Template Plugin:

Step 1: Creating a “package.json” file:
In this package.json we provide the details like name, description, author, version

Visit my GitHub repo to download the files: CLICK_HERE

Step 2: Create “monokle-template.json”:
monokle-template.json file needs to be created under a folder that has the same name mentioned under “path” on the “modules” parameter of the package.json. In the above image: line no 12.

The folder name should match the path mentioned in the package.json

Now we are all set to create our “monokle-template.json” Open a file inside the folder and write the codes mentioned in the image:

Step 3: Creating the “form-schema.json”:
The form-schema.json file accepts the details from the user, that are required to fill in the deployment.yaml file.

Step 4: Creating the “form-ui-schema.json”:
This form-ui-schema.json file provides a beautiful graphical user interface for the user to input the details of the deployment file such as deployment name, pod name, number of replicas, etc.

Step 4: Creating the deployment.yaml :
Finally, we will create a deployment.yaml file with the placeholders that we are going to fill from the form data.

Step5: GitPush: After creating all these files on our local we create a new repo on GitHub and push all these codes on the repo. You can clone my repo from HERE.

Using the created custom plugin in Monokle to generate a custom deployment template:

  1. Open Monokle
  2. On the upper right corner click on the second icon “Open Plugin Manager”
Open Plugin Manager

3. Click on Install and Paste the link to your GitHub repo, where the code is present

And click on download and install.

Step 5: Click on start from a project

Step 6: Provide the project name

Step7: Click on select a template and find your custom template.

Click on use template and then click on start.

Step 8: Fill out the details eg- deployment name, pod name, number of replicas you want, etc, and click submit.

I am filling out the details to create an Nginx deployment file.

Custom deployment template is successfully created.

You can try creating your custom templates now :)

Github: Here
Twitter: Here

Thank You so much for reading :)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ranjit Kumar Pattnayak
Ranjit Kumar Pattnayak

No responses yet

Write a response