I am using mac. When I try kubectl edit it opens on default vi editor but I cant save it after making any change in Vi editor. I am not new to vi editor but for kubectl edit it just doest not let me save my changes.
I want to configure kubectl edit to open in sublime text. Please let me know how to make it work.
Sorry for the question. I found it. all i need to add KUBE_EDITOR=/usr/local/bin/sub in my bash_profile.
Adding KUBE_EDITOR=/usr/local/bin/sublime
in my bash_profile worked for me. However, the process forks and immediately cancels any changes made.
This was fixed by telling sublime to wait with -w flag. KUBE_EDITOR="/usr/local/bin/sublime -w"