kconnect
kconnect copied to clipboard
cannot modify kube context using kubectl to change the default namespace in the context
Describe the solution you'd like: When running kubectl/kubens command to change the default namespace to something else an error is thrown.
kubectl config set-context --namespace kube-public --current
error: converting to : type names don't match (Unknown, RawExtension), and no conversion 'func (runtime.Unknown, runtime.RawExtension) error' registered.
kubens kube-public
error: converting to : type names don't match (Unknown, RawExtension), and no conversion 'func (runtime.Unknown, runtime.RawExtension) error' registered.
error getting current namespace
Why do you want this feature: It will be convenient to skip namespace flag to every kubectl command by allowing to modify the default namespace in the current kube context
Thanks for raising this @kishoregv .
What version of kubectl are you using?
I am able to run kubectl config set-context --namespace kube-public --current
without getting the error. I will try kubens
kubectl version
k version --short
Client Version: v1.16.0
@kishoregv - i have done some testing and this is an issue with clients prior to v1.17.0. If you use kubectl (or anything that relies on client-go) from 1.17.0 onwards this will work.
@kishoregv @rajarajanpsj - do you think we should do a version check within kconnect? Perhaps we could have a kconnect doctor
or somethign similar that checks things like that?
This should be handled by #222 and #223