Linux command
k8s-unused-secret-detector 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Detect unused secrets in cluster
k8s-unused-secret-detector
Check specific namespace
k8s-unused-secret-detector -n [namespace]
Detect and delete unused secrets in a namespace
k8s-unused-secret-detector -n [namespace] | kubectl delete secret -n [namespace]
说明
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 as an alternative.
参数
- -n _namespace_
- Check specific namespace.
- --context _context_
- Specify the kubectl context to use.
FAQ
What is the k8s-unused-secret-detector command used for?
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 as an alternative.
How do I run a basic k8s-unused-secret-detector example?
Run `k8s-unused-secret-detector` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n _namespace_ do in k8s-unused-secret-detector?
Check specific namespace.