{"id":30499415,"url":"https://github.com/elew-dev/flask-web-app","last_synced_at":"2026-02-16T13:33:10.080Z","repository":{"id":281423907,"uuid":"945162179","full_name":"ELew-Dev/flask-web-app","owner":"ELew-Dev","description":"Flask web app deployed on Google Kubernetes Engine (GKE).","archived":false,"fork":false,"pushed_at":"2025-03-12T20:48:48.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T21:12:19.256Z","etag":null,"topics":["docker","flask","google-cloud-platform","kubernetes","python","webapplication"],"latest_commit_sha":null,"homepage":"","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/ELew-Dev.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":"2025-03-08T19:54:21.000Z","updated_at":"2025-03-13T01:22:19.000Z","dependencies_parsed_at":"2025-03-09T02:27:53.814Z","dependency_job_id":null,"html_url":"https://github.com/ELew-Dev/flask-web-app","commit_stats":null,"previous_names":["elew-dev/flask-web-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ELew-Dev/flask-web-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Fflask-web-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Fflask-web-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Fflask-web-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Fflask-web-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ELew-Dev","download_url":"https://codeload.github.com/ELew-Dev/flask-web-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Fflask-web-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272013525,"owners_count":24858474,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docker","flask","google-cloud-platform","kubernetes","python","webapplication"],"created_at":"2025-08-25T06:04:10.095Z","updated_at":"2026-02-16T13:33:10.054Z","avatar_url":"https://github.com/ELew-Dev.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Web App Deployment on Google Kubernetes Engine (GKE)\n\n## Overview\n\nThis project is a simple Flask web application containerized using Docker and deployed on Google Kubernetes Engine (GKE). Initially, the project aimed for deployment on OpenShift, but due to trial limitations and troubleshooting challenges, it was transitioned to GKE. This document details the process, challenges, and solutions encountered during the deployment.\n\n## Features\n\n* Built with Flask (Python web framework)\n* Containerized with Docker\n* Deployed on Google Kubernetes Engine (GKE)\n* Supports local development with Docker\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n* Python 3.9+\n* Docker\n* Google Cloud SDK (gcloud)\n* kubectl (Kubernetes command-line tool)\n\n### Setup and Running Locally\n\n1.  Clone the repository:\n\n    ```bash\n    git clone [https://github.com/ELew-Dev/flask-web-app.git](https://github.com/ELew-Dev/flask-web-app.git)\n    cd flask-web-app\n    ```\n\n2.  Build the Docker image:\n\n    ```bash\n    docker build -t flask-web-app .\n    ```\n\n3.  Run the container:\n\n    ```bash\n    docker run -p 5000:5000 flask-web-app\n    ```\n\n4.  Open your browser and go to: `http://localhost:5000`\n\n### Deployment to Google Kubernetes Engine (GKE)\n\n1.  **Create a GKE Cluster:**\n    * In the Google Cloud Console, navigate to Kubernetes Engine and create a GKE Autopilot cluster.\n\n2.  **Authenticate Docker with GCP:**\n\n    ```bash\n    gcloud auth configure-docker\n    ```\n\n3.  **Build and Push the Docker Image:**\n\n    ```bash\n    docker build -t gcr.io/YOUR_PROJECT_ID/flask-web-app .\n    docker push gcr.io/YOUR_PROJECT_ID/flask-web-app\n    ```\n\n    * Replace `YOUR_PROJECT_ID` with your Google Cloud Project ID.\n\n4.  **Configure Kubernetes Manifests:**\n    * Ensure you have `deployment.yaml` and `service.yaml` files.\n    * Update the `deployment.yaml` file with the correct image path (`gcr.io/YOUR_PROJECT_ID/flask-web-app`).\n\n5.  **Deploy the Application:**\n\n    ```bash\n    kubectl apply -f deployment.yaml\n    kubectl apply -f service.yaml\n    ```\n\n6.  **Expose the Application:**\n    * The `service.yaml` uses a LoadBalancer, which will provide an external IP.\n    * Get the external IP:\n\n        ```bash\n        kubectl get service flask-app-service\n        ```\n\n    * Access the application in your browser using the external IP.\n\n## Development Log\n\n**(Include the entire detailed development log you provided here)**\n\n## Cleanup\n\nTo avoid incurring costs:\n\n1.  Delete the GKE cluster.\n2.  Delete the Docker image from Google Cloud Registry (GCR) or Artifact Registry.\n3.  Consider deleting the Google Cloud Project if it is no longer needed.\n\n## Next Steps (Potential Enhancements)\n\n* Implement authentication.\n* Add database support.\n* Improve error handling.\n* Set up CI/CD pipeline.\n* Configure HTTPS.\n* Add a custom domain.\n\n## Key Takeaways\n\n* Google Cloud Platform (GCP) has its own authentication and authorization mechanisms.\n* Managing the PATH environment variable is crucial for GCP CLI tools.\n* GKE Autopilot simplifies cluster management but has unique behaviors.\n* Google Cloud-specific commands are necessary for authentication, deployment, and image storage.\n* Artifact Registry is the newer method for storing Docker images on GCP.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felew-dev%2Fflask-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felew-dev%2Fflask-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felew-dev%2Fflask-web-app/lists"}