ahmetb / kubectx

Faster way to switch between clusters and namespaces in kubectl
https://kubectx.dev
Apache License 2.0
17.66k stars 1.26k forks source link

Delete context with cluster and user #409

Open zcahana opened 10 months ago

zcahana commented 10 months ago

Adds an option to delete contexts including their referenced cluster and user entries from the clusters/users lists.

The cluster and user entries are only deleted if they are no longer referenced in any other context (i.e., "orphaned").

The new option is exposed via a new CLI flag, -D, alongside the original flag (-d) which retains its existing functionality of deleting the context only.


Closes #202.

Implementation notes

Testing notes

zcahana commented 9 months ago

@ahmetb hi, did you happen to have a chance to look at this? I'm wondering if this is something that may be of interest for this project.