{"id":22087842,"url":"https://github.com/menychtak/containerized_kubernetes_datascience_project","last_synced_at":"2026-05-02T20:41:04.932Z","repository":{"id":260530988,"uuid":"881546118","full_name":"menychtak/Containerized_Kubernetes_DataScience_project","owner":"menychtak","description":"This project is a containerized application built with Flask for managing a simple to-do list, integrated with a PostgreSQL database. It is designed to run with Docker containers and includes a frontend interface to interact with the backend.","archived":false,"fork":false,"pushed_at":"2024-12-01T15:10:05.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T18:38:33.145Z","etag":null,"topics":["alpine-postgres","docker","docker-compose","kubernetes","postgresql-database","todolist"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repositories/menychtak","language":"HTML","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/menychtak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-31T19:33:48.000Z","updated_at":"2024-12-01T15:10:08.000Z","dependencies_parsed_at":"2024-10-31T21:24:49.717Z","dependency_job_id":"fa2e19cf-8f39-4865-8cf3-151fa5c19d1e","html_url":"https://github.com/menychtak/Containerized_Kubernetes_DataScience_project","commit_stats":null,"previous_names":["menychtak/containerized_kubernetes_datascience_project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/menychtak/Containerized_Kubernetes_DataScience_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menychtak%2FContainerized_Kubernetes_DataScience_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menychtak%2FContainerized_Kubernetes_DataScience_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menychtak%2FContainerized_Kubernetes_DataScience_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menychtak%2FContainerized_Kubernetes_DataScience_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/menychtak","download_url":"https://codeload.github.com/menychtak/Containerized_Kubernetes_DataScience_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/menychtak%2FContainerized_Kubernetes_DataScience_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["alpine-postgres","docker","docker-compose","kubernetes","postgresql-database","todolist"],"created_at":"2024-12-01T02:06:47.022Z","updated_at":"2026-05-02T20:40:59.924Z","avatar_url":"https://github.com/menychtak.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Containerized Kubernetes Data Science Project\n\nThis project is a containerized application built with Flask for managing a simple to-do list, integrated with a PostgreSQL database. It includes a frontend interface to interact with the backend. You can run this project using either **Docker Compose** or **Kubernetes**. The current setup is initialized to run with **Kubernetes**, but instructions for Docker Compose are also provided.\n\n**Kubernetes** implementation also include a frontend container.\n**Docker Compose** frontend container is not yet developed.\n\n## Features\n\n- Add tasks to a to-do list\n- View existing tasks\n- Simple frontend to interact with the backend -- Only for Kuberenetes \n- PostgreSQL integration for persistent storage\n- Containerized using Docker\n- Kubernetes support for deployment\n\n## Prerequisites\n\n- Docker installed\n- `docker-compose` installed\n- Kubernetes (`kubectl`) installed\n- Minikube installed\n- Git installed\n\n## Project Structure\n\n```\n├── project-to-do-list/       # Main project directory\n│   ├── backend/              # Backend application files\n│   │   ├── Dockerfile        # Dockerfile for the Flask app\n│   │   ├── app.py            # Flask backend application\n│   │   └── requirements.txt  # Python dependencies for the backend\n│   ├── database/             # Database configuration files\n│   │   ├── Dockerfile        # Dockerfile for the PostgreSQL database\n│   │   └── init.sql          # SQL script to initialize the database\n│   ├── frontend/             # Frontend application files\n│   │   ├── Dockerfile        # Dockerfile for the frontend\n│   │   ├── html/             # Directory containing HTML files\n│   │   └── index.html        # Main HTML file for the frontend\n│   ├── k8s/                  # Kubernetes configuration files\n│   │   ├── deployment.yaml   # Deployment configuration for Kubernetes\n│   │   └── service.yaml      # Service configuration for Kubernetes\n├── README.md                 # Project documentation\n└── docker-compose.yml        # Docker Compose configuration file\n```\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\nsudo git clone https://github.com/menychtak/Containerized_Kubernetes_DataScience_project\ncd Containerized_Kubernetes_DataScience_project\n```\n\n### Running with Docker and Docker Compose\n\n### 2. Build network (docker-net)\n\n```bash\nsudo docker network create docker_net\n```\n\n### 3. Run the Application using Docker-Compose\nFirst you need to uncomment the lines in frontend/index.html and backend/app.py that state to be used with docker-compose.\nDon't forget to comment those that state to be used with Kubernetes. Apply thosee changes and then do the below:\n\nUse Docker Compose to run the entire stack (frontend, backend, database):\n\n```bash\nsudo docker-compose up --build -d\n```\n\n### 4. Access the Application\n\n- Open your web browser and navigate to [http://localhost:5000](http://localhost:5000).\n- The frontend interface allows you to add new tasks and view existing ones.\n\nYou can go into view mode or add tasks mode by visiting [http://localhost:5000/tasks](http://localhost:5000/tasks) and [http://localhost:5000/tasks/add](http://localhost:5000/tasks/add) accordingly.\n\n### 5. Available Endpoints\n\n- `GET /tasks` - View all tasks\n- `POST /tasks/add` - Add a new task\n\nTo add a task using `curl`:\n\n```bash\ncurl -X POST http://localhost:5000/tasks/add -H \"Content-Type: application/json\" -d '{\"task\": \"Learn Kubernetes\"}'\n```\n\n### 6. Cleaning Up\n\nTo stop and remove the containers, run:\n\n```bash\nsudo docker-compose down\n```\n\nTo remove the project directory:\n\n```bash\nsudo rm -rf Containerized_Kubernetes_DataScience_project\n```\n\n## Kubernetes Deployment Steps\n\n### 1. Install kubectl\n\n```bash\nsudo curl -LO \"https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl\"\nsudo mv ./kubectl /usr/local/bin/kubectl\nsudo chmod +x /usr/local/bin/kubectl\nkubectl version --client\n```\n\n### 2. Install Minikube\n\n```bash\ncd ~\ncurl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64\nsudo mv minikube-linux-amd64 /usr/local/bin/minikube\nsudo chmod +x /usr/local/bin/minikube\nminikube start\n```\n\n### 3. Verify Cluster Setup\n\n```bash\nkubectl cluster-info\nkubectl get nodes\n```\n   \n### 4. Deploy to Kubernetes\n\n```bash\ncd ~/Downloads/Containerized_Kubernetes_DataScience_project/project_to_do_list/k8s\nkubectl apply -f .\nkubectl get pods\nkubectl get services\n```\n\n### 5. Update Frontend to Match Backend\n1. In case there is an issue with above check if the Nodeport for the backend service is the same with the port in the `fetch` endpoints in `frontend/index.html`\n2. Update the `fetch` endpoints in `frontend/index.html` to match the `NodePort` and Minikube IP in case you see a mismatch:\n   ```javascript\n   fetch(\"http://\u003cMinikube-IP\u003e:\u003cNodePort\u003e/tasks\");\n   ```\n\n3. Deploy the frontend or open the updated `index.html` file locally in your browser.\n\n\n### 6. Accessing the Application\n\n- Get the Minikube IP:\n\n  ```bash\n  minikube ip\n  ```\n  - Get the NodePort:\n\n  ```bash\n  kubectl get svc\n  ```\n\n- Use the Minikube IP and the NodePort of the frontend or backend service to access the application:\n\n  ```\n  http://\u003cMinikube-IP\u003e:\u003cNodePort\u003e\n  ```\n### 7. Stop Cluster\n\n```bash\nminikube stop\n```\n\nOptinal step to completely delete Cluster\n```bash\nminikube delete\n```\n---\nImportant Notes\n\n    This repository is not fully finished. Updates will be made to:\n        Complete frontend implementation for use with docker-compose\n        Remove hardcoded values.\n        Improve configurability across environments.\n        Add more robust error handling and logging.\n\n    If you encounter issues, feel free to raise an issue in the repository or contribute via a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenychtak%2Fcontainerized_kubernetes_datascience_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmenychtak%2Fcontainerized_kubernetes_datascience_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmenychtak%2Fcontainerized_kubernetes_datascience_project/lists"}