-
Notifications
You must be signed in to change notification settings - Fork 22
add gcp kubeadm clusterclass example #327
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
base: main
Are you sure you want to change the base?
Conversation
73baf4f
to
78b258e
Compare
91c3eb9
to
e27d0b6
Compare
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.
Just a small change requested to align the correct k8s version.
Rest looks all great!
Signed-off-by: Carlos Salas <[email protected]>
e27d0b6
to
1f7219d
Compare
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.
lgtm. I just have a few suggestions.
---- | ||
+ | ||
* For this example we are also going to install https://docs.tigera.io/calico/latest/about/[Calico] as the default CNI. + | ||
* The https://github.com/kubernetes/cloud-provider-gcp[Cloud Controller Manager GCP] will need to be installed on each downstream Cluster for the nodes to be functional. + |
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.
nit:
Can we call it GCP Cloud Controller Manager
instead of Cloud Controller Manager GCP
? It seems easier to me to read and contemplate.
* Create the GCP Cluster from the example ClusterClass + | ||
+ | ||
Note that some variables are left to the user to substitute. + | ||
The default configuration of Cloud Controller Manager GCP is configured to use a single zone cluster, so the `clusterFailureDomains` variable is set to a single zone. If you need to provision a multi-zone cluster, we recommend you inspect the parameters provided by https://github.com/kubernetes/cloud-provider-gcp/blob/12f93cb23a5af58bfb7fb453bebff3eb2f81755c/providers/gce/gce.go#L120[Cloud Controller Manager GCP] and how https://github.com/kubernetes-sigs/cluster-api-provider-gcp/blob/6518ef9b44cfc4f8c3f7139b2ce4ae71523deff6/test/e2e/data/infrastructure-gcp/cluster-template-ci.yaml#L59[CAPG leverages these variables] to create cluster-specific configurations. + |
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.
nit:
The default configuration of Cloud Controller Manager GCP is configured to use a single zone cluster, so the `clusterFailureDomains` variable is set to a single zone. If you need to provision a multi-zone cluster, we recommend you inspect the parameters provided by https://github.com/kubernetes/cloud-provider-gcp/blob/12f93cb23a5af58bfb7fb453bebff3eb2f81755c/providers/gce/gce.go#L120[Cloud Controller Manager GCP] and how https://github.com/kubernetes-sigs/cluster-api-provider-gcp/blob/6518ef9b44cfc4f8c3f7139b2ce4ae71523deff6/test/e2e/data/infrastructure-gcp/cluster-template-ci.yaml#L59[CAPG leverages these variables] to create cluster-specific configurations. + | |
The default configuration of Cloud Controller Manager GCP is configured to use a single zone cluster, so the `clusterFailureDomains` variable is set to a single zone. If you need to provision a multi-zone cluster, we recommend you inspect the parameters provided by https://github.com/kubernetes/cloud-provider-gcp/blob/master/providers/gce/gce.go#L120[Cloud Controller Manager GCP] and how https://github.com/kubernetes-sigs/cluster-api-provider-gcp/blob/main/test/e2e/data/infrastructure-gcp/cluster-template-ci.yaml#L59[CAPG leverages these variables] to create cluster-specific configurations. + |
@@ -191,6 +191,73 @@ spec: | |||
matchLabels: {} | |||
---- | |||
GCP:: | |||
+ | |||
To prepare the management Cluster, we are going to install the https://cluster-api-gcp.sigs.k8s.io/[Cluster API Provider GCP], and create a secret with the required credentials to provision a new Cluster on GCP. + |
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.
nit:
To prepare the management Cluster, we are going to install the https://cluster-api-gcp.sigs.k8s.io/[Cluster API Provider GCP], and create a secret with the required credentials to provision a new Cluster on GCP. + | |
To prepare the management Cluster, we are going to install the https://cluster-api-gcp.sigs.k8s.io/[Cluster API Provider GCP], and create a secret with the credentials required to provision a new Cluster on GCP. + |
spec: | ||
type: infrastructure | ||
variables: | ||
GCP_B64ENCODED_CREDENTIALS: "" |
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.
This part is a little unclear to me. Do I pass the encoded value to this variable or leave it empty?
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.
Good call, this should be filled and we should tell the user.
I was also wondering whether we should give an example loading vars from a secret, rather than in clear text like this.
@salasberryfin you can maybe copy from the AWS docs (that are now changed due to ClusterIdentity usage): https://github.com/rancher/turtles-docs/blob/main/docs/v0.20/modules/en/pages/user/clusterclass.adoc?plain=1#L83
+ | ||
[source,bash] | ||
---- | ||
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/cni/aws/calico/helm-chart.yaml |
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.
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/cni/aws/calico/helm-chart.yaml | |
kubectl apply -f https://raw.githubusercontent.com/rancher/turtles/refs/heads/main/examples/applications/cni/calico/helm-chart.yaml |
Description
Add guide on how to provision a GCP self-managed clusters based on new ClusterClass template for CAPG/Kubeadm.
Fixes #322