Kubernetes Integration with python CGI
Task: Portal to run kubernetes commands
Kubernetes-
Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications.
Advantages of kubernetes-
- Automated rollouts and rollbacks
- Service discovery and load balancing
- Storage orchestration
- Secret and configuration management
- Automatic bin packing
- Batch execution
- IPv4/IPv6 dual-stack
- Horizontal scaling
- Self-healing
- Designed for extensibility
HTTPD-
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom script. CGI can be easily created using cgi-bin of httpd. The files which has permission in server to be executed are made executable and put in folder- /var/www/cgi-bin
Task Execution
After setting up the webserver, test the working using the url(http:///kub.html) in any browser- Here are sample inputs and the output obtained from the server over kubernetes cluster.
- First screen that appears-
2. Executing a command to run pod with podname “pod1” and “httpd” image
3. Creating a deployment with name “pod1” and using “httpd” image
4. Exposing the deployment “pod1” on port 80 using NodePort type
5. Scaling the depolyment “pod1” with 3 replicas
6. Deleting everything
Thank you ;)