Merge pull request #173 from jiwonhu/main

Elaborate on API_SERVER_URL in agent-initiated cluster reg
This commit is contained in:
Mario Manno 2024-09-06 10:28:48 +02:00 committed by GitHub
commit 1bd9d86335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 8 deletions

View File

@ -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. Third, set variables with the Fleet cluster's API Server URL and CA, for the downstream cluster to use for connecting.
```shell ```shell
API_SERVER_URL=https://... API_SERVER_URL=https://<API_URL>:6443
API_SERVER_CA_DATA=... API_SERVER_CA_DATA=...
``` ```
If the API server is not listening on the https port (443), the `API_SERVER_URL` should include the port, e.g. `https://<API_URL>: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 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, (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), by looking up the default ServiceAccount secret name (typically prefixed with `default-token-`, in the default namespace),
under the `ca.crt` key. 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 :::warning Kubectl Context
__Ensure you are installing to the right cluster__: __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/`} {`helm repo add fleet https://rancher.github.io/fleet-helm-charts/`}
</CodeBlock> </CodeBlock>
:::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. Finally, install the agent using Helm.
<Tabs> <Tabs>
<TabItem value="helm" label="Install" default> <TabItem value="helm" label="Install" default>