This is a simple Python Flask web application packaged as a Docker container and deployed to Kubernetes with a Helm chart. The repository also includes Argo CD application configuration for GitOps-style deployment and Terraform configuration to provision a local Minikube cluster.
The app serves a simple webpage at the root route (/). It is designed as a lightweight demo for containerization, Helm-based Kubernetes deployment, and GitOps deployment with Argo CD.
app.py- Flask application source code.Dockerfile- Builds a container image for the Flask app.argocd-app.yaml- Argo CDApplicationmanifest that syncs the Helm chart from this repository.devops-project-app/- Helm chart for deploying the application into Kubernetes.Chart.yaml- Helm chart metadata.values.yaml- Default chart values.templates/- Kubernetes manifest templates for Deployment, Service, Ingress, ServiceAccount, HPA, and notes.
terraform-configs/- Terraform configuration for provisioning a local Minikube cluster.main.tf- Defines the Minikube provider and a local Minikube cluster resource.provider.tf- Terraform provider configuration.backend.tf- Terraform backend config.variables.tf- Terraform variables.argocd.tf- Argo CD-related or supporting infrastructure config.
The Dockerfile builds the app using python:3.12-slim, installs flask, and launches the app on port 5000.
Build and run locally:
docker build -t devops-project:latest .
docker run -p 5000:5000 devops-project:latestThe Helm chart in devops-project-app/ deploys the Flask app to Kubernetes.
templates/deployment.yaml- Creates a Deployment with configurable replicas, image, port, probes, resources, and pod settings.templates/service.yaml- Exposes the app as a KubernetesService.
argocd-app.yaml defines an Argo CD Application that tracks this repository and deploys the Helm chart from devops-project-app.
This enables Argo CD to automatically reconcile the deployed application with the Git repository state.
The terraform-configs/ directory contains Terraform definitions for a local Minikube cluster.
- Uses the
scott-the-programmer/minikubeTerraform provider. - Creates a Minikube cluster named
devops-projectusing the Docker driver. - Enables addons:
default-storageclassandstorage-provisioner.
This setup is useful for local Kubernetes development and testing.
- Docker
- Kubernetes cluster or Minikube
- Helm
- Terraform
- Argo CD
From the repository root:
helm install devops-project ./devops-project-appIf the chart was already installed:
helm upgrade devops-project ./devops-project-appFrom terraform-configs/:
cd terraform-configs
terraform init
terraform applyApply the Argo CD application manifest:
kubectl apply -f argocd-app.yamlThen sync or monitor the application in the Argo CD UI.
- The chart uses a default
ClusterIPservice and does not enable ingress by default. - The application is intentionally minimal and suited for learning containerization, Helm deployment, and GitOps workflows.
- The Argo CD manifest is configured for automated sync with pruning and self-healing.