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.26] - Support Server Token Rotation #8298

Closed
dereknola opened this issue Sep 5, 2023 · 1 comment
Closed

[Release-1.26] - Support Server Token Rotation #8298

dereknola opened this issue Sep 5, 2023 · 1 comment
Assignees
Milestone

Comments

@dereknola
Copy link
Member

Backport fix for Support Server Token Rotation

@ShylajaDevadiga
Copy link
Contributor

Validated using commit id 8acba4a from release-1.26 branch

Environment Details

Infrastructure
Cloud EC2 instance

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

Cluster Configuration:
3 server 1 agent node

Config.yaml:

cat /etc/rancher/k3s/config,yaml
write-kubeconfig-mode: "0644"
node-external-ip: <IP>
cluster-init: true
token: token1

Steps to reproduce the issue and validate the fix

  1. Copy config.yaml
  2. Install k3s
  3. k3s token rotate --token token1 --new-token=token2
  4. Update config.yaml with new token
  5. Restart k3s service on all nodes
  6. Reboot all nodes
  7. Verify cluster is up and pods are in running state

Validation results:

ubuntu@ip-172-31-11-138:~$ kubectl get nodes
NAME               STATUS   ROLES                       AGE   VERSION
ip-172-31-11-138   Ready    control-plane,etcd,master   11m   v1.26.9+k3s-8acba4a6
ip-172-31-12-87    Ready    <none>                      11m   v1.26.9+k3s-8acba4a6
ip-172-31-13-245   Ready    control-plane,etcd,master   10m   v1.26.9+k3s-8acba4a6
ip-172-31-8-249    Ready    control-plane,etcd,master   10m   v1.26.9+k3s-8acba4a6

ubuntu@ip-172-31-11-138:~$ kubectl get pods -A
NAMESPACE     NAME                                      READY   STATUS      RESTARTS      AGE
kube-system   coredns-59b4f5bbd5-mrrq5                  0/1     Running     1 (23s ago)   11m
kube-system   helm-install-traefik-crd-hnnnn            0/1     Completed   0             11m
kube-system   helm-install-traefik-tqnt7                0/1     Completed   1             11m
kube-system   local-path-provisioner-76d776f6f9-vnwrq   1/1     Running     1 (23s ago)   11m
kube-system   metrics-server-68cf49699b-mp9pj           0/1     Running     1 (70s ago)   11m
kube-system   svclb-traefik-9ca08dde-l5srl              2/2     Running     2 (70s ago)   10m
kube-system   svclb-traefik-9ca08dde-ssqv8              2/2     Running     2 (29s ago)   10m
kube-system   svclb-traefik-9ca08dde-z5s8v              2/2     Running     2 (23s ago)   10m
kube-system   svclb-traefik-9ca08dde-zb6ff              2/2     Running     2 (88s ago)   10m
kube-system   traefik-57c84cf78d-7mn95                  1/1     Running     1 (88s ago)   10m
ubuntu@ip-172-31-11-138:~$

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