{"id":22494706,"url":"https://github.com/niv-devops/platform-engineering","last_synced_at":"2025-03-27T21:13:44.643Z","repository":{"id":266293519,"uuid":"897934590","full_name":"niv-devops/platform-engineering","owner":"niv-devops","description":"Kubernetes cluster management platform","archived":false,"fork":false,"pushed_at":"2024-12-04T10:32:23.000Z","size":479,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T23:29:22.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niv-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T13:53:53.000Z","updated_at":"2024-12-04T10:33:03.000Z","dependencies_parsed_at":"2024-12-03T15:26:29.335Z","dependency_job_id":"d13bb855-29f3-411e-8bbd-b6d0c745a97f","html_url":"https://github.com/niv-devops/platform-engineering","commit_stats":null,"previous_names":["niv-devops/platform-engineering"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niv-devops%2Fplatform-engineering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niv-devops%2Fplatform-engineering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niv-devops%2Fplatform-engineering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niv-devops%2Fplatform-engineering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niv-devops","download_url":"https://codeload.github.com/niv-devops/platform-engineering/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924519,"owners_count":20694730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T19:16:34.305Z","updated_at":"2025-03-27T21:13:44.614Z","avatar_url":"https://github.com/niv-devops.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Environment Management Platform\n\nThis platform allows you to manage Kubernetes environments by creating and deleting namespaces, as well as checking the status of deployments, pods, and services within those namespaces. The platform uses Flask as the web framework and interacts with Kubernetes using the Kubernetes Python client.\n\n## Features\n\n- **Create a New Environment**: Create a new namespace in Kubernetes, along with a deployment and a NodePort service for the `weather-webapp`.\n- **Delete an Environment**: Delete a specific namespace and its associated resources (deployment and service).\n- **Check Status**: Check the status of pods, deployments, and services within a namespace.\n- **Namespace Management**: Provides functionality to select, create, delete, and view Kubernetes namespaces.\n\n## Requirements\n\n- **Python** 3.x\n- **Flask**: A lightweight Python web framework\n- **Kubernetes Python Client**: Used to interact with the Kubernetes API\n\n### Required Python Packages\n\nInstall the necessary dependencies via `requirements.txt`:\n\n```\nFlask==2.3.2\nkubernetes==25.0.0\n```\n\nTo install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n## Setup\n\n1. Clone this repository to your local machine.\n\n2. Ensure you have **Kubernetes** set up and **kubectl** configured to communicate with your cluster.\n\n3. If you haven't installed `kubectl` yet, you can follow [these instructions](https://kubernetes.io/docs/tasks/tools/install-kubectl/).\n\n4. Run the application:\n\n```bash\npython app.py\n```\n\n5. The platform will be available at `http://127.0.0.1:5000/`.\n\n## API Endpoints\n\n### `/create` (GET, POST)\nThis page allows you to create a new Kubernetes environment (namespace, deployment, and service).\n\n- **GET**: Displays the form to create a new environment.\n- **POST**: Creates the namespace, deployment, and service when the form is submitted.\n\n### `/delete` (GET, POST)\nThis page allows you to delete an existing environment (namespace).\n\n- **GET**: Displays a list of existing namespaces.\n- **POST**: Deletes the selected namespace and its resources.\n\n### `/status` (GET, POST)\nThis page allows you to check the status of a specific namespace, including the status of pods, deployments, and services.\n\n- **GET**: Displays a list of existing namespaces.\n- **POST**: Displays the status of pods, deployments, and services in the selected namespace.\n\n## Example Usage\n\n1. **Create a new environment**: Navigate to the `/create` page, provide a namespace name, and submit the form. The system will create a namespace, deployment, and NodePort service for the `weather-webapp`.\n\n2. **Delete an environment**: Navigate to the `/delete` page, select a namespace to delete, and submit the form. The namespace and its resources will be deleted.\n\n3. **Check status**: Navigate to the `/status` page, select a namespace, and submit the form to view the status of pods, deployments, and services in that namespace.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniv-devops%2Fplatform-engineering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniv-devops%2Fplatform-engineering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniv-devops%2Fplatform-engineering/lists"}