omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
928 stars 71 forks source link

ktunnel should honor kubectl env var for setting the active config #15

Closed fieldju closed 4 years ago

fieldju commented 4 years ago

export KUBECONFIG=${HOME}/.kube/dev-west.yaml

When I use ktunnel I get the following error

ERRO[0000] Failed getting kubernetes config: stat /Users/fieldju/.kube/config: no such file or directory

I would expect kubectl and ktunnel to use the same env var for choosing what config to use.

Found this: https://github.com/omrikiei/ktunnel/blob/53579ccf9fd56e3ca0efa012249e0b6fcab425df/pkg/k8s/common.go#L38

Is that a typo or intentional?

Right now for me to use kubectl and ktunnel I need to set 2 env vars

export KUBECONFIG=${HOME}/.kube/dev-west.yaml
export KUBE_CONFIG=$KUBECONFIG
omrikiei commented 4 years ago

it's a typo, it shall be fixed soon

omrikiei commented 4 years ago

released in v1.2.2