Skip to content

Commit

Permalink
Merge pull request #3524 from fangpenlin/patch-1
Browse files Browse the repository at this point in the history
Fix wrong controller port used for pre-generated tokens command
  • Loading branch information
makhov authored Sep 25, 2023
2 parents 7db1c15 + 9e0d9c6 commit c431615
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/custom-ca.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ k0s token pre-shared --role worker --cert /var/lib/k0s/pki/ca.crt --url https://

The command above generates a join token and a Secret. A Secret should be deployed to the cluster to authorize the token.
For example, you can put the Secret under the [manifest](manifests.md) directory and it will be deployed automatically.

Please note that if you are generating a join token for a controller, the port number needs to be 9443 instead of 6443.
Controller bootstrapping requires talking to the k0s-apiserver instead of the kube-apiserver.
Here's an example of a command for pre-generating a token for a controller.

```shell
k0s token pre-shared --role controller --cert /var/lib/k0s/pki/ca.crt --url https://<controller-ip>:9443/
```

0 comments on commit c431615

Please sign in to comment.