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.30] - Support for NodeExternalDNS #10855

Closed
brandond opened this issue Sep 6, 2024 · 3 comments
Closed

[Release-1.30] - Support for NodeExternalDNS #10855

brandond opened this issue Sep 6, 2024 · 3 comments
Assignees
Milestone

Comments

@brandond
Copy link
Member

brandond commented Sep 6, 2024

Backport fix for Support for NodeExternalDNS

@brandond brandond self-assigned this Sep 6, 2024
@brandond brandond moved this from New to Next Up in K3s Development Sep 6, 2024
@brandond brandond added this to the v1.30.6+k3s1 milestone Sep 6, 2024
@VestigeJ
Copy link

VestigeJ commented Oct 7, 2024

##Environment Details
Validated using COMMIT=647fc892dbce192a603ce0fcfde57445e7d4a4c4

Infrastructure

  • Cloud

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

Linux 6.4.0-150600.23.17-default x86_64 GNU/Linux
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP6"

Cluster Configuration:

NAME              STATUS   ROLES                       AGE     VERSION
ip-2-2-2-98       Ready    control-plane,etcd,master   8m21s   v1.30.5+k3s-647fc892

Config.yaml:

node-external-ip: 2.2.2.98
token: YOUR_TOKEN_HERE
write-kubeconfig-mode: 644
debug: true
cluster-init: true
node-external-dns:
- cloudflare.com
- google.com
- arc.k3s.com

Validation

$ 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
$ COMMIT=647fc892dbce192a603ce0fcfde57445e7d4a4c4
$ sudo INSTALL_K3S_COMMIT=$COMMIT INSTALL_K3S_EXEC=server ./install-k3s.sh
$ k apply -f https://k8s.io/examples/admin/dns/dnsutils.yaml
$ kgp dnsutils
$ kgn -o yaml | grep -i dns
$ k3s -v
$ k exec -it dnsutils -- nslookup -debug cloudflare.com > cloudflare
$ k exec -it dnsutils -- nslookup -debug google.com > google
$ k exec -it dnsutils -- nslookup -debug arc.k3s.com > arc

Results:

$ kgn -o yaml | grep -i dns

      k3s.io/node-args: '["server","--node-external-ip","2.2.2.98","--token","********","--write-kubeconfig-mode","644","--debug","true","--cluster-init","true","--node-external-dns","cloudflare.com","--node-external-dns","google.com","--node-external-dns","arc.k3s.com"]'

@VestigeJ VestigeJ closed this as completed Oct 7, 2024
@github-project-automation github-project-automation bot moved this from Next Up to Done Issue in K3s Development Oct 7, 2024
@VestigeJ VestigeJ reopened this Oct 8, 2024
@caroline-suse-rancher caroline-suse-rancher moved this from Done Issue to To Test in K3s Development Nov 14, 2024
@brandond
Copy link
Member Author

I missed this again this cycle because it was Done :/
Rescheduling to next month.

@VestigeJ
Copy link

Previous release node configuration behavior

$ kgn -o yaml | grep -i dns -B1 -A3

      k3s.io/internal-ip: 1.1.1.14
      k3s.io/node-args: '["server","--token","********","--write-kubeconfig-mode","644","--debug","true","--cluster-init","true","--embedded-registry","true","--node-external-dns","cloudflare.com","--node-external-dns","google.com","--node-external-dns","arc.k3s.com","--node-internal-dns","k3s.server.qa"]'
      k3s.io/node-config-hash: IG22GUHALZPSO6THTTTHA====
      k3s.io/node-env: '{}'
      node.alpha.kubernetes.io/ttl: "0"
--
    - names:
      - docker.io/rancher/mirrored-coredns-coredns@sha256:8461f69c1d8252a73f4c217ca17c75ac704af1c54c2332c199c637ab2815536a
      - docker.io/rancher/mirrored-coredns-coredns:1.11.3
      sizeBytes: 18561302
    - names:
      - docker.io/rancher/local-path-provisioner@sha256:f77fa34dd9d000daf6fd6029bf05de6b351b4fe4287cbc0ad2abb11a91df2ced

$ get_figs

=========== k3s config ===========
token: YOUR_TOKEN_HERE
write-kubeconfig-mode: 644
debug: true
cluster-init: true
embedded-registry: true
node-external-dns:
- cloudflare.com
- google.com
- arc.k3s.com
node-internal-dns:
- k3s.server.qa

$ k3s -v

k3s version v1.31.1+k3s1 (452dbbc1)
go version go1.22.6

Validated no configuration changed to reflect same configuration values

$ kgn -o yaml | grep -i dns -B1 -A3

DEBU[0000] Asset dir /var/lib/rancher/k3s/data/c88d88febb62fa475e3ca28a2ddb6c98856c37f75d98a6998124835561e9c104
DEBU[0000] Running /var/lib/rancher/k3s/data/c88d88febb62fa475e3ca28a2ddb6c98856c37f75d98a6998124835561e9c104/bin/kubectl [kubectl get nodes -o yaml]
      flannel.alpha.coreos.com/public-ip: 1.1.0.91
      k3s.io/external-dns: cloudflare.com,google.com,arc.k3s.com
      k3s.io/hostname: ip-1-1-0-91
      k3s.io/internal-dns: k3s.server.qa
      k3s.io/internal-ip: 1.1.0.91
      k3s.io/node-args: '["server","--token","********","--write-kubeconfig-mode","644","--debug","true","--cluster-init","true","--embedded-registry","true","--node-external-dns","cloudflare.com","--node-external-dns","google.com","--node-external-dns","arc.k3s.com","--node-internal-dns","k3s.server.qa"]'
      k3s.io/node-config-hash: IG2UHKXY4VAFFY2X====
      k3s.io/node-env: '{}'
      node.alpha.kubernetes.io/ttl: "0"
--
    - address: k3s.server.qa
      type: InternalDNS
    - address: cloudflare.com
      type: ExternalDNS
    - address: google.com
      type: ExternalDNS
    - address: arc.k3s.com
      type: ExternalDNS
    - address: ip-1-1-0-91
      type: Hostname
    allocatable:
--
    - names:
      - docker.io/rancher/mirrored-coredns-coredns@sha256:82979ddf442c593027a57239ad90616deb874e90c365d1a96ad508c2104bdea5
      - docker.io/rancher/mirrored-coredns-coredns:1.12.0
      sizeBytes: 20938299
    - names:
      - docker.io/rancher/mirrored-metrics-server@sha256:dccf8474fb910fef261d31d9483d7e4c1df7b86cf4d638fb6a7d7c88bd51600a

$ get_figs

=========== k3s config ===========
token: YOUR_TOKEN_HERE
write-kubeconfig-mode: 644
debug: true
cluster-init: true
embedded-registry: true
node-external-dns:
- cloudflare.com
- google.com
- arc.k3s.com
node-internal-dns:
- k3s.server.qa

$ k3s -v

k3s version v1.30.8-rc1+k3s1 (b43a365f)
go version go1.22.9

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done Issue
Development

No branches or pull requests

3 participants