Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.26] Generated node local coredns config has extra newline and is invalid #5199

Closed
manuelbuil opened this issue Jan 4, 2024 · 1 comment
Assignees

Comments

@manuelbuil
Copy link
Contributor

Backport: #5156

@VestigeJ
Copy link
Contributor

##Environment Details
Reproduced using VERSION=v1.26.12+rke2r1
Validated using VERSION=v1.26.13-rc2+rke2r1

Infrastructure

  • Cloud

Node(s) CPU architecture, OS, and version:

Linux 5.11.0-1022-aws x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 20.04.3 LTS"

Cluster Configuration:

NAME               STATUS   ROLES                       AGE    VERSION
ip-86-68-28-86     Ready    control-plane,etcd,master   102s   v1.26.13+rke2r1

Config.yaml:

token: YOUR_TOKEN_HERE
write-kubeconfig-mode: 644
debug: true
cni: multus,cilium
profile: cis
selinux: true
cluster-cidr: 10.42.0.0/16,2001:cafe:42:0::/56
service-cidr: 10.43.0.0/16,2001:cafe:42:1::/112

Reproduction

$ curl https://get.rke2.io --output install-"rke2".sh
$ sudo chmod +x install-"rke2".sh
$ sudo groupadd --system etcd && sudo useradd -s /sbin/nologin --system -g etcd etcd
$ sudo modprobe ip_vs_rr
$ sudo modprobe ip_vs_wrr
$ sudo modprobe ip_vs_sh
$ sudo printf "on_oovm.panic_on_oom=0 \nvm.overcommit_memory=1 \nkernel.panic=10 \nkernel.panic_ps=1 \nkernel.panic_on_oops=1 \n" > ~/60-rke2-cis.conf
$ sudo cp 60-rke2-cis.conf /etc/sysctl.d/
$ sudo systemctl restart systemd-sysctl
$ vim nlocal.yaml
$ sudo mkdir -p /var/lib/rancher/rke2/server/manifests/
$ sudo cp nlocal.yaml /var/lib/rancher/rke2/server/manifests/
$ VERSION=v1.26.12+rke2r1
$ setup_rke2
$ sudo INSTALL_RKE2_VERSION=$VERSION INSTALL_RKE2_EXEC=server ./install-rke2.sh
$ go_rke2
$ set_kubefig
$ kgn
$ kgp -A

Results:

$ kgp -n kube-system

kube-system   node-local-dns-6qrl6                                    0/1     CrashLoopBackOff   5 (2m24s ago)   7m12s
kube-system   rke2-coredns-rke2-coredns-565dfc7d75-qwn5l              1/1     Running            0               7m12s
kube-system   rke2-coredns-rke2-coredns-autoscaler-6c48c95bf9-55pmb   1/1     Running            0               7m12s

install using VERSION=v1.26.13-rc2+rke2r1
$ kgp -n kube-system

kube-system   node-local-dns-29ft4                                   1/1     Running     0             111s
kube-system   rke2-coredns-rke2-coredns-7df9d89b69-xh8s9             1/1     Running     0             111s
kube-system   rke2-coredns-rke2-coredns-autoscaler-6c794d698-rwq9w   1/1     Running     0             111s

$ cat nlocal.yaml

---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-coredns
  namespace: kube-system
spec:
  valuesContent: |-
    nodelocal:
      enabled: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants