-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helm quick-start guide for operator, turtles and rancher #12
Changes from 8 commits
6ac6708
a8dee3a
cef96ec
5df3b7c
ec8b0c5
a3a680e
da3f412
217f9d1
04615c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,6 +2,71 @@ | |||||
sidebar_position: 3 | ||||||
--- | ||||||
|
||||||
# Install CAPI Operator | ||||||
# Install Cluster API Operator | ||||||
|
||||||
This section needs to be filled out. | ||||||
This section describes how to install `Cluster API Operator` in the kubernetes cluster. | ||||||
|
||||||
## Installing CAPI and providers | ||||||
|
||||||
`CAPI` and desired `CAPI` providers could be installed using helm based installation for [`Cluster API Operator`](https://github.com/kubernetes-sigs/cluster-api-operator) or as a helm dependency for the `Rancher Turtles`. | ||||||
|
||||||
### Install as a `Rancher Turtles` dependency | ||||||
|
||||||
See the `Rancher Turtles` section for installing operator as a Helm [dependency](./install_turtles_operator.md#install-cluster-api-operator-as-a-helm-dependency) | ||||||
|
||||||
### Install with Helm | ||||||
To install `Cluster API Operator` with version `1.4.4` of the `CAPI` + `Docker` provider using helm, follow these steps: | ||||||
|
||||||
1. Add the Helm repository for the `Cluster API Operator` by running the following command: | ||||||
```bash | ||||||
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator | ||||||
``` | ||||||
2. Update the Helm repository by running the following command: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
```bash | ||||||
helm repo update | ||||||
``` | ||||||
3. Install the `Cluster API Operator` using the following command, which will also install `cert-manager`: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
```bash | ||||||
helm install capi-operator capi-operator/cluster-api-operator | ||||||
Danil-Grigorev marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
--create-namespace -n capi-operator-system | ||||||
--set infrastructure=docker:v1.4.4 | ||||||
--set cert-manager.enabled=true | ||||||
--timeout 90s --wait # Core Cluster API with kubeadm bootstrap and control plane providers will also be installed | ||||||
``` | ||||||
*Note: `cert-manager` is a hard requirement for CAPI and `Cluster API Operator`* | ||||||
Danil-Grigorev marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
To provide additional environment variables, choose some feature gates, or provide cloud credentials, similar to `clusterctl` [common provider](https://cluster-api.sigs.k8s.io/user/quick-start#initialization-for-common-providers), in `Cluster API Operator`, a variables secret could be used. A `name` and a `namespace` of the secret could be specified for the `Cluster API Operator`. | ||||||
Danil-Grigorev marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```bash | ||||||
helm install capi-operator capi-operator/cluster-api-operator | ||||||
--create-namespace -n capi-operator-system | ||||||
--set infrastructure=docker:v1.4.4 | ||||||
--set cert-manager.enabled=true | ||||||
--timeout 90s | ||||||
--secret-name <secret_name> | ||||||
--secret-namespace <secret_namespace> | ||||||
--wait | ||||||
``` | ||||||
|
||||||
Example secret data: | ||||||
```yaml | ||||||
apiVersion: v1 | ||||||
kind: Secret | ||||||
metadata: | ||||||
name: variables | ||||||
namespace: default | ||||||
type: Opaque | ||||||
stringData: | ||||||
CLUSTER_TOPOLOGY: "true" | ||||||
EXP_CLUSTER_RESOURCE_SET: "true" | ||||||
``` | ||||||
|
||||||
To select more than one desired provider to be installed together with the `Cluster API Operator`, the `--infrastructure` flag can be specified with multiple provider names separated by a comma. For example: | ||||||
|
||||||
```bash | ||||||
helm install ... infrastructure="docker:v1.4.4;azure:v1.4.4" | ||||||
``` | ||||||
|
||||||
richardcase marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
The `infrastructure` flag is set to `docker:v1.4.4;azure:v1.4.4`, representing the desired provider names. This means that the `Cluster API Operator` will install and manage multiple provider systems, `Docker` and `Azure` respectively, with versions `1.4.4` specified. | ||||||
|
||||||
For more fine-grained control on the providers and other components installed with CAPI, see the [Add infrastructure provider](../tasks/capi-operator/add_infrastructure_provider.md) section. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,48 @@ | ||||||
--- | ||||||
sidebar_position: 1 | ||||||
sidebar_position: 2 | ||||||
--- | ||||||
|
||||||
# Add Infrastructure Provider | ||||||
|
||||||
In this section we will cover how to add an infrastructure proviedr such as AWS. | ||||||
This section describes how an infrastructure provider such as `Azure` could be added using `Cluster API Operator`. | ||||||
|
||||||
### Installing Azure Infrastructure Provider | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we refer to the capi operator docs instead of duplicating it? My concern is, keeping this up-to-date with capi operator docs might be challenging in the future There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can always pin it to a version of the operator docs to use, and the docs are describing a fixed state of some release of operator and turtles IMO. Additionally the value of the documentation is in simple access to the most common use cases in a single unified location. We may explore some better documentation options for the CAPI Operator, as a single README.md file is quite inconvenient to always refer to. It could clearly be separated into multiple sections. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 for deduplicating |
||||||
|
||||||
Next, install [Azure Infrastructure Provider](https://capz.sigs.k8s.io/). Before that ensure that `capz-system` namespace exists. | ||||||
|
||||||
Since the provider requires variables to be set, create a secret containing them in the same namespace as the provider. It is also recommended to include a `github-token` in the secret. This token is used to fetch the provider repository, and it is required for the provider to be installed. The operator may exceed the rate limit of the GitHub API without the token. Like [clusterctl](https://cluster-api.sigs.k8s.io/clusterctl/overview.html?highlight=github_token#avoiding-github-rate-limiting), the token needs only the `repo` scope. | ||||||
|
||||||
```yaml | ||||||
--- | ||||||
apiVersion: v1 | ||||||
kind: Secret | ||||||
metadata: | ||||||
name: azure-variables | ||||||
namespace: capz-system | ||||||
type: Opaque | ||||||
stringData: | ||||||
AZURE_CLIENT_ID_B64: Zm9vCg== | ||||||
AZURE_CLIENT_SECRET_B64: Zm9vCg== | ||||||
AZURE_SUBSCRIPTION_ID_B64: Zm9vCg== | ||||||
AZURE_TENANT_ID_B64: Zm9vCg== | ||||||
github-token: ghp_fff | ||||||
--- | ||||||
apiVersion: operator.cluster.x-k8s.io/v1alpha1 | ||||||
kind: InfrastructureProvider | ||||||
metadata: | ||||||
name: azure | ||||||
namespace: capz-system | ||||||
spec: | ||||||
version: v1.9.3 | ||||||
configSecret: | ||||||
name: azure-variables | ||||||
``` | ||||||
|
||||||
### Deleting providers | ||||||
|
||||||
To remove the installed providers and all related kubernetes objects just delete the following CRs: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```bash | ||||||
kubectl delete coreprovider cluster-api | ||||||
kubectl delete infrastructureprovider azure | ||||||
``` |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||
--- | ||||||
sidebar_position: 1 | ||||||
--- | ||||||
|
||||||
# Basic Cluster API Provider Installation | ||||||
|
||||||
This section describes the basic process of installing `CAPI` providers using the operator. The `Cluster API Operator` manages five types of objects: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- `CoreProvider` | ||||||
- `BootstrapProvider` | ||||||
- `ControlPlaneProvider` | ||||||
- `InfrastructureProvider` | ||||||
- `AddonProvider` | ||||||
|
||||||
Please note that this example provides a basic configuration of Azure Infrastructure provider for getting started. More detailed examples and CRD descriptions are provided in the `Cluster API Operator` [documentation](https://github.com/kubernetes-sigs/cluster-api-operator/tree/main/docs#readme) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Installing the CoreProvider | ||
|
||
This section describes how to install the CoreProvider, which is responsible for managing the Cluster API CRDs and the Cluster API controller. | ||
|
||
Any existing namespace could be utilized for providers in the Kubernetes cluster. However, before creating a provider object, make sure the specified namespace has been created. In the example below, we use the `capi-system` namespace. To create this namespace through either the Command Line Interface (CLI) by running `kubectl create namespace capi-system`, or the declarative approach described in the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/administer-cluster/namespaces-walkthrough/#create-new-namespaces) could be used. | ||
|
||
*Example:* | ||
|
||
```yaml | ||
apiVersion: operator.cluster.x-k8s.io/v1alpha2 | ||
kind: CoreProvider | ||
metadata: | ||
name: cluster-api | ||
namespace: capi-system | ||
spec: | ||
version: v1.4.4 | ||
``` | ||
|
||
**Note:** Only one CoreProvider can be installed at the same time on a single cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.