Submit feedback on
Orphaned Kubernetes Resources
We've received your feedback.
Thanks for reaching out!
Oops! Something went wrong while submitting the form.
Close
Orphaned Kubernetes Resources
Yonah Dissen
Service Category
Compute
Cloud Provider
AWS
Service Name
AWS EKS
Inefficiency Type
Orphaned Resource
Explanation

In Kubernetes environments, resources such as ConfigMaps, Secrets, Services, and Persistent Volume Claims (PVCs) are often created dynamically by applications or deployment pipelines. When applications are removed or reconfigured, these resources may be left behind if not explicitly cleaned up. Over time, they accumulate as orphaned resources — not referenced by any live workload.

Some of these objects, like PVCs or Services of type LoadBalancer, result in active infrastructure that continues to incur cloud charges (e.g., retained EBS volumes or unused Elastic Load Balancers). Even lightweight objects like ConfigMaps and Secrets bloat the API server’s object store, causing latency and impacting deployments/scaling,, clutter the control plane, and complicate configuration management. This issue is especially common during cluster upgrades, namespace decommissioning, and workload migrations.

Relevant Billing Model

EKS clusters incur cost through the underlying compute (e.g., EC2 or Fargate), attached storage (e.g., EBS volumes via Persistent Volume Claims), and any provisioned networking resources (e.g., Load Balancers from Services).

While Kubernetes control plane costs are fixed, orphaned objects such as ConfigMaps, Secrets, Services, or PVCs can indirectly consume billable cloud infrastructure — especially when Services create load balancers or PVCs retain EBS volumes. These costs persist even if the associated workloads have been deleted.

Detection
  • Review the cluster for Kubernetes objects not referenced by any current Deployment, StatefulSet, or Pod
  • Identify Persistent Volume Claims that are not mounted by any active workload
  • Check for Services that no longer correspond to live endpoints or backing workloads
  • Evaluate whether orphaned Services are still fronting AWS Load Balancers
  • Identify ConfigMaps or Secrets with old creation timestamps and no recent pod mounts
  • Confirm that none of the orphaned resources are linked to active CronJobs, Jobs, or custom controllers
Remediation
  • Delete orphaned Persistent Volume Claims to release underlying storage (e.g., EBS volumes)
  • Remove unused Services, especially those of type LoadBalancer, to eliminate unnecessary networking charges
  • Clean up ConfigMaps and Secrets that are no longer referenced by any active workloadImplement tagging/labeling standards for all workloads to simplify orphan detection.
  • Incorporate automated cleanup routines into CI/CD pipelines or periodic governance processesSchedule periodic audits after cluster upgrades or namespace deletions to prevent accumulation
  • Relevant Documentation
  • https://aws.amazon.com/eks/pricing/
  • https://aws.amazon.com/ebs/pricing/
  • https://kubernetes.io/docs/concepts/storage/persistent-volumes/
  • https://aws.amazon.com/elasticloadbalancing/pricing/
  • https://kubernetes.io/docs/concepts/services-networking/service/
  • https://kubernetes.io/docs/concepts/overview/kubernetes-api/
  • https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
  • https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/
Relevant Documentation
Submit Feedback