kubetrim

Automatically trim and clean up your KUBECONFIG file

brewmacoslinux
Try with needOr install directly
Source

About

Trim your KUBECONFIG automatically

Commands

kubetrim

Examples

Remove unused clusters, contexts, and users from KUBECONFIG$ kubetrim
Trim KUBECONFIG and show what will be removed$ kubetrim --dry-run
Trim specific KUBECONFIG file$ kubetrim --kubeconfig /path/to/kubeconfig