Kind: Failed to create cluster from the kind-example-config.yaml

Created on 27 Jun 2019  ยท  4Comments  ยท  Source: kubernetes-sigs/kind

What happened:

kind create cluster --config multinode.yaml
Creating cluster "kind" ...
 โœ“ Ensuring node image (kindest/node:v1.15.0) ๐Ÿ–ผ
 โœ“ Preparing nodes ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ
 โœ— Creating kubeadm config ๐Ÿ“œ
Error: failed to create cluster: failed to generate kubeadm config content: failed to find an object with kubeadm.k8s.io_v1beta1_ClusterConfiguration|config to apply the patch
cat multinode.yaml
# this config file contains all config fields with comments
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
# patch the generated kubeadm config with some extra settings
kubeadmConfigPatches:
- |
  apiVersion: kubeadm.k8s.io/v1beta1
  kind: ClusterConfiguration
  metadata:
    name: config
  networking:
    serviceSubnet: 10.0.0.0/16
# patch it further using a JSON 6902 patch
kubeadmConfigPatchesJson6902:
- group: kubeadm.k8s.io
  version: v1beta1
  kind: ClusterConfiguration
  patch: |
    - op: add
      path: /apiServer/certSANs/-
      value: my-hostname
# 1 control plane node and 3 workers
nodes:
# the control plane node config
- role: control-plane
# the three workers
- role: worker
- role: worker
- role: worker

What you expected to happen:

Have a multi node cluster up and running created with kind.

How to reproduce it (as minimally and precisely as possible):

Use the above example which is suggested in the docs.

Anything else we need to know?:

I noticed this issue came up before, not sure if tests already exist for this, but if not maybe there could be a test for the examples?

I removed the extra config patches and the cluster was created correctly.

Environment:

  • kind version: (use kind version):
    v0.4.0
  • Kubernetes version: (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-26T00:04:52Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-25T23:41:27Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
  • Docker version: (use docker info):
    Version: 18.06.1-ce
  • OS (e.g. from /etc/os-release):
    darwin OSX
help wanted kindocumentation

Most helpful comment

yes, the docs are out of date. kubeadm's v1beta2 needs to be used for patches. :)

/remove-kind bug
/kind documentation

we need to update the docs to include the latest supported kubeadm config version for patches.
the required change is to modify these files:
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/kind-example-config.yaml
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/quick-start.md#enable-feature-gates-in-your-cluster

to have v1beta2 instead of v1beta1

/help

All 4 comments

At a quick glance not seems your patching with kubeadm v1beta1 and last version use v1beta2 , can you try that and report back?

yes, the docs are out of date. kubeadm's v1beta2 needs to be used for patches. :)

/remove-kind bug
/kind documentation

we need to update the docs to include the latest supported kubeadm config version for patches.
the required change is to modify these files:
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/kind-example-config.yaml
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/quick-start.md#enable-feature-gates-in-your-cluster

to have v1beta2 instead of v1beta1

/help

@neolit123:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

yes, the docs are out of date. kubeadm's v1beta2 needs to be used for patches. :)

/remove-kind bug
/kind documentation

we need to update the docs to include the latest supported kubeadm config version for patches.
the required change is to modify these files:
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/kind-example-config.yaml
https://github.com/kubernetes-sigs/kind/blob/master/site/content/docs/user/quick-start.md#enable-feature-gates-in-your-cluster

to have v1beta2 instead of v1beta1

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@neolit123 Thanks, that worked! Opened https://github.com/kubernetes-sigs/kind/pull/667 to fix it.

Was this page helpful?
0 / 5 - 0 ratings