-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ns-inspect plugin #4135
base: master
Are you sure you want to change the base?
Add ns-inspect plugin #4135
Conversation
- This plugin checks Kubernetes namespaces for resources and allows users to delete empty namespaces. - Inspect if there is useless namespace and optionally delete it
The committers listed above are authorized under a signed CLA. |
🤖 Beep beep! I’m a robot speaking on behalf of @ahmetb. 🤖 Thanks for submitting your kubectl plugin to Krew! In the meanwhile, here are a few tips to make your plugin manifest better:
Thanks for your patience! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Rookie0031 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @Rookie0031! |
Yeah I'm afraid |
Got it, but I wanted to highlight a few differences:
2.Feature Differentiation: My plugin focuses on assessing specific resource types, helping users manage namespaces more effectively, whereas kubectl get-all can be overwhelming with too much information. Please consider the points above ! |
Description
This PR adds the kubectl-ns-inspect plugin to the Krew index. kubectl-ns-inspect is a utility plugin that inspects all the namespaces in current Kubernetes cluster and see if it contains any resources (e.g., Pods, Services, ConfigMaps, ResourceQuotas, etc.) judge it is useless or not.
If the namespace is deemed useless (there is no Pod, Service, ResourceQuotas), the plugin can optionally prompt the user to delete the namespace.
Features
1. Namespace Resource Inspection:
If a namespace is considered useless, the plugin lists all remaining resources within the namespace and prompts the user to delete it.
2. Dry-run Option:
3. Current Context-Based Operation:
It uses the context specified in the KUBECONFIG environment variable, or defaults to $HOME/.kube/config if the variable is not set.
Usage
Check