|
| 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 Cluster API Operator |
| 14 | + |
| 15 | +```bash |
| 16 | +helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator |
| 17 | +helm repo update |
| 18 | +helm install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system |
| 19 | +``` |
| 20 | + |
| 21 | +Deploy Cluster API provider with a single command during operator installation: |
| 22 | + |
| 23 | +```bash |
| 24 | +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 |
| 25 | +``` |
| 26 | + |
| 27 | +```bash |
| 28 | +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 |
| 29 | +``` |
| 30 | + |
| 31 | +```bash |
| 32 | +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 |
| 33 | +``` |
| 34 | + |
| 35 | +```bash |
| 36 | +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 |
| 37 | +``` |
| 38 | + |
| 39 | +# Example API Usage |
| 40 | + |
| 41 | +Deploy latest version of core Cluster API components: |
| 42 | + |
| 43 | +```yaml |
| 44 | +apiVersion: operator.cluster.x-k8s.io/v1alpha2 |
| 45 | +kind: CoreProvider |
| 46 | +metadata: |
| 47 | + name: cluster-api |
| 48 | + namespace: capi-system |
| 49 | + |
| 50 | +``` |
| 51 | + |
| 52 | +Deploy Cluster API AWS provider with specific version, custom manager options and flags: |
| 53 | + |
| 54 | +```yaml |
| 55 | +apiVersion: v1 |
| 56 | +kind: Secret |
| 57 | +metadata: |
| 58 | + name: aws-variables |
| 59 | + namespace: capa-system |
| 60 | +type: Opaque |
| 61 | +data: |
| 62 | + AWS_B64ENCODED_CREDENTIALS: ... |
| 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 | + manager: |
| 74 | + # These top level controller manager flags, supported by all the providers. |
| 75 | + # These flags come with sensible defaults, thus requiring no or minimal |
| 76 | + # changes for the most common scenarios. |
| 77 | + metrics: |
| 78 | + bindAddress: ":8181" |
| 79 | + syncPeriod: "500s" |
| 80 | + fetchConfig: |
| 81 | + url: https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases |
| 82 | + deployment: |
| 83 | + containers: |
| 84 | + - name: manager |
| 85 | + args: |
| 86 | + # These are controller flags that are specific to a provider; usage |
| 87 | + # is reserved for advanced scenarios only. |
| 88 | + "--awscluster-concurrency": "12" |
| 89 | + "--awsmachine-concurrency": "11" |
| 90 | +``` |
0 commit comments