Skip to main content

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

FieldDescription
clusterEnvEnvironment identifier (dev)
clusterPathPath to environment config directory
repoURLGit repository URL
targetRevisionGit branch or tag to deploy
argocd.versionArgoCD Helm chart version
apps.<name>.enabledEnable/disable specific app
apps.<name>.versionApp-specific Helm chart version
apps.<name>.destinationNamespaceTarget namespace for the app

Environment Configuration

This is a home lab setup with two environments:

Dev Environment (Production-Ready)

FeatureConfiguration
PurposePrimary environment for all workloads
Domainssdk8s.xyz
TLSLet's Encrypt production
MonitoringFull Prometheus + Grafana stack
LoggingLoki + Grafana Alloy
Ad-blockingPi-hole for network-wide ad blocking
Service MeshIstio for traffic management
Policy EngineOPA Gatekeeper for admission control
Secret ManagementSealed Secrets for GitOps workflows

QA Environment (Minimal)

FeatureConfiguration
PurposeTesting environment with minimal components
ComponentsArgoCD, cert-manager, MetalLB, NGINX Ingress
DomainNot configured yet
TLSLet's Encrypt (cert-manager ready)
MonitoringNot enabled
LoggingNot 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

  1. Version pinning - Pin chart versions for reproducibility
  2. GitOps workflow - Always use Git tags for deployments
  3. Secret management - Keep secrets out of Git, use Kubernetes secrets or external secret managers
  4. Resource limits - Set appropriate resource requests and limits for home hardware
  5. Regular backups - Backup etcd and critical application data