From 6e5423ffb40a0d1837770fa379a612330e396080 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Tue, 3 Sep 2024 22:31:56 +0200 Subject: [PATCH] doc: add agent registration instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 🤖 --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41080b4..c774bf3 100644 --- a/README.md +++ b/README.md @@ -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: +> +> :: + +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://:6443 +export K3S_NODE_NAME= +export K3S_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