|
1 | 1 | ### Provision workload cluster in IBM Cloud PowerVS
|
2 | 2 |
|
| 3 | +> **Note:** |
| 4 | +> A PowerVS cluster can be deployed with different customisations. Pick one of the following templates as per your need and fulfill the [prerequisites](prerequisites.md) before proceeding with cluster creation. |
| 5 | +> - [PowerVS cluster with user provided resources](#deploy-a-powervs-cluster-with-user-provided-resources) |
| 6 | +> - [PowerVS cluster with infrastructure creation](#deploy-a-powervs-cluster-with-infrastructure-creation) |
| 7 | +> - [PowerVS cluster with external cloud provider](#deploy-a-powervs-cluster-with-external-cloud-provider) |
| 8 | +> - [PowerVS cluster with cluster class](#deploy-a-powervs-cluster-with-cluster-class) |
| 9 | +
|
3 | 10 | Now that we have a management cluster ready, you can create your workload cluster by
|
4 | 11 | following the steps below.
|
5 | 12 |
|
@@ -29,11 +36,11 @@ following the steps below.
|
29 | 36 | capi-test-port 163.68.65.6 192.168.167.6 fa:16:3e:89:c8:80 c7e7b6e0-0b0d-4a11-a90b-6ea293deb5ac DOWN
|
30 | 37 | ```
|
31 | 38 |
|
32 |
| -2. Use clusterctl to render the yaml through templates and deploy the cluster |
33 |
| - |
34 |
| - **Note:** To deploy workload cluster with PowerVS cloud controller manager which is currently in experimental stage follow [these](/topics/powervs/external-cloud-provider.html) steps. |
| 39 | +2. Use clusterctl to render the yaml through templates and deploy the cluster. |
| 40 | + **Replace the following snippet with the template of your choice.** |
35 | 41 |
|
36 |
| - **Note:** the `IBMPOWERVS_IMAGE_ID` value below should reflect the ID of the custom qcow2 image, the `kubernetes-version` value below should reflect the kubernetes version of the custom qcow2 image. |
| 42 | + > **Note:** |
| 43 | + > The `IBMPOWERVS_IMAGE_ID` value below should reflect the ID of the custom image and the `kubernetes-version` value below should reflect the kubernetes version of the custom image. |
37 | 44 |
|
38 | 45 | ```console
|
39 | 46 | IBMPOWERVS_SSHKEY_NAME="my-pub-key" \
|
@@ -123,4 +130,100 @@ following the steps below.
|
123 | 130 | ibm-powervs-1-control-plane-rg6xv Ready master 41h v1.26.2
|
124 | 131 | ibm-powervs-1-md-0-4dc5c Ready <none> 41h v1.26.2
|
125 | 132 | ibm-powervs-1-md-0-dbxb7 Ready <none> 20h v1.26.2
|
126 |
| - ``` |
| 133 | + |
| 134 | +### Deploy a PowerVS cluster with user provided resources |
| 135 | + |
| 136 | + ``` |
| 137 | + IBMPOWERVS_SSHKEY_NAME="my-pub-key" \ |
| 138 | + IBMPOWERVS_VIP="192.168.167.6" \ |
| 139 | + IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \ |
| 140 | + IBMPOWERVS_VIP_CIDR="29" \ |
| 141 | + IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \ |
| 142 | + IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \ |
| 143 | + IBMPOWERVS_NETWORK_NAME="capi-test" \ |
| 144 | + clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \ |
| 145 | + --target-namespace default \ |
| 146 | + --control-plane-machine-count=3 \ |
| 147 | + --worker-machine-count=1 \ |
| 148 | + --flavor=powervs | kubectl apply -f - |
| 149 | + ``` |
| 150 | +
|
| 151 | +### Deploy a PowerVS cluster with infrastructure creation |
| 152 | +
|
| 153 | +#### Prerequisites: |
| 154 | +- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager. |
| 155 | +- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable. |
| 156 | +- Already existing infrasturcture resources can be used for cluster creation by setting either the ID or name in spec. If neither are specified, the cluster name will be used for constructing the resource name. For example, if cluster name is `capi-powervs`, PowerVS workspace will be created with name `capi-powervs-serviceInstance`. |
| 157 | + ``` |
| 158 | + ``` |
| 159 | +
|
| 160 | + ``` |
| 161 | + IBMCLOUD_API_KEY=XXXXXXXXXXXX \ |
| 162 | + IBMPOWERVS_SSHKEY_NAME="my-ssh-key" \ |
| 163 | + COS_BUCKET_REGION="us-south" \ |
| 164 | + COS_BUCKET_NAME="power-oss-bucket" \ |
| 165 | + COS_OBJECT_NAME=capibm-powervs-centos-streams8-1-28-4-1707287079.ova.gz \ |
| 166 | + IBMACCOUNT_ID="<account_id>" \ |
| 167 | + IBMPOWERVS_REGION="wdc" \ |
| 168 | + IBMPOWERVS_ZONE="wdc06" \ |
| 169 | + IBMVPC_REGION="us-east" \ |
| 170 | + IBM_RESOURCE_GROUP="ibm-resource-group" \ |
| 171 | + BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \ |
| 172 | + clusterctl generate cluster capi-powervs --kubernetes-version v1.28.4 \ |
| 173 | + --target-namespace default \ |
| 174 | + --control-plane-machine-count=3 \ |
| 175 | + --worker-machine-count=1 \ |
| 176 | + --flavor=powervs-create-infra | kubectl apply -f - |
| 177 | + ``` |
| 178 | +
|
| 179 | +### Deploy a PowerVS cluster with external cloud provider |
| 180 | +
|
| 181 | +#### Prerequisites: |
| 182 | +- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager. |
| 183 | +- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable. |
| 184 | +
|
| 185 | + ``` |
| 186 | + IBMPOWERVS_SSHKEY_NAME="my-pub-key" \ |
| 187 | + IBMPOWERVS_VIP="192.168.167.6" \ |
| 188 | + IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \ |
| 189 | + IBMPOWERVS_VIP_CIDR="29" \ |
| 190 | + IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \ |
| 191 | + IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \ |
| 192 | + IBMPOWERVS_NETWORK_NAME="capi-test" \ |
| 193 | + IBMACCOUNT_ID="ibm-accountid" \ |
| 194 | + IBMPOWERVS_REGION="osa" \ |
| 195 | + IBMPOWERVS_ZONE="osa21" \ |
| 196 | + BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \ |
| 197 | + clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \ |
| 198 | + --target-namespace default \ |
| 199 | + --control-plane-machine-count=3 \ |
| 200 | + --worker-machine-count=1 \ |
| 201 | + --flavor=powervs-cloud-provider | kubectl apply -f - |
| 202 | + ``` |
| 203 | +
|
| 204 | +### Deploy a PowerVS cluster with cluster class |
| 205 | +
|
| 206 | +#### Prerequisites: |
| 207 | +- To deploy a cluster using [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html), set `CLUSTER_TOPOLOGY` environment variable to `true`. |
| 208 | +- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager. |
| 209 | +- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable. |
| 210 | +
|
| 211 | + ``` |
| 212 | + IBMPOWERVS_CLUSTER_CLASS_NAME="powervs-cc" \ |
| 213 | + IBMPOWERVS_SSHKEY_NAME="my-pub-key" \ |
| 214 | + IBMPOWERVS_VIP="192.168.167.6" \ |
| 215 | + IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \ |
| 216 | + IBMPOWERVS_VIP_CIDR="29" \ |
| 217 | + IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \ |
| 218 | + IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \ |
| 219 | + IBMPOWERVS_NETWORK_NAME="capi-test" \ |
| 220 | + IBMACCOUNT_ID="ibm-accountid" \ |
| 221 | + IBMPOWERVS_REGION="osa" \ |
| 222 | + IBMPOWERVS_ZONE="osa21" \ |
| 223 | + BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \ |
| 224 | + clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \ |
| 225 | + --target-namespace default \ |
| 226 | + --control-plane-machine-count=3 \ |
| 227 | + --worker-machine-count=1 \ |
| 228 | + --flavor=powervs-clusterclass | kubectl apply -f - |
| 229 | + ``` |
0 commit comments