Skip to content

failed to start kind cluster #3064

@yongxiu

Description

@yongxiu

What happened:

failed to remove control plane taint: command "docker exec --privileged bmctl-control-plane kubectl --kubeconfig=/etc/kubernetes/admin.conf taint nodes --all node-role.kubernetes.io/control-plane- node-role.kubernetes.io/master-" failed with error: exit status 1"

What you expected to happen:

Create kind cluster successfully

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

Use a lower performance machine, run kind create cluster

Anything else we need to know?:

When run

if len(allNodes) == 1 {
// TODO: Once kubeadm 1.23 is no longer supported remove the <1.24 handling.
// TODO: Once kubeadm 1.24 is no longer supported remove the <1.25 handling.
// https://github.com/kubernetes-sigs/kind/issues/1699
rawVersion, err := nodeutils.KubeVersion(node)
if err != nil {
return errors.Wrap(err, "failed to get Kubernetes version from node")
}
kubeVersion, err := version.ParseSemantic(rawVersion)
if err != nil {
return errors.Wrap(err, "could not parse Kubernetes version")
}
var taints []string
if kubeVersion.LessThan(version.MustParseSemantic("v1.24.0-alpha.1.592+370031cadac624")) {
// for versions older than 1.24 prerelease remove only the old taint
taints = []string{"node-role.kubernetes.io/master-"}
} else if kubeVersion.LessThan(version.MustParseSemantic("v1.25.0-alpha.0.557+84c8afeba39ec9")) {
// for versions between 1.24 and 1.25 prerelease remove both the old and new taint
taints = []string{"node-role.kubernetes.io/control-plane-", "node-role.kubernetes.io/master-"}
} else {
// for any newer version only remove the new taint
taints = []string{"node-role.kubernetes.io/control-plane-"}
}
taintArgs := []string{"--kubeconfig=/etc/kubernetes/admin.conf", "taint", "nodes", "--all"}
taintArgs = append(taintArgs, taints...)
if err := node.Command(
"kubectl", taintArgs...,
).Run(); err != nil {
return errors.Wrap(err, "failed to remove control plane taint")
}
, the node may not be ready yet, since
waitforready.NewAction(opts.WaitForReady), // wait for cluster readiness
runs after above code.

Environment:

  • kind version: (use kind version):
  • Runtime info: (use docker info or podman info):
  • OS (e.g. from /etc/os-release):
  • Kubernetes version: (use kubectl version):
  • Any proxies or other special environment settings?:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triage/needs-informationIndicates an issue needs more information in order to work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions