GUI for running Kubernetes commands with Python CGI and AJAX

GUI for running Kubernetes commands with Python CGI and AJAX

Previously, I've created a GUI for running Docker Commands with Python CGI and AJAX, this time the task is to create GUI for running Kubernetes commands but with typing in English in a specific format, let's start:

What is Kubernetes?

Kubernetes is an open-source container orchestration platform that automates many of the manual processes involved in deploying, managing, and scaling containerized applications.

In other words, you can cluster together groups of hosts running Linux containers, and Kubernetes helps you easily and efficiently manage those clusters. For more information please refer to this article.

What is Python CGI?

Python CGI stands for Common Gateway Interface. An HTTP server invokes a Python CGI script so it can process user input that a user may submit through an HTML or element. Such a script usually lives in the server’s special cgi-bin directory.

For a request, the server places information about it- the client’s hostname, the requested URL, the query string, and other information- in the script’s shell environment. It executes this script and sends the output back to the client. The input for this script connects to the client, and the server sometimes reads the form data this way.

Other times, it passes form data through a query string, which is a part of the URL. A query string holds data that doesn’t conventionally fit a hierarchical path structure.

What is AJAX?

AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and JavaScript. For more information click here .

Let's start with GUI:-

To use Kubernetes, first, we have to install Kubernetes in our system, here I've used a mini version of Kubernetes known as the Minikube . To install Minikube in your VM refers to this article.

Just Start the Minikube and webserver in OS place the file in /var/www/cgi-bin/ and the rest of the files in /var/www/html/ directory and you are good to go.

Here are some of the screenshots of our WebApp:-


kubernetes home.jpg

Help Page:-

help.jpg It consists of instructions that should be followed while writing the Commands.

Running the commands:-

running command.jpg


deployment created.jpg

deployment created in vm.jpg

As you can see the deployments are created means our task is successfully completed we can also perform the rest of the commands like this.

GitHub repo :-

Thank You