doc: add agent registration instructions

- add section on how to get existing server token
- add steps to create a new token
- add instructions on how to register an agent/worker

🤖
This commit is contained in:
Sebastian Mark 2024-09-03 22:31:56 +02:00
parent de0fabd0b1
commit 8bc212d546

View file

@ -18,6 +18,29 @@
`docker compose exec -it k3s kubectl config view --flatten`
### Add Agents
#### Get Agent Token
> The secure token format (occasionally referred to as a "full" token) contains the following parts:
>
> <prefix><cluster CA hash>::<credentials>
Get existing server token:
`cat /var/lib/docker/volumes/baseline_k3s-data/_data/server/token`
Create new token:
`docker compose exec -it k3s k3s token create`
#### Register Agent/Worker
```bash
export K3S_URL=https://<cpn.fqdn>:6443
export K3S_NODE_NAME=<node.fqdn>
export K3S_TOKEN=<full-token>
curl -sfL https://get.k3s.io | sh -s -
```
## Notes
### ArgoCD
@ -41,7 +64,6 @@ operation:
See: [infrastructure/zabbix-config - Zabbix Kubernetes Monitoring](https://git.smsvc.net/infrastructure/zabbix-config/src/branch/master/Zabbix-Kubernetes.md)
## Cloud Setups
### Linode