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

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

@fmoral2
Copy link
Contributor

fmoral2 commented Apr 5, 2023

Validated on Version:

  • [v1.25.8+k3s1]
  • [v1.25.8+k3s-c25f611e] with commitId="c25f611eed749c15a51c6858480b84047974ab63"

Environment Details

Infrastructure
Cloud EC2 instance

Node(s) CPU architecture, OS, and Version:
Ubuntu 20.04

Cluster Configuration:
1 node

Config.yaml:

cat /etc/rancher/k3s/config,yaml
write-kubeconfig-mode: 644
token: secret
debug: true
cluster-init: true

Steps to reproduce the issue:

  1. Copy config.yaml
  2. Install k3s [v1.25.8+k3s1]
  3. Validate coredns deployment "nodeSelector" is with label "beta.kubernetes.io/os=linux"

Steps to validate the fix:

  1. Install version with commit ID c25f611
  2. Validate coredns deployment "nodeSelector" is with label "kubernetes.io/os=linux"

Validation Results:

####### Issue #######
                       

Version of k3s: [v1.25.8+k3s1]


~$ k3s --version

k3s version v1.25.8+k3s1 (6c5ac022)
go version go1.19.7

$ kubectl -n kube-system get pod -l k8s-app=kube-dns -o=jsonpath='{$.items[0].spec.nodeSelector}'

{"beta.kubernetes.io/os":"linux"}


$ kubectl -n kube-system get deployment coredns -o yaml | grep -A1 'nodeSelector:'

   nodeSelector:
        beta.kubernetes.io/os: linux




========================================================================================================================   
               
                       
####### Fix ########
                          

Version of rkrs: [v1.25.8+k3s-c25f611e (c25f611e)]- CommitID = c25f611eed749c15a51c6858480b84047974ab63  


~$ k3s --version

k3s version v1.25.8+k3s-c25f611e (c25f611e)
go version go1.19.7


$ kubectl -n kube-system get deployment coredns -o yaml | grep -A1 'nodeSelector:
      nodeSelector:
        kubernetes.io/os: linux
              

$ kubectl -n kube-system get pod -l k8s-app=kube-dns -o=jsonpath='{$.items[0].spec.nodeSelector}'

{"kubernetes.io/os":"linux"}

@fmoral2 fmoral2 closed this as completed Apr 5, 2023
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

3 participants