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.27] Generated node local coredns config has extra newline and is invalid #5198

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.27.9+rke2r1
Validated using VERSION=v1.27.10-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-21-18-28-21     Ready    control-plane,etcd,master   3m5s   v1.27.10+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.27.9+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-55wbn                                   0/1     CrashLoopBackOff   1 (12s ago)   113s
kube-system   rke2-coredns-rke2-coredns-autoscaler-6f97df447-nw785   1/1     Running            0             113s
kube-system   rke2-coredns-rke2-coredns-f6c9f9649-fbqnl              1/1     Running            0             113s

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

kube-system   node-local-dns-vmk6h                                    1/1     Running     0             2m6s
kube-system   rke2-coredns-rke2-coredns-84f49dccc9-cnbwb              1/1     Running     0             2m6s
kube-system   rke2-coredns-rke2-coredns-autoscaler-5b5b56997b-4jjrx   1/1     Running     0             2m6s

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