Skip to content

Kubeadm Configuration being produced contains dns.type field which has been removed since v1beta2 #4649

@rmatmar

Description

@rmatmar

We are having issues with eks-anywhere cluster creation and an error message during kind creation is around type field not being parseable for the kubeadm config

initconfiguration.go:319] error unmarshaling configuration schema.GroupVersionKind{Group:"kubeadm.k8s.io", Version:"v1beta3", Kind:"ClusterConfiguration"}: strict decoding error: unknown field "dns.type"

Since KUBEADM v1beta2, The dns.type field has been removed, since CoreDNS is the only supported DNS server type. The resulting rendered kubeadm config in this eks-anywhere/kind project is kubeadm v1beta3

See this file https://github.com/aws/eks-anywhere-build-tooling/blob/main/projects/kubernetes-sigs/kind/build/create-kind-cluster.sh

and it still exists in the config being passed via stdin

cat << EOF \
  | $KIND_PATH create cluster \
    --name "eks-a-kind-test-$ARCH" \
    --image="$IMAGE" \
    --wait="5m" -v9 --retain \
    --config=/dev/stdin \
    || true
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
kubeadmConfigPatches:
- |
    kind: ClusterConfiguration
    dns:
        type: CoreDNS
        imageRepository: $EKSD_IMAGE_REPO/coredns
        imageTag: $COREDNS_VERSION

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions