Rancher Cluster Templates to provision RKE2 Kubernetes clusters on VMware cloud provider.
Template files after adaptation to the target environment are ready to import to repository related to chart repository connected to Rancher Management Server (RMS) environment.
👉 existing on RMS cloud credential to VMware vSphere environment or environments (vCenter servers occurrences) with appropriate permission
👉 existing on VMware and configured as required VM template to provision cluster nodes
👉 in this example we assume provisioning of nodes based on ubuntu cloud image and configured transport with use of VMTools mechanisms (vappTransport: com.vmware.guestInfo) and VMware vApp properties (properties used in the script configuration at the cloud-init layer level)
🔀 In file: values.yaml (cloud credential is hardcoded so it is necessary to rename a secret name to appropriate for the target RMS environment) or in case of multi vCenter environment credetials are hardcoded in file cluster.yaml in sections of each nodepools:
cloudCredentialSecretName: "cattle-global-data:xx-abcde" -or- cloudCredentialSecretName: "cattle-global-data:cc-dc-dcX"
🔀 In files: nodeconfig-controlplane[-zoneX].yaml, nodeconfig-worker/storage[-zoneX].yaml
cloneFrom: /DCNAME/vm/ClusterNAME/Templates/ubuntu-jammy-cloudimg-templateNAME
cloudConfig: ... search: [your.domainNAME,your.nextdomainNAME]\n ...
datacenter: /DCNAME
datastore[Cluster]: /DCNAME/datastore/datastorefolderNAME/datastore[Cluster]NAME
folder: /DCNAME/vm/ClusterNAME/VMFolderNAME
hostsystem: /DCNAME/host/ClusterNAME/esxi.host.fqdnNAME
network:
- /DCNAME/network/VMNetworkNAME
pool: /DCNAME/host/ClusterSahul/Resources
vappProperty:
- guestinfo.interface.0.ip.0.address=ip:VMNetworkNAME
- guestinfo.interface.0.ip.0.netmask=${netmask:VMNetworkNAME}
- guestinfo.interface.0.route.0.gateway=${gateway:VMNetworkNAME}
- guestinfo.dns.servers=${dns:VMNetworkNAME}
Great examples (also as a source of inspiration 😍) in repositories:
https://github.com/rancher/cluster-template-examples
https://github.com/bashofmann/rancher-cluster-templates