This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a multi-cluster Kubernetes GitOps repository managed with FluxCD v2. The architecture follows a hierarchical pattern: cluster → namespace → application, with encrypted secrets using SOPS and Age encryption.
kubernetes/cluster-0/- Primary production clusterkubernetes/nas-1/- Backup NAS cluster.taskfiles/- Task automation definitionsdocs/- Comprehensive documentation and guides
Each application follows this standardized structure:
apps/<namespace>/<app-name>/
├── app/ # Application resources
│ ├── helmrelease.yaml # Main Helm chart definition
│ ├── kustomization.yaml # Resource aggregation
│ ├── externalsecret.yaml # Secrets from 1Password
│ └── pvc.yaml # Additional storage
└── ks.yaml # Flux Kustomization
Flux Operations:
task flux:gr-sync # Sync all Flux GitRepositories
task flux:ks-sync # Sync all Flux Kustomizations
task flux:hr-sync # Sync all Flux HelmReleases
task flux:hr-suspend # Suspend all HelmReleases
task flux:hr-resume # Resume all HelmReleasesKubernetes Operations:
task k8s:validate # Validate all manifests with kubeconform
task k8s:validate-cluster # Validate specific cluster [CLUSTER=cluster-0]
task k8s:validate-app # Validate app [CLUSTER=cluster-0] [NS=required] [APP=required]
task k8s:validate-strict # Validate with strict mode and verbose output
task k8s:browse-pvc # Mount PVC to temp container [CLUSTER=cluster-0] [NS=default] [CLAIM=required]
task k8s:delete-failed-pods # Delete all failed podsOther Task Categories:
task externalsecrets:* # External Secrets operations
task rook:* # Rook-Ceph storage operations
task volsync:* # VolSync backup operations- Kubeconform validation: Configured with comprehensive CRD schemas (
.kubeconform.yaml) - MegaLinter CI: Runs actionlint, ansible-lint, kubeconform, markdownlint, yamllint, prettier
- Manual validation:
task k8s:validatevalidates all Kubernetes manifests
- SOPS encryption: All secrets encrypted at rest with Age keys
- External Secrets Operator: Runtime secret injection from 1Password
- Never commit unencrypted secrets or sensitive data
- FluxCD automatically syncs changes from this repository
- Hierarchical reconciliation with dependency management
- Pull request validation with kubeconform and linting
- Renovate automation for dependency updates
- FluxCD v2 - GitOps engine with OCI repositories
- Talos Linux - Kubernetes OS
- Cilium CNI - Networking with BGP and Gateway API
- Rook-Ceph - Distributed storage
- VolSync - PV backup/recovery
- External Secrets Operator - Secret management
- cert-manager - TLS automation
Default cluster is cluster-0. To work with different clusters, set CLUSTER variable:
CLUSTER=nas-1 task k8s:validate-cluster