Skip to content

Rancher Cluster Templates to provision RKE2 Kubernetes clusters on VMware

License

Notifications You must be signed in to change notification settings

r2d2pl/rancher-cluster-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

rancher-cluster-templates

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.

Prerequisities:

👉 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)

How to Use

▶️ In order to customize the templates, it is necessary to modify some parameters in the following lines (places) according to the properties of the target environment ('NAME'):

🔀 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}

▶️ Template files should be embedded in a repository connected to the Rancher ecosystem at the Rancher Management Server level
▶️ Used (connected to RMS) repository should be properly structured according to the requirements of the charts repository

Great examples (also as a source of inspiration 😍) in repositories:
https://github.com/rancher/cluster-template-examples
https://github.com/bashofmann/rancher-cluster-templates

About

Rancher Cluster Templates to provision RKE2 Kubernetes clusters on VMware

Resources

License

Stars

Watchers

Forks

Packages

No packages published