Closed ghost closed 6 years ago
I'd say this is expected and it is shooting yourself in the foot.
To do a rename, we must first delete the existing context, then actually execute rename. The same issue would happen if your current context is "minikube" and you're doing kubectx minikube=.
, as this is the same thing.
I think it's not worth fixing this for now, so I'll close. The primary use case of rename is to shorten the context names.
Executed this command, and my minikube context was gone:
$ kubectx minikube=minikube Context "minikube" exists, deleting... error: cannot rename the context "minikube", it's not in ...