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] - K3s should not perform etcd setup when managed etcd is not enabled #7943

Closed
dereknola opened this issue Jul 11, 2023 · 1 comment
Assignees
Milestone

Comments

@dereknola
Copy link
Member

Backport fix for K3s should not perform etcd setup when managed etcd is not enabled

@ShylajaDevadiga
Copy link
Contributor

Validated using commit id f46b378 on release1.26 branch

Environment Details

Infrastructure:
Cloud

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

Cluster Configuration:
1 etcd-only, 1 cp-only and 1 agent node

Config.yaml:

etcd-only node

disable-apiserver: true
disable-controller-manager: true
disable-scheduler: true
node-taint:
- node-role.kubernetes.io/etcd:NoExecute
write-kubeconfig-mode: 644
cluster-init: true
token: <TOKEN>

cp-only node

disable-etcd: true
node-taint:
- node-role.kubernetes.io/control-plane:NoSchedule
server: "https://<etcd-only node IP>:6443"
token: <TOKEN>
write-kubeconfig-mode: 644

agent node

server: "https://<etcd-only node IP>:6443"
token: <TOKEN>

Testing steps:

  1. Copy config.yaml to /etc/rancher/k3s
  2. Install k3s on server and agent node
  3. Verify server-client.* files are not present in cp-only node

Replication results using k3s version v1.26.6+k3s1

cp-only $ sudo ls -la /var/lib/rancher/k3s/server/tls/etcd
total 48
drwx------ 2 root root 4096 Jul 19 06:32 .
drwx------ 4 root root 4096 Jul 19 06:32 ..
-rw-r--r-- 1 root root 1140 Jul 19 06:32 client.crt
-rw------- 1 root root  227 Jul 19 06:32 client.key
-rw------- 1 root root  566 Jul 19 06:31 peer-ca.crt
-rw------- 1 root root  227 Jul 19 06:31 peer-ca.key
-rw-r--r-- 1 root root 1250 Jul 19 06:32 peer-server-client.crt
-rw------- 1 root root  227 Jul 19 06:32 peer-server-client.key
-rw------- 1 root root  570 Jul 19 06:31 server-ca.crt
-rw------- 1 root root  227 Jul 19 06:31 server-ca.key
-rw-r--r-- 1 root root 1262 Jul 19 06:32 server-client.crt
-rw------- 1 root root  227 Jul 19 06:32 server-client.key

Validation results using commit id f46b378

cp-only $ sudo ls -la /var/lib/rancher/k3s/server/tls/etcd
total 40
drwx------ 2 root root 4096 Jul 19 06:17 .
drwx------ 4 root root 4096 Jul 19 06:17 ..
-rw-r--r-- 1 root root 1140 Jul 19 06:17 client.crt
-rw------- 1 root root  227 Jul 19 06:17 client.key
-rw------- 1 root root  566 Jul 19 06:14 peer-ca.crt
-rw------- 1 root root  227 Jul 19 06:14 peer-ca.key
-rw-r--r-- 1 root root 1250 Jul 19 06:17 peer-server-client.crt
-rw------- 1 root root  227 Jul 19 06:17 peer-server-client.key
-rw------- 1 root root  570 Jul 19 06:14 server-ca.crt
-rw------- 1 root root  227 Jul 19 06:14 server-ca.key

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