What happened:
kubectl throws command not found error post cluster creation using kind create cluster
What you expected to happen:
Should be able to run kubectl
How to reproduce it (as minimally and precisely as possible):
Download and add kind to path as mentioned below
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64"
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
Anything else we need to know?:
This is how I created the cluster
โ ~ kind create cluster --name hello-world --config=.kube/config
Creating cluster "hello-world" ...
โ Ensuring node image (kindest/node:v1.16.4) ๐ผ
โ Ensuring node image (kindest/node:v1.17.0) ๐ผ
โ Preparing nodes ๐ฆ ๐ฆ
โ Writing configuration ๐
โ Starting control-plane ๐น๏ธ
โ Installing CNI ๐
โ Installing StorageClass ๐พ
โ Joining worker nodes ๐
Set kubectl context to "kind-hello-world"
You can now use your cluster with:
kubectl cluster-info --context kind-hello-world
Thanks for using kind! ๐
โ ~ kubectl
zsh: command not found: kubectl
config file:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
image: kindest/node:v1.16.4@sha256:b91a2c2317a000f3a783489dfb755064177dbc3a0b2f4147d50f04825d016f55
Environment:
kind version): kind v0.7.0 go1.13.6 linux/amd64kubectl version): unabel to run kubectldocker info): 19.03.6-ce/etc/os-release):ah, you're going to need to install kubectl.
Thanks a lot @BenTheElder for pointing that out. That was silly of me. I thought, like minikube, this will also make kubectl available.
imho it's bad that our documentation assumes kubectl is available though, we should update it with a reference to this.
@bentheelder Created an PR for this.
โ ~ kubectl get nodes
The connection to the server localhost:8080 was refused - did you specify the right host or port?
โ ~ kind
/usr/local/bin/kind: 1: /usr/local/bin/kind: Not: not found
I installed kubectl and kind using the below instructions in documentation, I still get this error.
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
โ ~ kubectl get nodes The connection to the server localhost:8080 was refused - did you specify the right host or port? โ ~ kind /usr/local/bin/kind: 1: /usr/local/bin/kind: Not: not foundI installed kubectl and kind using the below instructions in documentation, I still get this error.
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64 chmod +x ./kind mv ./kind /some-dir-in-your-PATH/kind
Make sure that $(uname) actually evaluates to the operating system name.
I am using Windows with WSL 2. For me uname was resolving to "Linux" so the contents of the file kind was "Not Found"
โฏ uname
Linux
โฏ cat kind
Not Found%
So I used the following command to download kind:
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.9.0/kind-linux-amd64
we may need to upgrade the guide.
when it was written, github served files case-insensitively
On Wed, Oct 7, 2020 at 12:38 PM Zachary Radtka notifications@github.com
wrote:
I am using Windows with WSL 2. For me uname was resolving to "Linux" so
the contents of the file kind was "Not Found"โฏ uname
Linux
โฏ cat kind
Not Found%
So I used the following command to download kind:
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.9.0/kind-linux-amd64
โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-sigs/kind/issues/1343#issuecomment-705151182,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHADK2B7ZZ32WQKUUW4353SJS7RTANCNFSM4KYHOXTQ
.
Not sure if all the releases are lowercase, but a simple fix would be:
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname | tr '[:upper:]' '[:lower:]')-amd64
Most helpful comment
imho it's bad that our documentation assumes kubectl is available though, we should update it with a reference to this.