-2

Trying to get kind running on Intel OSX 13.3.1 just to learn more about kubernetes. Installed kubectl and kind using homebrew.

kubectl version 1.25.4
kind version 0.18.0
Docker Desktop 4.18.0

I can stand up the default cluster with kind create cluster

I looked in the ~/.kube/config file and it has apiVersion: v1

I deleted this cluster

Tried to follow an example to start up a multi-node cluster with this file. The file passed yamllint.

kind: Cluster
apiVersion: kind.x-k8s.io/v1
nodes:
  - role: control-plane
  - role: worker
  - role: worker
  - role: worker

and this command

kind create cluster --config ~/.kube/kind_cluster.yml

And got this error

ERROR: failed to create cluster: unknown apiVersion: kind.x-k8s.io/v1

Any idea what may be wrong?

Note that I have tried numerous apiVersion values based on various other “hellowworld” examples and goggle-fu output with no luck.

larsks
  • 277,717
  • 41
  • 399
  • 399

1 Answers1

1

Your APIVersion should be kind.x-k8s.io/v1alpha4 as per the docs here https://github.com/kubernetes-sigs/kind/blob/329a451909597f481bd3d313d054e9852537e2b9/site/content/docs/user/configuration.md?plain=1#L19-L24

I'll copy paste to avoid link rot though

A minimal valid config is:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
Ethan Gallant
  • 308
  • 4
  • 11
  • OK that time it worked. I could have sworn I tried that before. – william milliron May 10 '23 at 18:35
  • Maybe because I restarted Docker Desktop? No clue. – william milliron May 10 '23 at 18:48
  • Maybe had contamination in docker from earlier experiments? Anything listed with kube or kind got nuked and docker restarted. milliron@iMac:~/.kube/>kubectl get nodes NAME STATUS ROLES AGE VERSION rays-cluster-control-plane Ready control-plane 55s v1.26.3 rays-cluster-worker Ready 23s v1.26.3 rays-cluster-worker2 Ready 23s v1.26.3 rays-cluster-worker3 Ready 35s v1.26.3 – william milliron May 10 '23 at 19:01