Repository navigation
Application Deployment
This document explains how applications are structured and deployed in this cluster using the GitOps approach.
Applications in this repository are organized in two main directories:
- manifests/: Contains Kubernetes manifests for all applications
- argocd/: Contains ArgoCD application definitions that point to the manifests
The manifests/ directory is organized by application:
manifests/
├── cert-manager/ # Certificate management
├── csi-driver-nfs/ # NFS storage driver
├── estimator/ # Custom application
├── grafana-operator/ # Monitoring visualization
├── homeassistant/ # Home automation
├── job-countdown/ # Custom application
├── kubernetes-dashboard/ # Kubernetes management UI
├── mainsail/ # 3D printer interface
├── metallb/ # Load balancer
├── node-exporter/ # System metrics collection
├── nst/ # Custom application
├── papermc/ # Minecraft server
├── system-upgrade-controller/ # K3s upgrades
├── traefik/ # Ingress controller
└── transmission/ # BitTorrent client
Each application directory contains all the necessary resources for that application, such as:
- Deployments/StatefulSets
- Services
- ConfigMaps/Secrets
- PersistentVolumeClaims
- Ingress/IngressRoutes
Applications are defined in the argocd/ directory, organized by category:
argocd/
├── default/ # General applications
├── infra/ # Infrastructure components
├── meta/ # ArgoCD bootstrap
├── monitoring/ # Monitoring stack
├── smarthome/ # Home automation
└── workloads/ # User workloads
Each application is defined in a YAML file with this structure:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-name
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/lexfrei/k8s.git
targetRevision: HEAD
path: manifests/app-name
destination:
server: https://kubernetes.default.svc
namespace: app-namespace
syncPolicy:
automated:
prune: true
selfHeal: true-
Add Application Manifests:
- Create a new directory in
manifests/for your application - Add all Kubernetes resource definitions
- Create a new directory in
-
Create ArgoCD Application:
- Add an Application definition in the appropriate
argocd/directory - This will tell ArgoCD where to find the manifests and where to deploy them
- Add an Application definition in the appropriate
-
Commit and Push:
- Commit changes to Git and push to the repository
- ArgoCD automatically detects the changes and applies them
-
Monitor Deployment:
- ArgoCD UI shows the deployment status
- Check application health and resource status
Located in manifests/homeassistant/:
- StatefulSet for persistent application
- Service for network access
- PVC for data storage
- IngressRoute for web access
Located in manifests/papermc/:
- Deployment for the Minecraft server
- Service with specific ports
- PVC for world data
- ConfigMap for server properties
Applications in this cluster can be categorized as:
-
Infrastructure: Components that support the cluster itself
- MetalLB, Traefik, cert-manager, etc.
-
System Tools: Management and monitoring tools
- Kubernetes Dashboard, node-exporter, etc.
-
Smart Home: Home automation applications
- HomeAssistant
-
Media/Entertainment: Media and game servers
- PaperMC, Transmission