Skip to content

Commit bd38f7a

Browse files
Add CAPI operator quickstart docs
Signed-off-by: alexander-demicev <alexandr.demicev@suse.com>
1 parent d16a9b6 commit bd38f7a

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

docs/quickstart.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Quickstart
2+
3+
This is a quickstart guide for getting Cluster API Operator up and running on your Kubernetes cluster.
4+
5+
For more detailed information, please refer to the full documentation.
6+
7+
## Prerequisites
8+
9+
- [Running Kubernetes cluster](https://cluster-api.sigs.k8s.io/user/quick-start#install-andor-configure-a-kubernetes-cluster).
10+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) for interacting with the management cluster.
11+
- [Helm](https://helm.sh/docs/intro/install/) for installing operator on the cluster (optional).
12+
13+
## Install and configure Cluster API Operator
14+
15+
### Configuring credential for cloud providers
16+
17+
Instead of using environment variables as clusterctl does, Cluster API Operator uses Kubernetes secrets to store credentials for cloud providers. Refer to [provider documentation](https://cluster-api.sigs.k8s.io/user/quick-start#initialization-for-common-providers) on which credentials are required.
18+
19+
This example uses AWS provider, but the same approach can be used for other providers.
20+
21+
```bash
22+
export CREDENTIALS_SECRET_NAME="credentials-secret"
23+
export CREDENTIALS_SECRET_NAMESPACE="default"
24+
25+
kubectl create secret generic "${CREDENTIALS_SECRET_NAME}" --from-literal=AWS_B64ENCODED_CREDENTIALS="${AWS_B64ENCODED_CREDENTIALS}" --namespace "${CREDENTIALS_SECRET_NAMESPACE}"
26+
```
27+
28+
### Installing Cluster API Operator
29+
30+
Add helm repository:
31+
32+
```bash
33+
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
34+
helm repo update
35+
```
36+
37+
Deploy Cluster API components with docker provider with a single command during operator installation:
38+
39+
```bash
40+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system --set infrastructure=docker --set cert-manager.enabled=true --set configSecret.name=${CREDENTIALS_SECRET_NAME} --set configSecret.namespace=${CREDENTIALS_SECRET_NAMESPACE} --wait --timeout 90s
41+
```
42+
43+
Docker provider can be replaced by any provider supported by [clusterctl](https://cluster-api.sigs.k8s.io/reference/providers.html?highlight=hetz#infrastructure)
44+
45+
Other options for installing Cluster API Operator are described in [full documentation](README.md#installation).
46+
47+
# Example API Usage
48+
49+
Deploy latest version of core Cluster API components:
50+
51+
```yaml
52+
apiVersion: operator.cluster.x-k8s.io/v1alpha2
53+
kind: CoreProvider
54+
metadata:
55+
name: cluster-api
56+
namespace: capi-system
57+
58+
```
59+
60+
Deploy Cluster API AWS provider with specific version, custom manager options and flags:
61+
62+
```yaml
63+
apiVersion: v1
64+
kind: Secret
65+
metadata:
66+
name: aws-variables
67+
namespace: capa-system
68+
type: Opaque
69+
data:
70+
AWS_B64ENCODED_CREDENTIALS: ...
71+
---
72+
apiVersion: operator.cluster.x-k8s.io/v1alpha2
73+
kind: InfrastructureProvider
74+
metadata:
75+
name: aws
76+
namespace: capa-system
77+
spec:
78+
version: v2.1.4
79+
configSecret:
80+
name: aws-variables
81+
manager:
82+
# These top level controller manager flags, supported by all the providers.
83+
# These flags come with sensible defaults, thus requiring no or minimal
84+
# changes for the most common scenarios.
85+
metrics:
86+
bindAddress: ":8181"
87+
syncPeriod: "500s"
88+
fetchConfig:
89+
url: https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases
90+
deployment:
91+
containers:
92+
- name: manager
93+
args:
94+
# These are controller flags that are specific to a provider; usage
95+
# is reserved for advanced scenarios only.
96+
"--awscluster-concurrency": "12"
97+
"--awsmachine-concurrency": "11"
98+
```

0 commit comments

Comments
 (0)