vSphere infrastructure optionsNew#
When you deploy child clusters on vSphere, MKE 4 uses the Cluster API Provider vSphere (CAPV) to provision and manage cluster infrastructure. The spec.infrastructure.configuration block exposes the key CAPV settings — vCenter coordinates, virtual machine sizing and placement, DNS, and optional IPAM-based address allocation — for both control plane and worker nodes. Required parameters are noted in the sections herein; all others apply provider defaults when omitted.
Example vSphere configuration, with all optional parameters#
spec:
infrastructure:
provider: vsphere
credential: vsphere-cluster-identity-cred
controlPlaneNumber: 3
workersNumber: 3
configuration:
controlPlaneEndpointIP: 10.10.0.10
nameservers:
- 10.0.0.53
- 1.1.1.1
ipamEnabled: true
ipPool:
config:
apiGroup: ipam.cluster.x-k8s.io
kind: InClusterIPPool
name: child-cluster-pool
vsphere:
server: vcenter.example.com
thumbprint: "AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD"
datacenter: DATACENTER
datastore: DATASOURCE
resourcePool: /DATACENTER/host/cluster-1/Resources/ResourcePool
folder: /DATACENTER/vm/folder
controlPlane:
vmTemplate: /DATACENTER/vm/templates/ubuntu-2204-kube-v1.35
network: /DATACENTER/vm/networks/VMNetwork
rootVolumeSize: 64
cpus: 4
memory: 16384
ssh:
user: vsphere
publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... mke4-admin@example"
worker:
vmTemplate: /DATACENTER/vm/templates/ubuntu-2204-kube-v1.35
network: /DATACENTER/networks/VMNetwork
rootVolumeSize: 64
cpus: 4
memory: 16384
ssh:
user: vsphere
publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... mke4-admin@example"
Top-level configuration parameters#
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
controlPlaneEndpointIP |
string (IPv4/IPv6) | yes | — | Static IP assigned to the control plane endpoint, kube-apiserver VIP. Must be a syntactically valid IP address. |
nameservers |
list of strings (IP) | no | [] |
DNS servers injected into the cloud-init network configuration of every virtual machine. Each entry must be a valid IPv4 or IPv6 address. |
ipamEnabled |
boolean | no | false |
When true, virtual machine NICs request addresses from a CAPV IPAM pool referenced by ipPool instead of using DHCP. |
ipPool |
object | yes if ipamEnabled: true |
— | CAPV addressesFromPools reference. Refer to ipPool. |
vsphere |
object | yes | — | Cluster-wide vSphere/vCenter coordinates. Refer to vsphere. |
controlPlane |
object | yes | — | Virtual machine sizing and placement for control plane nodes. Refer to controlPlane / worker parameters. |
worker |
object | yes | — | Virtual machine sizing and placement for worker nodes. Refer to controlPlane / worker parameters. |
vsphere parameters#
The cluster-wide vCenter coordinates are described in the following table. Note that all parameters are required and must be non-empty.
| Parameter | Type | Description |
|---|---|---|
server |
string | vCenter server address, FQDN or IP. For example, vcenter.example.com. |
thumbprint |
string | SHA-1/SHA-256 TLS thumbprint of the vCenter certificate. |
datacenter |
string | vSphere datacenter name. |
datastore |
string | vSphere datastore name where the virtual machine disks are placed. |
resourcePool |
string | vSphere resource pool path. |
folder |
string | vSphere virtual machine folder path. Must be non-empty. |
Use the following command to obtain the vSphere certificate thumbprint:
curl -sw %{certs} https://vcenter.example.com | openssl x509 -sha256 -fingerprint -noout | awk -F '=' '{print $2}'
controlPlane / worker parameters#
The controlPlane and worker objects are identical in shape.
| Parameter | Type | Required | Default (control plane / worker) | Constraints | Description |
|---|---|---|---|---|---|
vmTemplate |
string | yes | — / — | non-empty | Name or inventory path of the vSphere virtual machine template to clone from. |
network |
string | yes | — / — | non-empty | vSphere network or portgroup name to attach the virtual machine NIC to. |
rootVolumeSize |
integer (GiB) | no | 32 / 32 |
> 0 | Root disk size in GiB. |
cpus |
integer | no | 4 / 2 |
> 0 | Number of vCPUs per virtual machine. |
memory |
integer (MiB) | no | 16000 / 8000 |
> 0 | Memory in MiB. |
ssh.user |
string | yes | — / — | non-empty | Operating system user account on the virtual machine template for which the operator SSH public key is authorized. |
ssh.publicKey |
string | yes | — / — | valid SSH authorized-keys entry | SSH public key authorized on the virtual machine. Must parse as a single authorized_keys-format entry. For example, ssh-ed25519 AAAA... user@host. |
ipPool parameters#
The ipPool parameters are used only when ipamEnabled: true. The config block is passed to CAPV as an addressesFromPools reference.
| Parameter | Type | Required | Description |
|---|---|---|---|
ipPool.config.apiGroup |
string | no | API group of the IPAM pool resource. If specified, the parameter must not be empty or whitespace. |
ipPool.config.kind |
string | yes (when ipamEnabled: true) |
Type of IPAM pool. Examples include InClusterIPPool and GlobalInClusterIPPool. |
ipPool.config.name |
string | yes (when ipamEnabled: true) |
Name of the IPAM pool resource. |