Skip to content

Commit

Permalink
refactor: move note close to step title
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
FrankYang0529 committed Jul 2, 2024
1 parent 172b9be commit 59abebf
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions docs/rancher/cloud-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,33 @@ When spinning up an RKE2 cluster using the Harvester node driver, select the `Ha
![](/img/v1.2/rancher/custom.png)
1. Generate cloud config data using the script `generate_addon.sh`, and then place the data on every custom node (directory: `/etc/kubernetes/cloud-config`).

```
```bash
curl -sfL https://raw.githubusercontent.com/harvester/cloud-provider-harvester/master/deploy/generate_addon.sh | bash -s <serviceaccount name> <namespace>
```

The output will look as follows:
:::note

The `generate_addon.sh` script depends on `kubectl` and `jq` to operate the Harvester cluster.

The script needs access to the `Harvester Cluster` kubeconfig to work. You can find the `kubeconfig` file from one of the Harvester management nodes in the `/etc/rancher/rke2/rke2.yaml` path. The content is like following. Remember to change server IP to the VIP address.

```yaml
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: <redacted>
server: https://127.0.0.1:6443
name: default
# ...
```

The namespace needs to be the namespace in which the guest cluster will be created.

:::

The output will look as follows:

```yaml
########## cloud config ############
apiVersion: v1
clusters:
Expand Down Expand Up @@ -101,16 +121,6 @@ When spinning up an RKE2 cluster using the Harvester node driver, select the `Ha
permissions: '0644'
```

:::note

The `generate_addon.sh` script depends on `kubectl` and `jq` to operate the Harvester cluster.

The script needs access to the `Harvester Cluster` kubeconfig to work. You can find the `kubeconfig` file from one of the Harvester management nodes in the `/etc/rancher/rke2/rke2.yaml` path.

The namespace needs to be the namespace in which the guest cluster will be created.

:::

1. Create a VM in the Harvester cluster with the following settings:

- **Basics** tab: The minimum requirements are 2 CPUs and 4 GiB of RAM. The required disk space depends on the VM image.
Expand Down

0 comments on commit 59abebf

Please sign in to comment.