VMware Beta Community
ccalvetbeta
Enthusiast
Enthusiast

Is it possible to use cluster api in the beta?

After a successful deployment in the gui, is it possible to do the same with cluster API? Goal would be to automatize all deployment.
Like in Cluster API Provider for VMware Cloud Director - VMware Cloud Provider Blog

For example could cluster API be used to edit number of nodes, create new worker nodes etc.?

0 Kudos
8 Replies
akrishnakuma
VMware Employee
VMware Employee

Internally the beta uses ClusterAPI. @ccalvetbeta can you describe what exactly you want to do? Do you mean the following:

1. Create a cluster using CSE 4.0

2. Get the capi yaml

3. change the number of nodes in the capi yaml

4. Apply this yaml using kubectl

 

Is (4) what you mean?

 

0 Kudos
ccalvetbeta
Enthusiast
Enthusiast

Hi,
I am aware it is using cluster API in the background, this is why I am interested on how to use it directly.
Could you please provide a guide on how to execute steps 2 to 4?

Goal will be to automatize everything, ideally with API or kubectl and second choice with a CLI.
 - Create a new cluster including Control Plane and Worker Pools
 - Create new worker nodes pools
 - Edit Control Plane (like number of nodes)
 - Edit a worker node pool

I am wondering if cluster API could be used in all scenario or if it is not possible for the first step.(creating new cluster).



 

0 Kudos
ccalvetbeta
Enthusiast
Enthusiast

Hi, any update on this request?

I was trying to generate a template but it didn't work
testtenant@desktop:~$ clusterctl generate cluster test
Error: failed to read "cluster-template.yaml" from provider's repository "infrastructure-vcd": failed to get GitHub release v1.0.0: failed to read release "v1.0.0": GET https://api.github.com/repos/vmware/cluster-api-provider-cloud-director/releases/tags/v1.0.0: 404 Not Found []

Or is clusterctl generate still not supported for vcloud director?
Like in this link
clusterctl generate command doesn't support the generation of CAPI yaml for Cloud Director; Follow the guidelines provided below configure the CAPI Yaml file
cluster-api-provider-cloud-director/WORKLOAD_CLUSTER.md at main · vmware/cluster-api-provider-cloud-...




0 Kudos
kuberneteshaha
VMware Employee
VMware Employee

  1. Hi 

    If your goal is to automate everything (create, resize, upgrade, delete) via VCD API, that is doable, but you must take extra care to craft the payload correctly. 

    If your goal is to create the cluster using CSE 4.0 UI and then use VCD API to manage it further, that is also doable. 

    If your goal is to create the cluster using CSE 4.0 UI and use kubectl (Cluster API) to manage it further, that is not straightforward and we do not recommend this. There is a way to get this option also working. If this is what you want, let us know. We can provide the details.

    Which one of the above is your requirement?



0 Kudos
kuberneteshaha
VMware Employee
VMware Employee

I was trying to generate a template but it didn't work
testtenant@desktop:~$ clusterctl generate cluster test
Error: failed to read "cluster-template.yaml" from provider's repository "infrastructure-vcd": failed to get GitHub release v1.0.0: failed to read release "v1.0.0": GET https://api.github.com/repos/vmware/cluster-api-provider-cloud-director/releases/tags/v1.0.0: 404 Not Found []

Clusterctl support for Cloud Director is enabled only on clusterctl 1.2. However, our latest CAPVCD (Cluster API provider for Cloud Director) is still configured to work with Core CAPI 1.1.3 and Cluster 1.1.3 only. We will very soon qualify CAPVCD with CAPI 1.2. We will keep you posted on this.

0 Kudos
ccalvetbeta
Enthusiast
Enthusiast

Hi,
Regarding using Cluster API directly I think you are right and it is better to not manipulate it.
Better to consider it just as a tool used by VCD and CSE to build the cluster. Still interesting to know about it as part of troubleshooting to read for example related logs.

Goal now will be automate everything, including creating and deleting cluster, via the VCD API. (Similar to what the CSE CLI is offering with the legacy version)

Second question, is there any "Desired State Configuration" tool, like Argo CD,  compatible with Cloud Director?
Like instead of using the API to create the cluster, define specifications of the cluster in another tool and let the tool build automatically the cluster?



0 Kudos
kuberneteshaha
VMware Employee
VMware Employee

is there any "Desired State Configuration" tool, like Argo CD,  compatible with Cloud Director?

No

Like instead of using the API to create the cluster, define specifications of the cluster in another tool and let the tool build automatically the cluster?


You can use Terraform Provider to create clusters. This is still under development though.

0 Kudos
ccalvetbeta
Enthusiast
Enthusiast

How could i create or edit clusters with API?

0 Kudos