Clarrification on setting up embedded HA etcd #13832
Replies: 3 comments 5 replies
-
What? Hostnames and IP addresses for cluster members are automatically added to the SAN list for the certificate that is served on port 9345. You only need to manually add entries via --tls-san if you want to access the host via a hostname or IP address not associated with a cluster member - such as a DNS alias or load-balanced VIP. You DO NOT need to add --tls-san entries for ANY cluster members; secondary or otherwise. It sounds like you're trying to set the |
Beta Was this translation helpful? Give feedback.
-
|
I double checked, the documentation says you should use the Error message: Specifically it fails because I specified the tls-san value on server1. If you use the So working config looks like: non-working: |
Beta Was this translation helpful? Give feedback.
-
Yes, like I said:
If you want the certificate to be valid for the FQDN, you need to set the node's hostname and/or nodename to the FQDN. You can also add the FQDN as a TLS SAN but if you do that you're going to have to do the same for all the nodes in the cluster - you're better off just properly configuring the hostname on your nodes so that the correct entries are present in the cert by default. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have been following https://docs.k3s.io/datastore/ha-embedded to setup a multi node k3s cluster.
The documentation says you should specify the server
when setting up the second and subsequent master nodes.
If you configure the first node with
--tls-sanvalue however, and you specify the actual server value then the setup does not work, and you get TLS related issues with the server name being missing from the certificate. This happens on the second server that you are trying to join to the etcd cluster.So was wondering if it would be useful to expand the documentation a little bit to specify the different behaviour when using
--tls-san?Config that has worked for me:
The first server:
The second and third server:
The workload node:
The VIP address is HAproxy load balancing across the 3 master servers.
This was tested with k3s
v1.34.5+k3s1and on Ubuntu 22.04.Somewhat related question, the k3s docs does not actually say how to interact with the etcd cluster. I have been using the tools installed by
apt install etcd-client. I read #9841 which suggested that:"While you can interact directly with the embedded etcd, we recommend against it." but does not actually specify what the alternative would be. Specifically I want to see which node is the leader and if the etcd cluster is healthy. I could not find an appropriate verb for
k3scommand that provides similar level of information toetcdctl endpoint status --cluster --write-out=table. The only available verb isetcd-snapshotThe above command did require me to set:Beta Was this translation helpful? Give feedback.
All reactions