Skip to content

Commit 19c0388

Browse files
authored
Merge pull request #449 from Danil-Grigorev/docs-content
📖 Fill the book content with the current README.md
2 parents 006442f + 9f992a3 commit 19c0388

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+773
-76
lines changed

docs/book/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
2222
EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
2323
RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
2424
MDBOOK := $(TOOLS_BIN_DIR)/bin/mdbook
25+
FS_SUMMARY := $(TOOLS_BIN_DIR)/bin/mdbook-fs-summary
2526

2627
export PATH := $(abspath $(TOOLS_BIN_DIR)/bin):$(PATH)
2728

28-
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK)
29+
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK) $(FS_SUMMARY)
2930

3031
$(TOOLS_BIN_DIR)/%: $(TOOLS_DIR_DEPS)
3132
make -C $(TOOLS_DIR) $(subst $(TOOLS_DIR)/,,$@)

docs/book/book.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ src = "src"
55
title = "Cluster API Operator"
66
description = "Cluster API Operator"
77

8+
[preprocessor.toc]
9+
command = "mdbook-toc"
10+
marker = "[[_TOC_]]"
11+
12+
[preprocessor.fs-summary]
13+
# (default: true)
14+
clean-paths = false
15+
16+
# other preprocessors will naturally need to
17+
# run after the summary has been generated
18+
[preprocessor.links]
19+
after = ["fs-summary"]
20+
821
[output.html]
922
mathjax-support = true
1023
git-repository-url = "https://github.com/kubernetes-sigs/cluster-api-operator"
@@ -22,4 +35,4 @@ command = "./util-tabulate.sh"
2235
command = "./util-embed.sh"
2336

2437
[preprocessor.releaselink]
25-
command = "./util-releaselink.sh"
38+
command = "./util-releaselink.sh"
File renamed without changes.

docs/book/src/01_user/00.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# User guide
2+
3+
This section contains quick start and concepts relevant to a new operator user.
File renamed without changes.

docs/book/src/user/quick-start.md renamed to docs/book/src/01_user/02_quick-start.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This is a quickstart guide for getting Cluster API Operator up and running on your Kubernetes cluster.
44

5+
For more detailed information, please refer to the full documentation.
6+
57
## Prerequisites
68

79
- [Running Kubernetes cluster](https://cluster-api.sigs.k8s.io/user/quick-start#install-andor-configure-a-kubernetes-cluster).
@@ -25,42 +27,47 @@ kubectl create secret generic "${CREDENTIALS_SECRET_NAME}" --from-literal=AWS_B6
2527

2628
### Installing Cluster API Operator
2729

28-
#### Method 1: Apply Manifests from Release Assets
29-
30-
Before installing the Cluster API Operator this way, you must first ensure that cert-manager is installed, as the operator does not manage cert-manager installations. To install cert-manager, run the following command:
31-
32-
```bash
33-
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
34-
```
35-
36-
Wait for cert-manager to be ready before proceeding.
37-
38-
After cert-manager is successfully installed, you can install the Cluster API operator directly by applying the latest release assets:
30+
Add helm repository:
3931

4032
```bash
41-
kubectl apply -f https://github.com/kubernetes-sigs/cluster-api-operator/releases/latest/download/operator-components.yaml
33+
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
34+
helm repo update
4235
```
4336

44-
#### Method 2: Use Helm Charts
45-
46-
Alternatively, you can install the Cluster API operator using Helm charts:
37+
Deploy Cluster API components with docker provider using a single command during operator installation
4738

4839
```bash
49-
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
50-
helm repo update
51-
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system
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
5241
```
5342

54-
##### Installing cert-manager using Helm chart
43+
Docker provider can be replaced by any provider supported by [clusterctl](https://cluster-api.sigs.k8s.io/reference/providers.html#infrastructure).
5544

56-
CAPI operator Helm chart supports provisioning of cert-manager as a dependency. It is disabled by default, but you can enable it with `--set cert-manager.enabled=true` option to `helm install` command or inside of `cert-manager` section in [values.yaml](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/hack/charts/cluster-api-operator/values.yaml) file. Additionally you can define other [parameters](https://artifacthub.io/packages/helm/cert-manager/cert-manager#configuration) provided by the cert-manager chart.
45+
Other options for installing Cluster API Operator are described in [installation documentation](../02_installation/).
46+
47+
# Example API Usage
5748

58-
##### Installing providers using Helm chart
49+
Deploy latest version of core Cluster API components:
5950

60-
Deploy Cluster API components with docker provider using a single command during operator installation:
51+
```yaml
52+
apiVersion: operator.cluster.x-k8s.io/v1alpha2
53+
kind: CoreProvider
54+
metadata:
55+
name: cluster-api
56+
namespace: capi-system
6157

62-
```bash
63-
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
6458
```
6559

66-
Docker provider can be replaced by any provider supported by [clusterctl](https://cluster-api.sigs.k8s.io/reference/providers.html#infrastructure).
60+
Deploy Cluster API AWS provider with specific version, custom manager options and flags:
61+
62+
```yaml
63+
---
64+
apiVersion: operator.cluster.x-k8s.io/v1alpha2
65+
kind: InfrastructureProvider
66+
metadata:
67+
name: aws
68+
namespace: capa-system
69+
spec:
70+
version: v2.1.4
71+
configSecret:
72+
name: aws-variables
73+
```
File renamed without changes.
File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Using Manifests from Release Assets
2+
3+
Before installing the Cluster API Operator this way, you must first ensure that cert-manager is installed, as the operator does not manage cert-manager installations. To install cert-manager, run the following command:
4+
5+
```bash
6+
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
7+
```
8+
9+
Wait for cert-manager to be ready before proceeding.
10+
11+
After cert-manager is successfully installed, you can install the Cluster API operator directly by applying the latest release assets:
12+
13+
```bash
14+
kubectl apply -f https://github.com/kubernetes-sigs/cluster-api-operator/releases/latest/download/operator-components.yaml
15+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Using Helm Charts
2+
3+
Alternatively, you can install the Cluster API operator using Helm charts:
4+
5+
```bash
6+
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
7+
helm repo update
8+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system
9+
```
10+
11+
#### Installing cert-manager using Helm chart
12+
13+
CAPI operator Helm chart supports provisioning of cert-manager as a dependency. It is disabled by default, but you can enable it with `--set cert-manager.enabled=true` option to `helm install` command or inside of `cert-manager` section in [values.yaml](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/hack/charts/cluster-api-operator/values.yaml) file. Additionally you can define other [parameters](https://artifacthub.io/packages/helm/cert-manager/cert-manager#configuration) provided by the cert-manager chart.
14+
15+
#### Installing providers using Helm chart
16+
17+
The operator Helm chart supports a "quickstart" option for bootstrapping a management cluster. The user experience is relatively similar to [clusterctl init](https://cluster-api.sigs.k8s.io/clusterctl/commands/init.html?highlight=init#clusterctl-init):
18+
19+
```bash
20+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system --set infrastructure=docker:v1.4.2 --wait --timeout 90s # core Cluster API with kubeadm bootstrap and control plane providers will also be installed
21+
```
22+
23+
```bash
24+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system —set infrastructure="docker;azure" --wait --timeout 90s # core Cluster API with kubeadm bootstrap and control plane providers will also be installed
25+
```
26+
27+
```bash
28+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system —set infrastructure="capd-custom-ns:docker:v1.4.2;capz-custom-ns:azure:v1.10.0" --wait --timeout 90s # core Cluster API with kubeadm bootstrap and control plane providers will also be installed
29+
```
30+
31+
```bash
32+
helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system --set core=cluster-api:v1.4.2 --set controlPlane=kubeadm:v1.4.2 --set bootstrap=kubeadm:v1.4.2 --set infrastructure=docker:v1.4.2 --wait --timeout 90s
33+
```
34+
35+
For more complex operations, please refer to our API documentation.

0 commit comments

Comments
 (0)