{"id":50993245,"url":"https://github.com/a9mansoo/kubernetes-app-demo","last_synced_at":"2026-06-20T05:32:31.544Z","repository":{"id":359016127,"uuid":"1237207806","full_name":"a9mansoo/kubernetes-app-demo","owner":"a9mansoo","description":"Demo of Continuous CI/CD for a kubernetes application","archived":false,"fork":false,"pushed_at":"2026-05-20T05:34:40.000Z","size":5241,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-20T05:43:02.966Z","etag":null,"topics":["docker","fastapi","k8s-deployment","mui","nginx","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a9mansoo.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T01:24:48.000Z","updated_at":"2026-05-20T05:34:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/a9mansoo/kubernetes-app-demo","commit_stats":null,"previous_names":["a9mansoo/kubernetes-app-demo"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/a9mansoo/kubernetes-app-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a9mansoo%2Fkubernetes-app-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a9mansoo%2Fkubernetes-app-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a9mansoo%2Fkubernetes-app-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a9mansoo%2Fkubernetes-app-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a9mansoo","download_url":"https://codeload.github.com/a9mansoo/kubernetes-app-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a9mansoo%2Fkubernetes-app-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34558894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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","fastapi","k8s-deployment","mui","nginx","react"],"created_at":"2026-06-20T05:32:30.897Z","updated_at":"2026-06-20T05:32:31.535Z","avatar_url":"https://github.com/a9mansoo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Repository Health:\n\n[![Backend Stats](https://github.com/a9mansoo/kubernetes-deployment/actions/workflows/python-workflow.yml/badge.svg)](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/python-workflow.yml\n)\n[![Frontend Stats](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/react-workflow.yml/badge.svg\n)](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/react-workflow.yml\n)\n[![Image Stats](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/build-project.yml/badge.svg\n)](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/build-project.yml\n)\n[![Deployment Stats](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/deploy-k8s.yml/badge.svg\n)](\nhttps://github.com/a9mansoo/kubernetes-deployment/actions/workflows/deploy-k8s.yml\n)\n\n---\n\n# Kubernetes Deployment Demo Platform\n\nA production-style demo platform showcasing CI/CD automation, containerized applications, Kubernetes deployments, and infrastructure-focused development workflows.\n\n---\n\n## Overview\n\nThis project demonstrates how modern applications are built, validated, packaged, and deployed using DevOps practices commonly used in production environments.\n\nThe repository contains:\n\n* A containerized FastAPI backend\n* A React frontend\n* GitHub Actions CI/CD pipelines\n* Docker image build and publishing workflows\n* Kubernetes manifests managed with Kustomize\n* Automated release generation\n* Environment separation for development and production deployments\n\nThe goal is not application complexity — it is to demonstrate **real-world delivery and deployment engineering practices**.\n\n---\n\n# Architecture\n\n```text\n┌──────────────────────┐\n│     React Frontend   │\n│  (NodePort Service)  │\n└──────────┬───────────┘\n           │\n           ▼\n┌──────────────────────┐\n│   FastAPI Backend    │\n│  (ClusterIP Service) │\n└──────────┬───────────┘\n           │\n           ▼\n┌──────────────────────┐\n│ Kubernetes Cluster   │\n│     (Minikube)       │\n└──────────────────────┘\n```\n\n---\n\n# Repository Structure\n\n```text\n.\n├── backend/\n├── frontend/\n├── docker/\n├── k8s/\n│   ├── app/\n│   ├── environments/\n│   │   ├── dev/\n│   │   └── prod/\n├── .github/\n│   └── workflows/\n└── README.md\n```\n\n---\n\n# Features\n\n## CI/CD Pipelines\n\nThis project includes multiple GitHub Actions workflows:\n\n* reusable Docker build workflow\n* backend validation workflow\n  * formatting validation (`black`)\n  * linting (`ruff`)\n  * automated tests (`pytest`)\n  * Python code coverage reporting\n* frontend React validation workflow\n  * dependency installation\n  * frontend build validation\n  * linting and static analysis\n* build + publish pipelines\n* automated release generation\n* concurrency-controlled workflows to prevent stale CI executions\n\n---\n\n## 🚀 Deployment Validation Workflow (Minikube Demo)\n\nThis is a **manually triggered production-style deployment validation pipeline** that runs a full Kubernetes deployment inside CI and validates it end-to-end.\n\n---\n\n### Trigger\n\n* Manual execution via GitHub Actions\n* Uses `workflow_dispatch`\n* Runs under the `production` GitHub Environment\n\n---\n\n### 1. Ephemeral Cluster Setup\n\n* Spins up a fresh Minikube cluster inside CI\n* Ensures reproducible, isolated execution\n* No external infrastructure dependencies\n\n---\n\n### 2. Namespace \u0026 Deployment\n\n* Creates production namespace\n* Applies Kubernetes manifests using Kustomize:\n\n```text\nk8s/environments/prod\n```\n\n* Deploys:\n\n  * backend (FastAPI)\n  * frontend (React)\n\n---\n\n### 3. Rollout Verification\n\n* Waits for deployments to become healthy:\n\n  * backend rollout\n  * frontend rollout\n* Fails fast on timeout\n* Prints cluster state for debugging\n\n---\n\n### 4. Service Exposure\n\n* Exposes frontend using Minikube service tunneling\n* Resolves runtime-accessible URL inside CI\n\nThis ensures validation happens against a **real running system**, not just manifests.\n\n---\n\n### 5. End-to-End Smoke Test (Playwright)\n\nA headless browser test validates the full stack:\n\n* Launch Chromium in CI\n* Navigate to frontend URL\n* Wait for full network + rendering\n* Capture screenshot (`ui.png`)\n\nThis validates:\n\n* frontend rendering\n* backend connectivity\n* Kubernetes service routing\n* internal DNS resolution\n\n---\n\n### 6. Artifact Capture\n\n* Uploads UI screenshot as GitHub Actions artifact\n* Provides visual proof of deployment success\n* Enables debugging and auditability\n\n---\n\n### 7. Deployment Summary Report\n\nGenerates a CI summary including:\n\n* Kubernetes rollout status\n* service resolution status\n* smoke test result\n* overall pass/fail outcome\n* artifact link (if available)\n\nThis acts as an **automated deployment report inside GitHub Actions UI**.\n\n---\n\n### Why This Matters\n\nThis workflow demonstrates production-grade deployment validation:\n\n* ephemeral environments in CI\n* Kubernetes rollout gating\n* service-level validation\n* real end-to-end testing (not mock tests)\n* CI-based observability\n* GitHub Environments control\n\n---\n\n### What Makes This Different\n\nThis pipeline proves:\n\n* pods actually become healthy\n* services are reachable\n* frontend + backend integration works\n* UI actually renders\n* deployment is verifiably correct\n\n---\n\n# Backend Application\n\nFastAPI service providing:\n\n* health/readiness endpoints\n* demo user API\n* managed via `uv`\n\n---\n\n# Frontend Application\n\nReact application that:\n\n* fetches backend data\n* renders UI components\n* demonstrates Kubernetes service communication\n\n---\n\n# Containerization\n\n* Separate images for frontend and backend\n* Built in CI pipelines\n* Used for PR validation and release builds\n\n---\n\n# Kubernetes Deployment\n\nManaged using Kustomize:\n\n```text\nk8s/environments/dev\nk8s/environments/prod\n```\n\n### Resources:\n\n* backend: ClusterIP service (internal only)\n* frontend: NodePort service (external demo access)\n* service-to-service communication via Kubernetes DNS\n\n---\n\n# DevOps Concepts Demonstrated\n\n* GitHub Actions CI/CD pipelines\n* reusable workflows\n* Kubernetes deployments\n* Kustomize environment separation\n* ephemeral CI environments\n* automated release pipelines\n* PR validation gates\n* end-to-end smoke testing\n* deployment observability via artifacts\n* GitHub Environments usage\n\n---\n\n# Local Development\n\n## Requirements\n\n* Docker\n* Minikube\n* kubectl\n* Kustomize\n* Node.js\n* Python 3.12+\n* uv\n\n---\n\n# Running Locally\n\n## Backend\n\n```bash\ncd backend\nuv sync\nuv run fastapi dev\n```\n\n## Frontend\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n---\n\n# Kubernetes Deployment\n\n## Development\n\n```bash\nkubectl apply -k k8s/environments/dev\n```\n\n## Production\n\n```bash\nkubectl apply -k k8s/environments/prod\n```\n\n---\n\n# Example CI/CD Flow\n\n```text\nPR opened\n  ↓\nCI validation (lint, tests, docker builds)\n  ↓\nMerge to main\n  ↓\nTag release\n  ↓\nBuild + publish images\n  ↓\nOptional: Minikube deployment validation workflow\n  ↓\nArtifacts + deployment report generated\n```\n\n---\n\n# Why This Project Exists\n\nMost demo repos stop at “it runs”.\n\nThis project focuses on:\n\n* CI/CD correctness\n* deployment verification\n* environment consistency\n* release automation\n* real Kubernetes workflows\n* observable delivery pipelines\n\n---\n\n# Future Improvements\n\n* Helm charts\n* GitOps with ArgoCD\n* Prometheus + Grafana observability\n* Canary deployments\n* Terraform infrastructure provisioning\n* ingress controller setup\n* automated rollback on failure\n* metrics-based deployment gates\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa9mansoo%2Fkubernetes-app-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa9mansoo%2Fkubernetes-app-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa9mansoo%2Fkubernetes-app-demo/lists"}