diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index fb3696ecb..f7400e0a2 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -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) diff --git a/docs/book/src/getting-started.md b/docs/book/src/getting-started.md index d8292e56c..64ac3c40e 100644 --- a/docs/book/src/getting-started.md +++ b/docs/book/src/getting-started.md @@ -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. \ No newline at end of file + + > 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. \ No newline at end of file diff --git a/docs/book/src/topics/vpc/clusterclass-cluster.md b/docs/book/src/topics/vpc/clusterclass-cluster.md new file mode 100644 index 000000000..f026f9d28 --- /dev/null +++ b/docs/book/src/topics/vpc/clusterclass-cluster.md @@ -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= \ +IBMVPC_ZONE= \ +IBMVPC_RESOURCEGROUP= \ +IBMVPC_NAME= \ +IBMVPC_IMAGE_NAME=capibm-vpc-ubuntu-2004-kube-v1-26-2 \ +IBMVPC_PROFILE=bx2-4x16 \ +IBMVPC_SSHKEY_NAME= \ +BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \ +IBMACCOUNT_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 - +``` diff --git a/docs/book/src/topics/vpc/index.md b/docs/book/src/topics/vpc/index.md index d8a0123a5..fa5e65cd6 100644 --- a/docs/book/src/topics/vpc/index.md +++ b/docs/book/src/topics/vpc/index.md @@ -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)