Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Getting unknown API version when starting kind cluster

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

>Solution :

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading