From bb1df2dd9ac6d6bf3ec513ac9a438dcb3446d5d2 Mon Sep 17 00:00:00 2001 From: Jiwon Hu Date: Sun, 4 Aug 2024 15:19:48 +0800 Subject: [PATCH 1/2] Elaborate on api-server-url in agent intiated registration - Elaborate on what value to feed and what not on API_SERVER_URL to avoid hitting the issue https://github.com/rancher/fleet/issues/68 - Moved a namespace caution to the right place, right before helm install cmd --- docs/cluster-registration.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/cluster-registration.md b/docs/cluster-registration.md index 5104405bc..b2b4be45c 100644 --- a/docs/cluster-registration.md +++ b/docs/cluster-registration.md @@ -73,23 +73,17 @@ CLUSTER_LABELS="--set-string labels.example=true --set-string labels.env=dev" Third, set variables with the Fleet cluster's API Server URL and CA, for the downstream cluster to use for connecting. ```shell -API_SERVER_URL=https://... +API_SERVER_URL=https://:6443 API_SERVER_CA_DATA=... ``` +`API_SERVER_URL` should be in format of `https://:6443` that can be referenced from `.kube/config` file. Do not use apiServerURL of `https://` from previously generated `values.yaml` file. Value in `API_SERVER_CA_DATA` can be obtained from a `.kube/config` file with valid data to connect to the upstream cluster (under the `certificate-authority-data` key). Alternatively it can be obtained from within the upstream cluster itself, by looking up the default ServiceAccount secret name (typically prefixed with `default-token-`, in the default namespace), under the `ca.crt` key. -:::caution - -__Use proper namespace and release name__: -For the agent chart the namespace must be `cattle-fleet-system` and the release name `fleet-agent` - -::: - :::warning Kubectl Context __Ensure you are installing to the right cluster__: @@ -107,6 +101,14 @@ Add Fleet's Helm repo. {`helm repo add fleet https://rancher.github.io/fleet-helm-charts/`} +:::caution + +__Use proper namespace and release name__: +For the agent chart the namespace must be `cattle-fleet-system` and the release name `fleet-agent` + +::: + + Finally, install the agent using Helm. From 901c0d7dc9e5c8123de8a1f3812380eada2924e0 Mon Sep 17 00:00:00 2001 From: Jiwon Hu Date: Mon, 26 Aug 2024 18:07:30 +0800 Subject: [PATCH 2/2] Update docs/cluster-registration.md Co-authored-by: Mario Manno --- docs/cluster-registration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cluster-registration.md b/docs/cluster-registration.md index b2b4be45c..25b20063a 100644 --- a/docs/cluster-registration.md +++ b/docs/cluster-registration.md @@ -77,7 +77,7 @@ API_SERVER_URL=https://:6443 API_SERVER_CA_DATA=... ``` -`API_SERVER_URL` should be in format of `https://:6443` that can be referenced from `.kube/config` file. Do not use apiServerURL of `https://` from previously generated `values.yaml` file. +If the API server is not listening on the https port (443), the `API_SERVER_URL` should include the port, e.g. `https://:6443`. The URL can be found in the `.kube/config` file. Value in `API_SERVER_CA_DATA` can be obtained from a `.kube/config` file with valid data to connect to the upstream cluster (under the `certificate-authority-data` key). Alternatively it can be obtained from within the upstream cluster itself, by looking up the default ServiceAccount secret name (typically prefixed with `default-token-`, in the default namespace),