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.29] - Agent node IP not replaced with Tailscale VPN IP #10139

Closed
manuelbuil opened this issue May 23, 2024 · 1 comment
Closed

[Release-1.29] - Agent node IP not replaced with Tailscale VPN IP #10139

manuelbuil opened this issue May 23, 2024 · 1 comment
Assignees
Milestone

Comments

@manuelbuil
Copy link
Contributor

Backport fix for Agent node IP not replaced with Tailscale VPN IP

@VestigeJ
Copy link

##Environment Details
Reproduced using VERSION=v1.29.5+k3s1
Validated using COMMIT=fa351253a1f945d2e1829af73fb9598dbfe84216

Infrastructure

  • Cloud

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

Linux 5.14.21-150500.53-default x86_64 GNU/Linux
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP5"

Config.yaml:

node-external-ip: 1.1.1.131
server: https://1.1.1.238:6443
token: YOUR_TOKEN_HERE
vpn-auth-file: /etc/rancher/k3s/vpn

Steps

$ 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 mkdir -p /etc/rancher/k3s
$ sudo vim /etc/rancher/k3s/vpn
$ get_tailscale //function pasted below
$ sudo systemctl restart systemd-sysctl
$ COMMIT=fa351253a1f945d2e1829af73fb9598dbfe84216
$ sudo cat /etc/rancher/k3s/vpn
$ sudo INSTALL_K3S_COMMIT=$COMMIT INSTALL_K3S_EXEC=agent ./install-k3s.sh

Results:

Results shown side by side - one agent joining with existing VERSION=v1.29.5+k3s1 release another agent joined with identical configuration and using the latest COMMIT_ID v1.29 branch.

$ kgn

NAME               STATUS   ROLES                       AGE     VERSION                INTERNAL-IP      EXTERNAL-IP      OS-IMAGE                              KERNEL-VERSION              CONTAINER-RUNTIME
ip-1-1-1-129       Ready    <none>                      56s     v1.29.5+k3s1           1.1.1.129        1.1.1.3         SUSE Linux Enterprise Server 15 SP5   5.14.21-150500.53-default   containerd://1.7.15-k3s1
ip-1-1-1-167       Ready    control-plane,etcd,master   2m14s   v1.29.5+k3s1           100.77.213.109   1.1.1.238       SUSE Linux Enterprise Server 15 SP5   5.14.21-150500.53-default   containerd://1.7.15-k3s1
ip-1-1-1-131       Ready    <none>                      36s     v1.29.5+k3s-fa351253   100.86.92.4      1.1.1.123       SUSE Linux Enterprise Server 15 SP5   5.14.21-150500.53-default   containerd://1.7.15-k3s1
get_tailscale() {
    curl -fsSL https://tailscale.com/install.sh -o install-ts.sh
    chmod +x install-ts.sh
    sudo ./install-ts.sh
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done Issue
Development

No branches or pull requests

2 participants