kyma-incubator/terraform-provider-kind

Error: failed to init node with kubeadm

Closed this issue · 2 comments

Terraform version: 0.15
Kind version: 0.10
Provider version: 0.0.7
OS: WSL

Terraform Plan

resource "kind_cluster" "this" {
      + client_certificate     = (known after apply)
      + client_key             = (known after apply)
      + cluster_ca_certificate = (known after apply)
      + endpoint               = (known after apply)
      + id                     = (known after apply)
      + kubeconfig             = (known after apply)
      + kubeconfig_path        = (known after apply)
      + name                   = "kind_cluster_name"
      + node_image             = "kindest/node:v1.20.2"
      + wait_for_ready         = true

      + kind_config {
          + api_version = "kind.x-k8s.io/v1alpha4"
          + kind        = "Cluster"

          + node {
              + role = "control-plan"
            }
        }
    }

Got Error

Error: failed to init node with kubeadm: command "docker exec --privileged horizontal_pod_autoscaler_lab-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1

Hi @PePoDev,

could you try a different cluster name? A cluster name with underscores seems to be a problem for kind itself, see kubernetes-sigs/kind#2111

Please let us know if that works successfully.

@tehcyx Oh, I try to change _ to - and it solved. Thanks.