Environments
This is a home Kubernetes lab setup with a single dev environment.
Environment Structure
cluster/
└── dev/
├── config.yaml # Dev environment config
└── argocd-values.yaml # ArgoCD Helm values
Configuration Files
cluster/dev/config.yaml
clusterEnv: dev
clusterPath: cluster/dev
repoURL: https://github.com/simran2491/k8s-playground-cluster
targetRevision: main
argocd:
version: "9.4.10"
apps:
argocd-project:
enabled: true
namespace-manager:
enabled: true
destinationNamespace: default
cert-manager:
enabled: true
version: "1.17.2"
metallb:
enabled: true
version: "0.14.8"
nginx-ingress:
enabled: true
version: "4.11.3"
external-dns:
enabled: true
version: "1.15.0"
provider: cloudflare
domain: ssdk8s.xyz
cluster-configs:
enabled: true
local-path-provisioner:
enabled: true
version: "v0.0.34"
kube-prometheus-stack:
enabled: true
version: "68.0.0"
loki:
enabled: true
version: "6.55.0"
grafana-alloy:
enabled: true
version: "0.10.0"
istio:
enabled: true
version: "1.24.0"
gatekeeper:
enabled: true
version: "3.22.0"
gatekeeper-policies:
enabled: true
pi-hole:
enabled: true
destinationNamespace: pihole
sealed-secrets:
enabled: true
version: "2.18.4"
# promtail:
# enabled: true
# version: "6.17.1"
# prometheus-operator-crds:
# enabled: true
# version: "27.0.0"
# grafana:
# enabled: true
# version: "8.5.0"
Key Configuration Options
| Field | Description |
|---|---|
clusterEnv | Environment identifier (dev) |
clusterPath | Path to environment config directory |
repoURL | Git repository URL |
targetRevision | Git branch or tag to deploy |
argocd.version | ArgoCD Helm chart version |
apps.<name>.enabled | Enable/disable specific app |
apps.<name>.version | App-specific Helm chart version |
apps.<name>.destinationNamespace | Target namespace for the app |
Environment Configuration
This is a home lab setup with two environments:
Dev Environment (Production-Ready)
| Feature | Configuration |
|---|---|
| Purpose | Primary environment for all workloads |
| Domain | ssdk8s.xyz |
| TLS | Let's Encrypt production |
| Monitoring | Full Prometheus + Grafana stack |
| Logging | Loki + Grafana Alloy |
| Ad-blocking | Pi-hole for network-wide ad blocking |
| Service Mesh | Istio for traffic management |
| Policy Engine | OPA Gatekeeper for admission control |
| Secret Management | Sealed Secrets for GitOps workflows |
QA Environment (Minimal)
| Feature | Configuration |
|---|---|
| Purpose | Testing environment with minimal components |
| Components | ArgoCD, cert-manager, MetalLB, NGINX Ingress |
| Domain | Not configured yet |
| TLS | Let's Encrypt (cert-manager ready) |
| Monitoring | Not enabled |
| Logging | Not enabled |
The QA environment currently includes:
- ArgoCD Repos
- namespace-manager
- cert-manager (v1.17.2)
- MetalLB (v0.14.8)
- NGINX Ingress (v4.11.3)
- cluster-configs
Deploying to Environments
Deploy to Dev
make deploy ENV=dev
Deploy Specific Version
make deploy ENV=dev VERSION=v1.0.0
Environment-Specific Values
App-specific values can override defaults:
config/
└── dev/
└── applications/
├── namespace-manager-values.yaml
└── my-app-values.yaml
Example: Different Image Tags
config/dev/applications/my-app-values.yaml:
image:
repository: myorg/my-app
tag: latest
replicaCount: 1
config/qa/applications/my-app-values.yaml:
image:
repository: myorg/my-app
tag: v1.2.0
replicaCount: 2
Best Practices
- Version pinning - Pin chart versions for reproducibility
- GitOps workflow - Always use Git tags for deployments
- Secret management - Keep secrets out of Git, use Kubernetes secrets or external secret managers
- Resource limits - Set appropriate resource requests and limits for home hardware
- Regular backups - Backup etcd and critical application data