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.24] Remove deprecated nodeSelector label beta.kubernetes.io/os #7116

Closed
caroline-suse-rancher opened this issue Mar 20, 2023 · 1 comment
Assignees
Milestone

Comments

@caroline-suse-rancher
Copy link
Contributor

Problem:
The nodeSelector label beta.kubernetes.io/os in the CoreDNS deployment was deprecated in 1.14 and will likely be removed soon

Solution:
Change the nodeSelector to remove the beta

Backport for issue #6970

@VestigeJ
Copy link

Reproduced using VERSION=v1.24.12+k3s1
Validated change using COMMIT=a6bd15fb71fb768416aefc17a9472b09fd1649af

Infrastructure

  • Cloud

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

Linux 5.14.21-150400.24.11-default x86_64 GNU/Linux 
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP4"

Cluster Configuration:

NAME               STATUS   ROLES                       AGE     VERSION
ip-1-1-1-13        Ready    control-plane,etcd,master   2m29s   v1.24.12+k3s-a6bd15fb 

Config.yaml:

N/A

v1.24.12+k3s1

$ curl https://get.k3s.io --output install-"k3s".sh
$ sudo chmod +x install-"k3s".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" > ~/90-kubelet.conf
$ sudo cp 90-kubelet.conf /etc/sysctl.d/
$ sudo systemctl restart systemd-sysctl
$ sudo INSTALL_K3S_VERSION=v1.24.12+k3s1 INSTALL_K3S_EXEC=server ./install-k3s.sh 
$ set_kubefig //set KUBECONFIG=/etc/rancher/k3s/k3s.yaml
$ kgp -A //get all pods to find coredns pod name
$ kg po coredns-7b5bbc6644-hv5rk -n kube-system -o yaml | grep -i "beta"

Results:

$ k3s -v

k3s version v1.24.12+k3s1 (57e8adb5)
go version go1.19.7

$ kg po coredns-7b5bbc6644-hv5rk -n kube-system -o yaml | grep -i "beta"

    beta.kubernetes.io/os: linux

Validated changed label for CoreDNS pod using COMMIT=a6bd15fb71fb768416aefc17a9472b09fd1649af

Validation Steps

Upgrade existing single node to latest commit on branch.

$ sudo INSTALL_K3S_COMMIT=a6bd15fb71fb768416aefc17a9472b09fd1649af INSTALL_K3S_EXEC=server ./install-k3s.sh 
$ set_kubefig //set KUBECONFIG=/etc/rancher/k3s/k3s.yaml
$ kg po -n kube-system 
$ kg po coredns-74448699cf-vfps8 -n kube-system -o yaml | grep -i "kubernetes.io/os:"
$ k3s -v
$ get_report //generate this template

Results:

$ k3s -v

k3s version v1.24.12+k3s-a6bd15fb (a6bd15fb)
go version go1.19.7

$ kg po coredns-74448699cf-vfps8 -n kube-system -o yaml | grep -i "kubernetes.io/os:"

    kubernetes.io/os: linux

Additional context / logs:

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

No branches or pull requests

2 participants