LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

k8s-unused-secret-detector

identifies Kubernetes secrets that are not referenced by any pods

TLDR

Detect unused secrets in cluster
$ k8s-unused-secret-detector
copy
Check specific namespace
$ k8s-unused-secret-detector -n [namespace]
copy
Detect and delete unused secrets in a namespace
$ k8s-unused-secret-detector -n [namespace] | kubectl delete secret -n [namespace]
copy

SYNOPSIS

k8s-unused-secret-detector [options]

DESCRIPTION

k8s-unused-secret-detector detects unused Kubernetes Secrets that are no longer referenced by any resources. Outputs secret names to stdout, which can be piped to kubectl for deletion. Note: this project is archived and no longer maintained; consider [kubectl-reap](https://github.com/micnncim/kubectl-reap) as an alternative.

PARAMETERS

-n namespace

Check specific namespace.
--context context
Specify the kubectl context to use.

SEE ALSO

kubectl(1), k9s(1)

Copied to clipboard
Kai