This document will help you get a CAPC Kubernetes cluster up and running with your custom image.
An image defines the operating system and Kubernetes components that will populate the disk of each node in your cluster.
As of now, prebuilt images for KVM, VMware and XenServer are available here
The image is built using KVM hypervisor as a
Depending on they hypervisor requirements, it can then converted into
ova for VMware and
vhd for XenServer via the
For your custom image to work with Cluster API, it must meet the operating system requirements of the bootstrap provider. For example, the default
kubeadm bootstrap provider has a set of
preflight checks that a VM is expected to pass before it can join the cluster.
The reference images are each built to support a specific version of Kubernetes. When using your custom images based on them, take care to match the image to the
version: field of the
MachineDeployment in the YAML template for your workload cluster.
To use a custom image, it needs to be referenced in an
image: section of your
Be sure to also update the
version in the
MachineDeployment cluster spec.
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: CloudStackMachineTemplate metadata: name: capi-quickstart-control-plane spec: template: spec: offering: ControlPlaneOffering template: custom-image-name
To upgrade to a new Kubernetes release with custom images requires this preparation:
- Create a new custom image which supports the Kubernetes release version
- Register the custom image as a template in Apache CloudStack
- Copy the existing
CloudStackMachineTemplateand change its
image:section to reference the new custom image
- Create the new
CloudStackMachineTemplateon the management cluster
- Modify the existing
MachineDeploymentto reference the new
CloudStackMachineTemplateand update the
version:field to match
See Upgrading workload clusters for more details.