kinvolk/kube-spawn

Provide kubectl

Closed this issue · 2 comments

kube-spawn makes it really easy to get and launch local k8s for newbies but users most likely also want to have a kubectl binary to interact with the cluster. Currently AFAIK you are expected to get that yourself and most people would just get it from their distro and that will likely not have all the feature/parameters that the k8s fetched by kube-spawn will have.

So it would be nice if kube-spawn could also get the kubectl for users or at least make it easy to install the latest one.

Isn't kubectl installed in /var/lib/kube-spawn/k8s/kubectl? You could just adjust your PATH to point there.

alban commented

For me it is in:

/var/lib/kube-spawn/default/rootfs/usr/bin/kubectl

But the path depends on the cluster name...

I think it is fine if users has to get kubectl themselves, but the README has to be updated to explain how to do that.

Example:

curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x /usr/local/bin/kubectl