Thanks for the plugin! It's really convenient to have this instead of running :terminal to work with k8s in vim.
I work with a number of clusters that do not have a default serviceaccount. However, to fetch the active namespace for all kubectl commands, the plugin uses the command:
" Get currently active namespace
fun! vimkubectl#kube#fetchActiveNamespace() abort
return system(
\ s:craftCmd('get sa default -o ''jsonpath={.metadata.namespace}''')
\ )
endfun
I also can't find a way to explicitly set the namespace when running a given command, so I don't think there's a workaround to this problem.
However, it's also possible to use this command to get the current namespace from local kube context:
I'm suggesting replacing the current fetchActiveNamespace implementation with this config view command because it doesn't rely on certain service accounts existing.
Thanks for the plugin! It's really convenient to have this instead of running
:terminal
to work with k8s in vim.I work with a number of clusters that do not have a default serviceaccount. However, to fetch the active namespace for all kubectl commands, the plugin uses the command:
I also can't find a way to explicitly set the namespace when running a given command, so I don't think there's a workaround to this problem.
However, it's also possible to use this command to get the current namespace from local kube context:
I'm suggesting replacing the current fetchActiveNamespace implementation with this
config view
command because it doesn't rely on certain service accounts existing.