Why GitOps Doesn't Mean Clean: The Blind Spot in Your Cluster Strategy
GitOps handles creation perfectly but fails at deletion. Discover how KorPro identifies the 'Shadow Cluster' of orphaned resources, unconnected Helm configs, and human-created leftovers.
Why GitOps Doesn't Mean Clean: The Blind Spot in Your Cluster Strategy
Is your "Source of Truth" lying to you?
If you run a mature Kubernetes platform, you likely rely on GitOps (ArgoCD, Flux) as your single source of truth. The mantra is simple: If it's in Git, it's in the cluster. If it's not in Git, it's not in the cluster.
This is a dangerous misconception.
In reality, Kubernetes clusters accumulate "digital dust"—orphaned resources that evade GitOps garbage collection due to safety configurations, dynamic provisioning, and the most unpredictable variable of all: Humans.
This post explores the "Shadow Cluster" that exists behind your clean GitOps dashboard and how KorPro closes the loop.
The Human Factor: Shadow IT & "Just One Quick Fix"
The biggest myth in GitOps is that kubectl access is dead. In high-pressure enterprise environments, engineers still interact with the cluster directly.
The "3 AM Firefight" Scenario
A senior engineer is debugging a production outage. They don't have time to commit, push, and wait for the Argo/Flux sync loop.
- They run specific commands to inspect network traffic.
- They manually create a LoadBalancer to bypass a failing Ingress.
- The fire is put out. The ticket is closed. The engineer goes to sleep.
The Fallout: Your GitOps controller is likely configured to ignore these "unmanaged" resources to avoid accidentally deleting valid external secrets or storage.
Result: That debug pod and LoadBalancer live forever. They are Ghost Resources—invisible to Git, but costing real money in cloud compute and IP allocation every hour.
The Technical Leaks: Where GitOps Fails to Prune
Even when your team follows strict GitOps protocols and no humans touch the cluster, the manifests themselves can create waste that GitOps cannot detect.
1. The "Unconnected" Helm Resource
This is a silent killer because the resource is in Git, so the platform team assumes it is valid.
- The Scenario: A developer updates a Helm chart to add a feature. They define a new Secret in the templates or add a PersistentVolumeClaim to values.yaml.
- The Mistake: They forget to actually mount that Secret or Volume in the Deployment spec.
- The GitOps Blind Spot: ArgoCD sees valid YAML and syncs it. The status is "Healthy."
- The Reality: You now have a Secret sitting in etcd or a PVC reserving storage that is functionally useless. It is orphaned from birth, despite being fully "GitOps controlled."
2. The "Prune: False" Trap
Many teams explicitly disable pruning in their GitOps configuration to prevent accidental data loss during bad syncs.
yaml# ArgoCD Application Example apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: critical-database spec: syncPolicy: automated: prune: false # <--- The Leak Creator selfHeal: true
- The Scenario: You delete a ConfigMap or Service from the Git repository.
- The Reality: ArgoCD sees the file is gone. But because
pruneis disabled (often set on critical namespaces likeprod), it ignores the deletion in the cluster. - The Result: The resource becomes an orphan. It is no longer managed by Git, but it persists in the cluster indefinitely.
3. The Dynamic Resource Gap (PVCs)
GitOps manages manifests, but it doesn't always manage the side effects of those manifests.
- The Scenario: You deploy a StatefulSet. Kubernetes dynamically provisions a PersistentVolumeClaim (PVC) based on a StorageClass.
- The Leak: You delete the StatefulSet from Git. The Pods vanish. However, to prevent data loss, the underlying StorageClass often defaults to
Retain.
yaml# StorageClass Example apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: gp2-retain provisioner: kubernetes.io/aws-ebs reclaimPolicy: Retain # <--- The Cost Generator
- The Cost: Even though the application is gone, the EBS volume remains active, billing you hourly for data associated with an application you deleted months ago.
Why GitOps Needs an Audit Layer (Enter KorPro)
While open-source tools can spot-check a single namespace, enterprise platform teams need a governance layer that spans the entire fleet.
KorPro is designed to answer the questions GitOps doesn't ask. It doesn't check if a resource exists (Argo does that); it checks if a resource is used.
1. Multi-Cluster Financial Visibility
Searching for waste one cluster at a time is impossible at scale.
- KorPro Solution: A unified dashboard that aggregates "Waste Cost" across Dev, Staging, and Prod.
- The Value: Instantly see that Cluster-A has significant unused EBS volumes (PVCs) while Cluster-B is clean.
2. Automated "Drift" Detection
GitOps detects configuration drift (Cluster is not equal to Git). KorPro detects usage drift (Resource is not equal to Used).
- KorPro Solution: Continuous scanning that flags:
- Services with no active endpoints.
- Ingresses pointing to non-existent services.
- ServiceAccounts not assigned to any workload.
- Secrets not mounted in any active Pod.
3. Compliance & Security Hardening
Unused resources are not just trash; they are attack vectors.
- The Risk: An old Secret containing API keys or a RoleBinding with elevated permissions that was left behind after a POC.
- KorPro Solution: Generate compliance reports proving that no orphaned credentials exist in your environment.
Moving from "Assumed Clean" to "Proven Clean"
GitOps handles the Creation and Update lifecycle perfectly. But it is blind to the Deletion lifecycle of unmanaged resources and the Validity of unconnected resources.
KorPro closes this loop.
By integrating KorPro into your platform, you shift from hoping your clusters are efficient to proving it.
- Stop paying for Ghost Resources.
- Eliminate "Shadow IT" leftovers.
- Validate that your Helm charts are actually connecting the resources they create.
Don't let your "Source of Truth" lie to you. Audit your fleet today at korpro.io.
Related Articles
Finding Unused Kubernetes Secrets: How Kor Detects Orphaned Secrets
Discover how Kor identifies orphaned Kubernetes Secrets by building a full reference graph across workloads, helping reduce security risks and operational uncertainty.
How to Calculate Kubernetes Cost Savings
Learn how to accurately calculate potential cost savings from Kubernetes resource optimization and make data-driven decisions.
Kubernetes Security: Identifying Orphaned Secrets and ConfigMaps
Learn how orphaned Secrets and ConfigMaps pose security risks and how to identify and remediate them effectively.
Written by
Yonah Dissen