-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feature request: ability to set the current context to "none". #3
Comments
Hi @stremblay Thanks |
I'll be modifying this code Lines 50 to 52 in d0f6e22
to the following function switch_context($context) {
if ($context -eq 'n/a') {
kubectl config set-context no-context
kubectl config use-context no-context
}
else {
kubectl config use-context $context
}
}
I'm using the
|
Hi @stremblay Thanks. |
Amazing! Thank you! I will update immediately and let you know. :) |
In case you want to make your tool as similar to the Linux kubectx, I think they use a flag such as -u --unset which I just found out was added last year. This could be an alternative as well. |
I like the |
Hello!
First, I love the fact that you ported kubectx to PowerShell. This is really cool!
I would love to have a feature to set the context to "none" or empty. Is that possible? This would help to potentially avoid running commands by accident using the history and messing up a customer's production environment cluster for example.
Regards,
Stéphane
The text was updated successfully, but these errors were encountered: