Set KUBE_EDITOR to Visual Studio Code, assumes 'code' is in PATH export KUBE_EDITOR='code --wait' Running k edit ... will open up the yaml using Visual Studio Code.
Thanx you