Skip to content

Commit

Permalink
Added instructions for using --server-user
Browse files Browse the repository at this point in the history
There seems to be some recurring issues with users which either have an RSA SSH key or do not know that they need to use the `--server-user` parameter when they are using different usernames on the server and the new node they want to add. I have added some info to the readme that will hopefully clear that up a bit.

Signed-off-by: Carsten Brachem <[email protected]>
  • Loading branch information
cbrachem authored and alexellis committed Dec 9, 2021
1 parent 080b9cf commit 73b7f03
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ export USER=root
k3sup join --ip $AGENT_IP --server-ip $SERVER_IP --user $USER
```

Please note that if you are using different usernames for SSH'ing to the agent and the server that you must provide the username for the server via the `--server-user` parameter.

That's all, so with the above command you can have a two-node cluster up and running, whether that's using VMs on-premises, using Raspberry Pis, 64-bit ARM or even cloud VMs on EC2.

### Create a multi-master (HA) setup with external SQL
Expand Down Expand Up @@ -276,6 +278,8 @@ You can join the agent to either server, the datastore is not required for this
k3sup join --user root --server-ip $SERVER1 --ip $AGENT1
```
Please note that if you are using different usernames for SSH'ing to the agent and the server that you must provide the username for the server via the `--server-user` parameter.
* Additional steps
If you run `kubectl get node`, you'll now see two masters/servers and one agent, however, we joined the agent to the first server. If the first server goes down, the agent will effectively also go offline.
Expand Down Expand Up @@ -627,6 +631,10 @@ The most common problem is that you missed a step, fortunately it's relatively e
* The K3s agent didn't start. Log in and run `sudo systemctl status k3s-agent`
* You tried to remove and re-add a server in an etcd cluster and it failed. This is a known issue, see the [K3s issue tracker](https://github.com/k3s-io/k3s/issues).
* You tried to use an unsupported version of a database for HA. See [this list from Rancher](https://rancher.com/docs/k3s/latest/en/installation/datastore/)
* Your tried to join a node to the cluster and got an error "ssh: handshake failed". This is probably one of three possibilities:
- You did not run `ssh-copy-id`. Try to run it and check if you can log in to the server and the new node without a password prompt using regular `ssh`.
- You have an RSA public key. There is an [underlying issue in a Go library](https://github.com/golang/go/issues/39885) which is [referred here](https://github.com/alexellis/k3sup/issues/63). Please provide the additional parameter `--ssh-key ~/.ssh/id_rsa` (or wherever your private key lives) until the issue is resolved.
- You are using different usernames for SSH'ing to the server and the node to be added. In that case, playe provide the username for the server via the `--server-user` parameter.
Finally, if everything points to an issue that you can clearly reproduce with k3sup, feel free to open an issue here. To make sure you get a response, fill out the whole template and answer all the questions.
Expand Down

0 comments on commit 73b7f03

Please sign in to comment.