| name | flux-deployment |
| description | Deploy and troubleshoot Flux GitOps configurations for Pi K3s cluster. Use when deploying Kustomizations, managing HelmReleases, debugging Flux sync issues, or committing and pushing changes. |
| allowed-tools | Bash, Read, Grep, Glob, Edit, Write |
Flux GitOps Deployment
MCP Quick Actions (USE FIRST)
| Operation | MCP Tool |
|---|
| Flux sync status (Kustomizations + HelmReleases) | get_flux_status |
| Force reconciliation | reconcile_flux(resource="type/namespace/name") |
| ExternalSecret sync status | get_secrets_status |
| Force secret resync | refresh_secret(namespace, name) |
When to Use This Skill
Use this skill when:
- Deploying new Flux Kustomizations or HelmReleases
- Troubleshooting failed deployments or sync issues
- Reconciling Flux resources manually
- Adding new services to the GitOps workflow
- Debugging ExternalSecret synchronization issues
Environment
export KUBECONFIG=~/dev/pi-cluster/kubeconfig
Key Commands
flux get all
flux get kustomizations
flux get helmrelease -A
flux reconcile source git flux-system
flux reconcile kustomization <name>
flux reconcile helmrelease <name> -n <namespace>
kubectl describe kustomization <name> -n flux-system
kubectl logs -n flux-system deploy/kustomize-controller
kubectl logs -n flux-system deploy/helm-controller
kubectl logs -n flux-system deploy/source-controller
flux get source git flux-system
Dependency Chain
The cluster uses this order (defined in flux-system/infrastructure.yaml):
- external-secrets → ESO operator + CRDs
- external-secrets-config → ClusterSecretStore (depends on #1)
- ingress → nginx-ingress controller
- cert-manager → cert-manager CRDs + controllers
- cert-manager-config → ClusterIssuers + Cloudflare secret (depends on #2, #4)
- pihole → ExternalSecret + workloads (depends on #2)
- monitoring → kube-prometheus-stack (depends on #2, #3, #5)
- uptime-kuma → Status page (depends on #2, #3, #5)
- homepage → Dashboard (depends on #3, #5)
- external-services → Reverse proxies (depends on #3, #5)
- backup-jobs → Weekly backups (depends on #6, #7, #8)
Adding New Service to Flux
- Create directory:
clusters/pi-k3s/<service-name>/
- Add manifests: namespace, deployment, service, ingress, etc.
- Create
kustomization.yaml listing all resources
- Add Kustomization to
flux-system/infrastructure.yaml with proper dependsOn
- Commit and push
- Reconcile:
flux reconcile source git flux-system
Common Issues
Kustomization Stuck "Not Ready"
kubectl describe kustomization <name> -n flux-system
HelmRelease Failing
kubectl describe helmrelease <name> -n <namespace>
helm history <name> -n <namespace>
ExternalSecret Not Syncing
kubectl get clustersecretstores
kubectl describe clustersecretstore onepassword
kubectl get externalsecrets -A
kubectl describe externalsecret <name> -n <namespace>
kubectl logs -n external-secrets deploy/external-secrets
Git Not Syncing
flux get source git flux-system
flux reconcile source git flux-system
kubectl logs -n flux-system deploy/source-controller
Deployment Checklist