Why does "kubectl" in a cygwin shell ignore KUBECONFIG, but Go apps using same api work fine?
matthew patton
pattonme@yahoo.com
Fri Jun 27 18:47:28 GMT 2025
> In my Cygwin home, the ".kube" directory is a symlink to my Windows home
what KIND of symlink? If the old cygwin style or the current 'default', it doesn't work or rarely. I've replaced cygwin 'ln' with my own bash function wrapper that calls mklink.exe. that way windows tools can do the right thing.
I might also recommend you replace kubectl with a batch/shell file that resets $HOME to $USERPROFILE so you can dispense with trying to be cute.Other gotchas include GOPATH and such if the binary is windows but called within cygwin you gotta make sure you're not using cygwin/linux idioms for path delimiter. It has to be Windows style.
More information about the Cygwin
mailing list