Skip to content

Detect unused k8s ConfigMaps and Secrets in your cluster

License

Notifications You must be signed in to change notification settings

DalianisDim/keyvalDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keyvalDetector

keyvalDetector scans your Kubernetes cluster to identify ConfigMaps and Secrets that are not utilized by any running pods. It displays the names of ConfigMaps and Secrets that are not mounted by any pod and those whose contents are not being used to populate environment variables using envFrom or valueFrom.

Installation

Binary

Binaries for Linux or OS X can be found in GitHub releases page. You can use curl or wget to download it. Don't forget to chmod +x the file!

Usage

keyvalDetector uses the current Kubernetes context by default, therefore in its simplest form it can be ran without any flag:

keyvalDetector

Screenshot 2023-06-05 at 12 39 58

Available flags

keyvalDetector [flags]

Flags:
  -h, --help            help for keyvalDetector
  -v, --version         Print the version and exit.

Future plans

  • Allow selection of context from available contexts in ~/.kube/config
  • Delete unused ConfigMaps & Secrets