Skip to content

The Kubernetes Control Panel is a web-based interface made with the help of 'Streamlit' that allows you to manage deployment scaling as well as various pod operations.

License

Notifications You must be signed in to change notification settings

jaypatel15406/K8s-Control-Panel-Using-Streamlit

Repository files navigation

K8s Control Panel 🛠️

Fun Fact : - The name "Kubernetes" originates from Greek, meaning "helmsman" or "pilot." It is an apt metaphor as Kubernetes acts as the orchestrator or captain of containerized applications, steering and managing their deployment, scaling, and operations in a distributed system.

Greetings, Devs() 👋 If you're weary of utilizing the 'kubectl' command, why not explore an alternative approach to handling your 'Kubernetes' applications? Give 'K8s Control Panel' a try! It's an application built using the 'Kubernetes + Streamlit Framework' of the Python programming language.

Application Setup Guidelines 📑

  1. Dependency Installations

    • Make an virtual enviorment and install all the necessary components to run the 'Application'
    virtualenv venv
    
    • Activate your virtual enviorment
    - For MacOS:
        source venv/bin/activate
    
    - For Windows:
        venv\Scripts\activate.bat
    
    • Install all the necessary ingredients from requirements.txt file:
    pip3 install -r requirements.txt
    

To Learn More About virtualenv: Click Here

  1. Generation and Integration of 'KubeConfig' File

    Expand me 👇, For the steps to create your own 'kubeconfig'
    1. For Elastic Kubernetes Service (EKS) of Amazon Web Services (AWS)
      • Install the AWS CLI if you haven't already and Configure your AWS credentials using: aws configure
      • Install the AWS IAM Authenticator if you haven't already
      • Generate the kubeconfig file using: aws eks update-kubeconfig --name 'cluster_name' --region 'region_name' command
    2. For Google Cloud Platform (GCP)
      • Install the Google Cloud SDK (gcloud) if you haven't already and Log in to GCP using the gcloud auth login command
      • Set the desired project if you have multiple projects: gcloud config set project 'project_id'
      • Generate the kubeconfig file using gcloud container clusters get-credentials 'cluster_name' --zone 'zone_name' command
    3. For Microsoft Azure:
      • Install the Azure CLI if you haven't already and Log in to Azure using az login command
      • Set the desired subscription if you have multiple subscriptions: az account set --subscription 'subscription_id'
      • Generate the kubeconfig file using az aks get-credentials --resource-group 'resource_group_name' --name 'cluster_name' command

    Note: - Make sure you have the necessary permissions and access to the respective cloud providers before generating the 'kubeconfig' files. Replace 'resource_group_name', 'cluster_name', 'subscription_id', 'project_id', 'zone_name', and 'region_name' with the appropriate values for your environment

    Got my 'KubeConfig' what next 🤔?
    • Get your 'kubeconfig' file and replace it with explanatory 'k8sconfig.txt' at config\k8sconfig.txt

    Note: Please avoid using the 'k8sconfig.txt' file mentioned in the source code as it was merely an illustrative file provided for reference. Also, kindly adhere to the prescribed naming convention for the filest

  2. Setting up a user and generating a password (****)

  • Open config\config.json file and set decrypted_password_jay_user: password_of_your_choice and password_hashing_flag: True to generate new encrypted password
      - You can change decrypted_password_jay_user variable with your choice of variable to but don't forget to replace the variable in main_application.py file 😄
  • Run Main Application to generated hashed_password by running python3 -m streamlit run main_application.py
      - This command will boot up an application, but still you won't be able to access it because we need proper 'Authenticated Credentials'
      - After booting up an application hashed_password will be logged into your terminal
  • Copy the hashed_password generated from above step and paste it of password variable into config\credential.yaml and don't forget to enter your name and email too.
  • Now, after setting up all the credentials. Make password_hashing_flag: False in config\config.json file because we have to generate password one time only
  1. After completion of all the steps mentioned above. You're ready to launch your application 🚀. To launch your application run the command mentioned below captain 👨‍✈️ :

     python3 -m streamlit run main_application.py


💫 Some Glimpse of Application 😎

1. Deployment Scalling Up

K8s Control Panel Deployment Up Scaling Screenshot

2. Deployment Scalling Down

K8s Control Panel Deployment Down Scaling Screenshot

3. Pod Deletion Operation

K8s Control Panel Pod Deletion Screenshot

To Contribute to the Project:

  1. Choose any open issue from here.
  2. Comment on the Issue: Can I work on this? and Start Exploring it.
  3. Make changes to your Fork and Send a PR.

To Create a PR (Pull Request):

For Creating Valid PR Successfully. Kindly follow Guide: https://help.github.com/articles/creating-a-pull-request/

To Send a PR, Follow Rules Carefully !!

Otherwise your PR will be Closed:

  1. For Appropriate PR, follow Title Format: Fixes #IssueNo : Name of the Issue

For any Doubts related to the Issues, such as understanding Issue better etc., Comment Down your Queries on the Respective Issue.

About

The Kubernetes Control Panel is a web-based interface made with the help of 'Streamlit' that allows you to manage deployment scaling as well as various pod operations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published