Skip to content

Commit

Permalink
Add documentation for VPC clusterclass
Browse files Browse the repository at this point in the history
  • Loading branch information
kishen-v committed Nov 19, 2023
1 parent f5e1c4a commit be94478
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [Uploading an image](topics/vpc/uploading-an-image.md)
- [Creating a cluster](./topics/vpc/creating-a-cluster.md)
- [Creating a cluster with Load Balancer and External Cloud Provider](./topics/vpc/load-balancer.md)
- [Creating a cluster from ClusterClass](./topics/vpc/clusterclass-cluster.md)
- [PowerVS Cluster](./topics/powervs/index.md)
- [Prerequisites](./topics/powervs/prerequisites.md)
- [Creating a cluster](./topics/powervs/creating-a-cluster.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/book/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ it into a management cluster using `clusterctl`.
```
> Note: `EXP_CLUSTER_RESOURCE_SET` should be set for deploying workload cluster with Cloud Controller manager.

### Deploy PowerVS cluster with ClusterClass template
### Deploy PowerVS cluster or VPC cluster with ClusterClass template

To deploy workload cluster with [PowerVS clusterclass-template](/topics/powervs/clusterclass-cluster.html). Set the following environmental variables.
To deploy workload cluster with [PowerVS clusterclass-template](/topics/powervs/clusterclass-cluster.html) or [VPC clusterclass-template](/topics/VPC/clusterclass-cluster.html). Set the following environmental variables.

```console
export PROVIDER_ID_FORMAT=v2
export EXP_CLUSTER_RESOURCE_SET=true
export CLUSTER_TOPOLOGY=true
```
> Note: Currently, both [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html) and [ClusterResourceset](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) are experimental feature so we need to enable the feature gate by setting `EXP_CLUSTER_RESOURCE_SET`, `CLUSTER_TOPOLOGY` environmental variables.

> Note: Currently, both [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html) and [ClusterResourceSet](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) are experimental feature so we need to enable the feature gate by setting `EXP_CLUSTER_RESOURCE_SET`, `CLUSTER_TOPOLOGY` environmental variables.
23 changes: 23 additions & 0 deletions docs/book/src/topics/vpc/clusterclass-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Create IBM VPC Cluster Using ClusterClass

## Preface
- To deploy IBM Cloud VPC workload cluster using [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html), create a cluster configuration from the [clusterclass-template](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/main/templates/cluster-template-vpc-clusterclass.yaml).
- The [clusterclass-template](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/main/templates/cluster-template-vpc-clusterclass.yaml) will use [ClusterResourceSet](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) and will create the necessary config map, secret and roles to run the cloud controller manager
- The flags EXP_CLUSTER_RESOURCE_SET and CLUSTER_TOPOLOGY need to be set to true.

A comprehensive list of IBM Cloud VPC Regions and Zones can be found [here](/reference/regions-zones-mapping.html)

## Deploy a cluster using IBM Cloud VPC infrastructure using ClusterClass
```shell
IBMVPC_CLUSTER_CLASS_NAME=ibmvpc-clusteclass \
IBMVPC_REGION= <IBM Cloud VPC region> \
IBMVPC_ZONE= <IBM Cloud VPC zone> \
IBMVPC_RESOURCEGROUP= <Resource Group of the associated IBM Cloud account> \
IBMVPC_NAME= <Name of VPC> \
IBMVPC_IMAGE_NAME=capibm-vpc-ubuntu-2004-kube-v1-26-2 \
IBMVPC_PROFILE=bx2-4x16 \
IBMVPC_SSHKEY_NAME= <SSH key to be used> \
BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \
IBMACCOUNT_ID= <IBM Account ID> \
clusterctl generate cluster ibm-mix-clusterclass --kubernetes-version v1.26.2 --target-namespace default --control-plane-machine-count=1 --worker-machine-count=2 --from=./templates/cluster-template-vpc-clusterclass.yaml | kubectl apply -f -
```
1 change: 1 addition & 0 deletions docs/book/src/topics/vpc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- [Prerequisites](/topics/vpc/prerequisites.html)
- [Uploading an image](/topics/vpc/uploading-an-image.html)
- [Creating a cluster](/topics/vpc/creating-a-cluster.html)
- [Creating a cluster from ClusterClass](/topics/vpc/clusterclass-cluster.md)

0 comments on commit be94478

Please sign in to comment.