k3s-io / k3s

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

[Release-1.26] - Core DNS missing NodeHosts key in Configmap #9382

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.26.13+k3s-62448e1e (62448e1e)

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.26.13+k3s-62448e1e (62448e1e) go version go1.20.13 ~$ kgn NAME STATUS ROLES AGE VERSION ip-1 Ready control-plane,etcd,master 15s v1.26.13+k3s-62448e1e ~$ kgp -A NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-59b4f5bbd5-zdpqk 1/1 Running 0 13s kube-system local-path-provisioner-7d94548cbf-hdclf 1/1 Running 0 13s kube-system metrics-server-68cf49699b-sz565 0/1 Running 0 13s ```