-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added documentaion for usage of ClusterClass to create Power VS cluster #969
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,10 @@ extra_args: | |
- '-v=5' | ||
``` | ||
|
||
To deploy workload cluster with [Power VS cloud controller manager](/topics/powervs/external-cloud-provider.html) which is currently in experimental stage, Set `POWERVS_PROVIDER_ID_FORMAT` to `v2` under kustomize_substitutions. | ||
### 1. Configuration to deploy workload cluster with external cloud controller manager | ||
|
||
To deploy workload cluster with [Power VS cloud controller manager](/topics/powervs/external-cloud-provider.html) which is currently in experimental stage, Set `POWERVS_PROVIDER_ID_FORMAT` to `v2` and enable cluster resourceset feature gateunder kustomize_substitutions. | ||
Currently, [ClusterResourceset](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) is experimental feature so we need to enable the feature gate by setting `EXP_CLUSTER_RESOURCE_SET` variable under kustomize_substitutions. | ||
|
||
```yaml | ||
default_registry: "gcr.io/you-project-name-here" | ||
|
@@ -68,8 +71,31 @@ enable_providers: | |
kustomize_substitutions: | ||
IBMCLOUD_API_KEY: "XXXXXXXXXXXXXXXXXX" | ||
POWERVS_PROVIDER_ID_FORMAT: "v2" | ||
EXP_CLUSTER_RESOURCE_SET: "true" | ||
``` | ||
|
||
### 2. Configuration to deploy workload cluster from ClusterClass template | ||
|
||
To deploy workload cluster with [clusterclass-template](/topics/powervs/clusterclass-cluster.html) under kustomize_substitutions set `POWERVS_PROVIDER_ID_FORMAT` to `v2`. | ||
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` variable under kustomize_substitutions. | ||
|
||
```yaml | ||
default_registry: "gcr.io/you-project-name-here" | ||
provider_repos: | ||
- ../cluster-api-provider-ibmcloud | ||
enable_providers: | ||
- ibmcloud | ||
- kubeadm-bootstrap | ||
- kubeadm-control-plane | ||
kustomize_substitutions: | ||
IBMCLOUD_API_KEY: "XXXXXXXXXXXXXXXXXX" | ||
POWERVS_PROVIDER_ID_FORMAT: "v2" | ||
EXP_CLUSTER_RESOURCE_SET: "true" | ||
CLUSTER_TOPOLOGY: "true" | ||
Comment on lines
+93
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where these 2 variables are referenced? I don't see them anywhere in the code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any supporting document who is using these variables will be great. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ClusterClass is a Experimental feature: https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you mind adding same information into the doc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes sure, I can do that |
||
``` | ||
|
||
### 3. Configuration to deploy workload cluster with Custom Service Endpoint | ||
|
||
To deploy workload cluster with Custom Service Endpoint, Set `SERVICE_ENDPOINT` environmental variable in semi-colon separated format: `${ServiceRegion}:${ServiceID1}=${URL1},${ServiceID2}=${URL2...}` | ||
```yaml | ||
default_registry: "gcr.io/you-project-name-here" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Create IBM Power VS Cluster Using ClusterClass | ||
## Steps | ||
|
||
- To deploy Power VS 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-simple-powervs-clusterclass.yaml) | ||
- The Power VS cluster will use [external cloud provider](https://kubernetes.io/docs/concepts/architecture/cloud-controller/). As a prerequisite set the `powervs-provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/64c9e1d17f1733c721f45a559edba3f4b712bcb0/main.go#L220) with value v2 | ||
- The [clusterclass-template](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/main/templates/cluster-template-simple-powervs-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 | ||
|
||
### Deploy Power VS cluster with IBM Power VS cloud provider | ||
|
||
``` | ||
IBMPOWERVS_CLUSTER_CLASS_NAME="powervs-cc" \ | ||
IBMPOWERVS_SSHKEY_NAME="my-pub-key" \ | ||
IBMPOWERVS_VIP="192.168.151.22" \ | ||
IBMPOWERVS_VIP_EXTERNAL="158.175.162.22" \ | ||
IBMPOWERVS_VIP_CIDR="29" \ | ||
IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-8-1-22-4" \ | ||
IBMPOWERVS_SERVICE_INSTANCE_ID="7845d372-d4e1-46b8-91fc-41051c984601" \ | ||
IBMPOWERVS_NETWORK_NAME="capi-test-3" \ | ||
IBMACCOUNT_ID="ibm-accountid" \ | ||
IBMPOWERVS_REGION="powervs-region" \ | ||
IBMPOWERVS_ZONE="powervs-zone" \ | ||
BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \ | ||
clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.22.4 \ | ||
--target-namespace default \ | ||
--control-plane-machine-count=3 \ | ||
--worker-machine-count=1 \ | ||
--flavor=simple-powervs-clusterclass | kubectl apply -f - | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this
EXP_CLUSTER_RESOURCE_SET
for this section?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are using external cloud provider for cluster which intern needs cluster resource set which also behind this feature gate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add that information into the doc