k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
27.38k stars 2.3k forks source link

[Release-1.27] - Core DNS missing NodeHosts key in Configmap #9381

Closed brandond closed 6 months ago

brandond commented 6 months ago

Backport fix for Core DNS missing NodeHosts key in Configmap

fmoral2 commented 6 months ago

Validated on Version:

-$ k3s version v1.27.10+k3s-2a4df5b6 (2a4df5b6)

Environment Details

Infrastructure Cloud EC2 instance

Node(s) CPU architecture, OS, and Version: NAME="Oracle Linux Server" VERSION="8.9" ID="ol" ID_LIKE="fedora"

Cluster Configuration: 1 node servers

Steps to validate the fix

  1. Install k3s from airgap releases
  2. Start k3s with those flags:
    --node-ip={internal-ip} --flannel-iface={proper-interface} --write-kubeconfig-mode=644 --kube-apiserver-arg=service-node-port-range=30000-30100 --secrets-encryption --disable=traefik --disable=servicelb --disable-helm-controller --disable-network-policy --kubelet-arg cloud-provider=external --debug
  3. Validate nodes and pods are all ok
  4. Validate that coredns is starting and running correctly

Validation Results:

``` $ k3s -v k3s version v1.27.10+k3s-2a4df5b6 (2a4df5b6) go version go1.20.13 $ kgn NAME STATUS ROLES AGE VERSION ip- Ready control-plane,etcd,master 23s v1.28.6+k3s-3d0674ad $ kgp -A NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-6799fbcd5-4zvb9 1/1 Running 0 23s kube-system local-path-provisioner-6c86858495-5rr25 1/1 Running 0 23s kube-system metrics-server-67c658944b-zdfsq 1/1 Running 0 23s ~$ kgp -A NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-77ccd57875-55bxt 1/1 Running 0 8s kube-system local-path-provisioner-79ffd768b5-7482d 1/1 Running 0 8s kube-system metrics-server-648b5df564-98598 0/1 Running 0 8s ```