Custom image
The custom image customization allows the user to specify the OCI image to use for control-plane and worker Machines.
This customization will be available when the
provider-specific cluster configuration patch is included in the ClusterClass.
Example
To specify the custom image, use the following configuration:
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: <NAME>
spec:
topology:
variables:
- name: clusterConfig
value:
controlPlane:
docker:
customImage: ghcr.io/mesosphere/kind-node:v1.2.3-cp
- name: workerConfig
value:
docker:
customImage: ghcr.io/mesosphere/kind-node:v1.2.3-worker
The configuration above will apply customImage to all workers.
You can further customize individual MachineDeployments by using the overrides field with the following configuration:
spec:
topology:
# ...
workers:
machineDeployments:
- class: default-worker
name: md-0
variables:
overrides:
- name: workerConfig
value:
docker:
customImage: ghcr.io/mesosphere/kind-node:v1.2.3-custom
Applying this configuration will result in the following value being set:
control-plane
DevMachineTemplate:spec: template: spec: backend: docker: customImage: ghcr.io/mesosphere/kind-node:v1.2.3-cp
worker
DevMachineTemplate:spec: template: spec: backend: docker: customImage: ghcr.io/mesosphere/kind-node:v1.2.3-worker
ClusterClasses that still use the deprecated DockerMachineTemplate get the same value set at
spec.template.spec.customImage.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.