Syncing versions after review updates applied.

Signed-off-by: Sunil Singh <sunil.singh@suse.com>
This commit is contained in:
Sunil Singh
2024-04-08 09:28:31 -07:00
parent c17765a0b5
commit 2056cce401
4 changed files with 103 additions and 51 deletions
@@ -1,14 +1,14 @@
---
title: Cluster API with Rancher Turtles
title: Cluster API (CAPI) with Rancher Turtles
---
<head>
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/integrations-in-rancher/cluster-api"/>
</head>
Rancher Turtles is a [Rancher extension](../rancher-extensions.md) that manages the lifecycle of provisioned Kubernetes clusters, by providing integration between your Cluster API (CAPI) and Rancher. With Rancher Turtles, you can:
[Rancher Turtles](https://turtles.docs.rancher.com/) is a [Rancher extension](../rancher-extensions.md) that manages the lifecycle of provisioned Kubernetes clusters, by providing integration between your Cluster API (CAPI) and Rancher. With Rancher Turtles, you can:
- Import CAPI clusters into Rancher, by installing the Rancher Cluster Agent in CAPI provisioned clusters.
- Configure the CAPI Operator.
- Configure the [CAPI Operator](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values#cluster-api-operator-values).
The [Overview](./overview.md) section outlines installation options, Rancher Turtles architecture, and a brief demo. For more details, see the [Rancher Turtles documentation](https://turtles.docs.rancher.com/).
@@ -6,16 +6,29 @@ title: Overview
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/integrations-in-rancher/cluster-api/overview"/>
</head>
## Demo
## Architecture Diagram
<iframe width="560" height="315" src="https://www.youtube.com/embed/lGsr7KfBjgU?si=ORkzuAJjcdXUXMxh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Below is a visual representation of the key components of Rancher Turtles and their relationship to Rancher and the Rancher Cluster Agent. Understanding these components is essential for gaining insights into how Rancher leverages the CAPI operator for cluster management.
![overview](/img/30000ft_view.png)
## Prerequisites
Before installing Rancher Turtles in your Rancher environment, you must disable Rancher's `embedded-cluster-api` functionality. This also includes cleaning up Rancher-specific webhooks that otherwise would conflict with CAPI ones.
To simplify setting up Rancher for installing Rancher Turtles, the official Rancher Turtles Helm chart includes a `pre-install` hook that removes the following:
- Disables the `embedded-cluster-api` feature in Rancher.
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks, as they are no longer needed.
## Installing the Rancher Turtles Operator
You can install the Rancher Turtles operator via the Rancher UI, or with Helm. The first method is recommended for most environments.
:::caution
If you already have the Cluster API (CAPI) Operator installed in your cluster, you must use the [manual Helm installation method](./overview.md#via-helm-install).
:::
:::info prerequisite
@@ -26,12 +39,10 @@ To simplify setting up Rancher for installing Rancher Turtles, the official Ranc
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks, as they are no longer needed.
:::
### Via Rancher UI
### Installing via the Rancher UI
By adding the Turtles repository via the Rancher UI, Rancher can process the installation and configuration of the CAPI Extension.
#### Installation
1. Click **☰**. Under **Explore Cluster** in the left navigation menu, select **local**.
1. In the left navigation menu of the **Cluster Dashboard**, select **Apps > Repositories**.
1. Click **Create** to add a new repository.
@@ -46,12 +57,13 @@ By adding the Turtles repository via the Rancher UI, Rancher can process the ins
This process uses the default values for the Helm chart, which are good for most installations. If your configuration requires overriding some of these defaults, you can either specify the values during installation from the Rancher UI or you can [manually install the chart via Helm](./overview.md#via-helm-install). For details about available values, see the Rancher Turtles [Helm chart reference guide](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values).
The installation may take a few minutes and once completed you will see the following new deployments in the cluster:
The installation may take a few minutes and after completing you can see the following new deployments in the cluster:
- `rancher-turtles-system/rancher-turtles-controller-manager`
- `rancher-turtles-system/rancher-turtles-cluster-api-operator`
- `capi-system/capi-controller-manager`
### Via Helm Install
### Installing via Helm
There are two ways to install Rancher Turtles with Helm, depending on whether you include the CAPI operator as a dependency:
- [Install Rancher Turtles with CAPI Operator as a dependency](#install-rancher-turtles-with-cluster-api-capi-operator-as-a-helm-dependency).
@@ -61,9 +73,9 @@ The CAPI Operator is required for installing Rancher Turtles. You can choose whe
The CAPI Operator allows for handling the lifecycle of CAPI providers using a declarative approach, extending the capabilities of `clusterctl`. If you want to learn more about it, you can refer to [Cluster API Operator book](https://cluster-api-operator.sigs.k8s.io/).
#### Install Rancher Turtles with `Cluster API (CAPI) Operator` as a Helm dependency
#### Installing Rancher Turtles with `Cluster API (CAPI) Operator` as a Helm dependency
1. The `rancher-turtles` chart is available in https://rancher.github.io/turtles. This Helm repository must be added before installation:
1. Add the Helm repository containing the `rancher-turtles` chart as the first step in installation:
```bash
helm repo add turtles https://rancher.github.io/turtles
@@ -73,26 +85,29 @@ helm repo update
2. As mentioned before, installing Rancher Turtles requires the [CAPI Operator](https://github.com/kubernetes-sigs/cluster-api-operator). The Helm chart can automatically install it with a minimal set of flags:
```bash
helm install rancher-turtles turtles/rancher-turtles --version v0.5.0 \
helm install rancher-turtles turtles/rancher-turtles --version <version> \
-n rancher-turtles-system \
--dependency-update \
--create-namespace --wait \
--timeout 180s
```
3. This operation could take a few minutes and once completed you can review the installed controllers listed below:
3. This operation could take a few minutes and after completing you can review the installed controllers listed below:
- `rancher-turtles-controller`
- `capi-operator`
:::note
- If `cert-manager` is already available in the cluster, disable its installation as a Rancher Turtles dependency. This prevents dependency conflicts:
`--set cluster-api-operator.cert-manager.enabled=false`
- For a list of Rancher Turtles versions, refer to the [Turtles release page](https://github.com/rancher/turtles/releases).
:::
This is the basic, recommended configuration, which manages the creation of a secret containing the required CAPI feature flags (`CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL` enabled) in the core provider namespace. These feature flags are required to enable additional CAPI functionality.
If you need to override the default behavior and use an existing secret (or add custom environment variables), you can pass the secret name helm flag. In this case, as a user, you are in charge of managing the secret creation and its content, including enabling the minimum required features: `CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL`.
If you need to override the default behavior and use an existing secret (or add custom environment variables), you can pass the secret name Helm flag. In this case, as a user, you are in charge of managing the secret creation and its content, including enabling the minimum required features: `CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL`.
```bash
helm install ...
@@ -117,16 +132,20 @@ stringData:
```
:::info
For detailed information on the values supported by the chart and their usage, refer to [Helm chart options](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values)
:::
#### Install Rancher Turtles without `Cluster API (CAPI) Operator` as a Helm dependency
#### Installing Rancher Turtles without `Cluster API (CAPI) Operator` as a Helm dependency
:::note
Remember that if you opt for this installation option, you must manage the CAPI Operator installation yourself. You can follow the [CAPI Operator guide](https://turtles.docs.rancher.com/docs/tasks/capi-operator/intro) in the Rancher Turtles documentation for assistance.
:::
1. Add the `rancher-turtles` chart from the in https://rancher.github.io/turtles Helm repository before installation:
1. Add the Helm repository containing the `rancher-turtles` chart as the first step in installation:
```bash
helm repo add turtles https://rancher.github.io/turtles
@@ -136,7 +155,7 @@ helm repo update
2. Install the chart into the `rancher-turtles-system` namespace:
```bash
helm install rancher-turtles turtles/rancher-turtles --version v0.5.0
helm install rancher-turtles turtles/rancher-turtles --version <version>
-n rancher-turtles-system
--set cluster-api-operator.enabled=false
--set cluster-api-operator.cluster-api.enabled=false
@@ -146,17 +165,21 @@ helm install rancher-turtles turtles/rancher-turtles --version v0.5.0
The previous commands tell Helm to ignore installing `cluster-api-operator` as a dependency.
3. This operation could take a few minutes and once completed you can review the installed controller listed below:
3. This operation could take a few minutes and after completing you can review the installed controller listed below:
- `rancher-turtles-controller`
## Uninstalling Rancher Turtles
:::caution
When installing Rancher Turtles in your Rancher environment, by default, Rancher Turtles enables the CAPI Operator cleanup. This includes cleaning up CAPI Operator specific webhooks and deployments that otherwise cause issues with Rancher provisioning.
To simplify uninstalling Rancher Turtles (via Rancher Manager or Helm command), the official Rancher Turtles Helm chart includes a `post-delete` hook that that removes the following:
To simplify uninstalling Rancher Turtles (via Rancher or Helm command), the official Rancher Turtles Helm chart includes a `post-delete` hook that that removes the following:
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks that are no longer needed.
- Deletes the CAPI `deployments` that are no longer needed.
:::
To uninstall Rancher Turtles:
@@ -168,12 +191,15 @@ helm uninstall -n rancher-turtles-system rancher-turtles --cascade foreground --
This may take a few minutes to complete.
:::note
Remember that, if you use a different name for the installation or a different namespace, you may need to customize the command for your specific configuration.
:::
Once Rancher Turtles is uninstalled, Rancher's `embedded-cluster-api` feature must be re-enabled:
After Rancher Turtles is uninstalled, Rancher's `embedded-cluster-api` feature must be re-enabled:
1. Create a `feature.yaml` file, with `embedded-cluster-api` set to true:
```yaml title="feature.yaml"
apiVersion: management.cattle.io/v3
kind: Feature
@@ -182,16 +208,16 @@ metadata:
spec:
value: true
```
2. Use `kubectl` to apply the `feature.yaml` file to the cluster:
```bash
kubectl apply -f feature.yaml
```
## Architecture Diagram
## Demo
Below is a visual representation of the key components of Rancher Turtles and their relationship to Rancher Manager and the Rancher Cluster Agent. Understanding these components is essential for gaining insights into how Rancher leverages the CAPI operator for cluster management.
![overview](/img/30000ft_view.png)
<iframe width="560" height="315" src="https://www.youtube.com/embed/lGsr7KfBjgU?si=ORkzuAJjcdXUXMxh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## Security
@@ -1,14 +1,14 @@
---
title: Cluster API with Rancher Turtles
title: Cluster API (CAPI) with Rancher Turtles
---
<head>
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/integrations-in-rancher/cluster-api"/>
</head>
Rancher Turtles is a [Rancher extension](../rancher-extensions.md) that manages the lifecycle of provisioned Kubernetes clusters, by providing integration between your Cluster API (CAPI) and Rancher. With Rancher Turtles, you can:
[Rancher Turtles](https://turtles.docs.rancher.com/) is a [Rancher extension](../rancher-extensions.md) that manages the lifecycle of provisioned Kubernetes clusters, by providing integration between your Cluster API (CAPI) and Rancher. With Rancher Turtles, you can:
- Import CAPI clusters into Rancher, by installing the Rancher Cluster Agent in CAPI provisioned clusters.
- Configure the CAPI Operator.
- Configure the [CAPI Operator](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values#cluster-api-operator-values).
The [Overview](./overview.md) section outlines installation options, Rancher Turtles architecture, and a brief demo. For more details, see the [Rancher Turtles documentation](https://turtles.docs.rancher.com/).
@@ -6,16 +6,29 @@ title: Overview
<link rel="canonical" href="https://ranchermanager.docs.rancher.com/integrations-in-rancher/cluster-api/overview"/>
</head>
## Demo
## Architecture Diagram
<iframe width="560" height="315" src="https://www.youtube.com/embed/lGsr7KfBjgU?si=ORkzuAJjcdXUXMxh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Below is a visual representation of the key components of Rancher Turtles and their relationship to Rancher and the Rancher Cluster Agent. Understanding these components is essential for gaining insights into how Rancher leverages the CAPI operator for cluster management.
![overview](/img/30000ft_view.png)
## Prerequisites
Before installing Rancher Turtles in your Rancher environment, you must disable Rancher's `embedded-cluster-api` functionality. This also includes cleaning up Rancher-specific webhooks that otherwise would conflict with CAPI ones.
To simplify setting up Rancher for installing Rancher Turtles, the official Rancher Turtles Helm chart includes a `pre-install` hook that removes the following:
- Disables the `embedded-cluster-api` feature in Rancher.
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks, as they are no longer needed.
## Installing the Rancher Turtles Operator
You can install the Rancher Turtles operator via the Rancher UI, or with Helm. The first method is recommended for most environments.
:::caution
If you already have the Cluster API (CAPI) Operator installed in your cluster, you must use the [manual Helm installation method](./overview.md#via-helm-install).
:::
:::info prerequisite
@@ -26,12 +39,10 @@ To simplify setting up Rancher for installing Rancher Turtles, the official Ranc
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks, as they are no longer needed.
:::
### Via Rancher UI
### Installing via the Rancher UI
By adding the Turtles repository via the Rancher UI, Rancher can process the installation and configuration of the CAPI Extension.
#### Installation
1. Click **☰**. Under **Explore Cluster** in the left navigation menu, select **local**.
1. In the left navigation menu of the **Cluster Dashboard**, select **Apps > Repositories**.
1. Click **Create** to add a new repository.
@@ -46,24 +57,25 @@ By adding the Turtles repository via the Rancher UI, Rancher can process the ins
This process uses the default values for the Helm chart, which are good for most installations. If your configuration requires overriding some of these defaults, you can either specify the values during installation from the Rancher UI or you can [manually install the chart via Helm](./overview.md#via-helm-install). For details about available values, see the Rancher Turtles [Helm chart reference guide](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values).
The installation may take a few minutes and once completed you will see the following new deployments in the cluster:
The installation may take a few minutes and after completing you can see the following new deployments in the cluster:
- `rancher-turtles-system/rancher-turtles-controller-manager`
- `rancher-turtles-system/rancher-turtles-cluster-api-operator`
- `capi-system/capi-controller-manager`
### Via Helm Install
### Installing via Helm
There are two ways to install Rancher Turtles with Helm, depending on whether you include the CAPI operator as a dependency:
- [Install Rancher Turtles with CAPI Operator as a dependency](#install-rancher-turtles-with-cluster-api-capi-operator-capi-as-a-helm-dependency).
- [Install Rancher Turtles with CAPI Operator as a dependency](#install-rancher-turtles-with-cluster-api-capi-operator-as-a-helm-dependency).
- [Install Rancher Turtles without CAPI Operator](#install-rancher-turtles-without-cluster-api-capi-operator-as-a-helm-dependency).
The CAPI Operator is required for installing Rancher Turtles. You can choose whether you want to take care of this dependency yourself or let the Rancher Turtles Helm chart manage it for you. [Installing Turtles as a dependency](#install-rancher-turtles-with-cluster-api-capi-operator-as-a-helm-dependency) is simpler, but your best option depends on your specific configuration.
The CAPI Operator allows for handling the lifecycle of CAPI providers using a declarative approach, extending the capabilities of `clusterctl`. If you want to learn more about it, you can refer to [Cluster API Operator book](https://cluster-api-operator.sigs.k8s.io/).
#### Install Rancher Turtles with `Cluster API (CAPI) Operator` as a Helm dependency
#### Installing Rancher Turtles with `Cluster API (CAPI) Operator` as a Helm dependency
1. The `rancher-turtles` chart is available in https://rancher.github.io/turtles. This Helm repository must be added before installation:
1. Add the Helm repository containing the `rancher-turtles` chart as the first step in installation:
```bash
helm repo add turtles https://rancher.github.io/turtles
@@ -73,26 +85,29 @@ helm repo update
2. As mentioned before, installing Rancher Turtles requires the [CAPI Operator](https://github.com/kubernetes-sigs/cluster-api-operator). The Helm chart can automatically install it with a minimal set of flags:
```bash
helm install rancher-turtles turtles/rancher-turtles --version v0.5.0 \
helm install rancher-turtles turtles/rancher-turtles --version <version> \
-n rancher-turtles-system \
--dependency-update \
--create-namespace --wait \
--timeout 180s
```
3. This operation could take a few minutes and once completed you can review the installed controllers listed below:
3. This operation could take a few minutes and after completing you can review the installed controllers listed below:
- `rancher-turtles-controller`
- `capi-operator`
:::note
- If `cert-manager` is already available in the cluster, disable its installation as a Rancher Turtles dependency. This prevents dependency conflicts:
`--set cluster-api-operator.cert-manager.enabled=false`
- For a list of Rancher Turtles versions, refer to the [Turtles release page](https://github.com/rancher/turtles/releases).
:::
This is the basic, recommended configuration, which manages the creation of a secret containing the required CAPI feature flags (`CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL` enabled) in the core provider namespace. These feature flags are required to enable additional CAPI functionality.
If you need to override the default behavior and use an existing secret (or add custom environment variables), you can pass the secret name helm flag. In this case, as a user, you are in charge of managing the secret creation and its content, including enabling the minimum required features: `CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL`.
If you need to override the default behavior and use an existing secret (or add custom environment variables), you can pass the secret name Helm flag. In this case, as a user, you are in charge of managing the secret creation and its content, including enabling the minimum required features: `CLUSTER_TOPOLOGY`, `EXP_CLUSTER_RESOURCE_SET` and `EXP_MACHINE_POOL`.
```bash
helm install ...
@@ -117,16 +132,20 @@ stringData:
```
:::info
For detailed information on the values supported by the chart and their usage, refer to [Helm chart options](https://turtles.docs.rancher.com/docs/reference-guides/rancher-turtles-chart/values)
:::
#### Install Rancher Turtles without `Cluster API (CAPI) Operator` as a Helm dependency
#### Installing Rancher Turtles without `Cluster API (CAPI) Operator` as a Helm dependency
:::note
Remember that if you opt for this installation option, you must manage the CAPI Operator installation yourself. You can follow the [CAPI Operator guide](https://turtles.docs.rancher.com/docs/tasks/capi-operator/intro) in the Rancher Turtles documentation for assistance.
:::
1. Add the `rancher-turtles` chart from the in https://rancher.github.io/turtles Helm repository before installation:
1. Add the Helm repository containing the `rancher-turtles` chart as the first step in installation:
```bash
helm repo add turtles https://rancher.github.io/turtles
@@ -136,7 +155,7 @@ helm repo update
2. Install the chart into the `rancher-turtles-system` namespace:
```bash
helm install rancher-turtles turtles/rancher-turtles --version v0.5.0
helm install rancher-turtles turtles/rancher-turtles --version <version>
-n rancher-turtles-system
--set cluster-api-operator.enabled=false
--set cluster-api-operator.cluster-api.enabled=false
@@ -146,17 +165,21 @@ helm install rancher-turtles turtles/rancher-turtles --version v0.5.0
The previous commands tell Helm to ignore installing `cluster-api-operator` as a dependency.
3. This operation could take a few minutes and once completed you can review the installed controller listed below:
3. This operation could take a few minutes and after completing you can review the installed controller listed below:
- `rancher-turtles-controller`
## Uninstalling Rancher Turtles
:::caution
When installing Rancher Turtles in your Rancher environment, by default, Rancher Turtles enables the CAPI Operator cleanup. This includes cleaning up CAPI Operator specific webhooks and deployments that otherwise cause issues with Rancher provisioning.
To simplify uninstalling Rancher Turtles (via Rancher Manager or Helm command), the official Rancher Turtles Helm chart includes a `post-delete` hook that that removes the following:
To simplify uninstalling Rancher Turtles (via Rancher or Helm command), the official Rancher Turtles Helm chart includes a `post-delete` hook that that removes the following:
- Deletes the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks that are no longer needed.
- Deletes the CAPI `deployments` that are no longer needed.
:::
To uninstall Rancher Turtles:
@@ -168,12 +191,15 @@ helm uninstall -n rancher-turtles-system rancher-turtles --cascade foreground --
This may take a few minutes to complete.
:::note
Remember that, if you use a different name for the installation or a different namespace, you may need to customize the command for your specific configuration.
:::
Once Rancher Turtles is uninstalled, Rancher's `embedded-cluster-api` feature must be re-enabled:
After Rancher Turtles is uninstalled, Rancher's `embedded-cluster-api` feature must be re-enabled:
1. Create a `feature.yaml` file, with `embedded-cluster-api` set to true:
```yaml title="feature.yaml"
apiVersion: management.cattle.io/v3
kind: Feature
@@ -182,16 +208,16 @@ metadata:
spec:
value: true
```
2. Use `kubectl` to apply the `feature.yaml` file to the cluster:
```bash
kubectl apply -f feature.yaml
```
## Architecture Diagram
## Demo
Below is a visual representation of the key components of Rancher Turtles and their relationship to Rancher Manager and the Rancher Cluster Agent. Understanding these components is essential for gaining insights into how Rancher leverages the CAPI operator for cluster management.
![overview](/img/30000ft_view.png)
<iframe width="560" height="315" src="https://www.youtube.com/embed/lGsr7KfBjgU?si=ORkzuAJjcdXUXMxh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
## Security