Skip to content

Support "flavor" with "clusterctl generate cluster" for "flatcar OS"Β #580

@sivarama-p-raju

Description

@sivarama-p-raju

/kind feature

Describe the solution you'd like
We are currently working on a PoC where we are testing building Kubernetes clusters on Nutanix using cluster-api with flatcar as the OS for the control plane and workers.

The default cluster template that is used when generating the cluster manifests using clusterctl generate cluster does not add in the needed configuration bootstrapping via ignition format due to which the control plane VM fails to boot properly.

I would request a feature to support "flavor" similar to how it is today available for the "azure" infrastructure provider here

Anything else you would like to add:
Below is the clusterctl generate cluster that I use:

clusterctl generate cluster capi-flatcar-n \
  --infrastructure nutanix:v1.6.1 \
  --kubernetes-version v1.32.4 \
  --control-plane-machine-count=1 \
  --worker-machine-count=1 \
  --target-namespace=capi-flatcar-n

I have tried to add in the below configuration to the kubeadmControlPlane resource and the kubeadmConfigTemplate resource but when I create the cluster, I see that the VM never gets created. I do not also see any errors on the Cluster-API Nutanix controller manager pod that points why the VM creation is not done:

      format: ignition
      ignition:
        containerLinuxConfig:
          additionalConfig: |
            systemd:
              units:
              - name: kubeadm.service
                dropins:
                - name: 10-flatcar.conf
                  contents: |
                    [Unit]
                    After=oem-cloudinit.service
                    # kubeadm must run after containerd - see https://github.com/kubernetes-sigs/image-builder/issues/939.
                    After=containerd.service

Environment:

  • Cluster-api-provider-nutanix version: v1.6.1
  • Kubernetes version: (use kubectl version): v1.32.4
  • OS (e.g. from /etc/os-release): Flatcar OS built using the CAPI image builder project as instructed on the official Nutanix cluster-api documentation https://opendocs.nutanix.com/capx/latest/getting_started/#build-os-image-for-nutanixmachinetemplate-resource

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions