Skip to content

Control plane not initializing using Talos + KubeVirt on baremetal #220

@Chamssiddine

Description

@Chamssiddine

Description:

I'm attempting to deploy a Talos-based cluster using the Cluster API with KubeVirt as the infrastructure provider on a Hetzner baremetal server.

Environment

  • Management Cluster: KIND

  • Target Infrastructure: KubeVirt on a baremetal server (QEMU + libvirt)

  • Cluster Configuration:

    • 3 control plane nodes
    • 2 worker nodes

Problem

The control plane is not initializing. The cluster is stuck in the following state:

clusterctl describe cluster talos-kv-cluster --show-conditions all

NAME                                                        READY  SEVERITY  REASON                                     SINCE  MESSAGE                                                                               
Cluster/talos-kv-cluster                                    False  Info      WaitingForControlPlane                     9h                                                                                            
├─ControlPlaneInitialized                                   False  Info      WaitingForControlPlaneProviderInitialized  9h     Waiting for control plane provider to indicate the control plane has been initialized  
├─ControlPlaneReady                                         False  Info      WaitingForControlPlane                     9h                                                                                            
└─InfrastructureReady                                       True                                                        9h                                                                                            
└─ClusterInfrastructure - KubevirtCluster/talos-kv-cluster  True                                                        9h                                                                                            
  └─LoadBalancerAvailable                                   True                                                        9h                                                                                            
└─ControlPlane - TalosControlPlane/talos-kv-control-plane   (no Ready condition set)

Additionally, the controller logs show:

I0513 21:40:20.042762       1 cluster_accessor.go:252] "Connecting" controller="clustercache" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/talos-kv-cluster" namespace="default" name="talos-kv-cluster" reconcileID="7c324629-ef84-4f4d-8b67-cedbb3185d42"
E0513 21:40:20.042869       1 cluster_accessor.go:262] "Connect failed" err="error creating REST config: error getting kubeconfig secret: Secret \"talos-kv-cluster-kubeconfig\" not found" controller="clustercache" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="default/talos-kv-cluster" namespace="default" name="talos-kv-cluster" reconcileID="7c324629-ef84-4f4d-8b67-cedbb3185d42"
Talos.yaml configuration

This seems to indicate the control plane is never coming up and no kubeconfig is being generated.

Request

Any guidance on why the control plane isn't initializing or how to debug the Talos bootstrap process in this KubeVirt + Cluster API setup would be appreciated.

Let me know if you need controller logs, additional manifests, or kubectl describe output for any specific resources.

Talos Manifest

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: talos-node-dv
spec:
  source:
    http:
      url: "https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/v1.9.6/metal-amd64.qcow2"
  pvc:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 10Gi
    storageClassName: ""
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: KubevirtCluster
metadata:
  name: talos-kv-cluster
  namespace: default
spec: {}

---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: talos-kv-cluster
  namespace: default
spec:
  clusterNetwork:
    pods:
      cidrBlocks: ["10.244.0.0/16"]
    services:
      cidrBlocks: ["10.96.0.0/12"]
  infrastructureRef:
    apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
    kind: KubevirtCluster
    name: talos-kv-cluster
  controlPlaneRef:
    apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
    kind: TalosControlPlane
    name: talos-kv-control-plane

---
apiVersion: controlplane.cluster.x-k8s.io/v1alpha3
kind: TalosControlPlane
metadata:
  name: talos-kv-control-plane
  namespace: default
spec:
  version: v1.30.0
  controlPlaneConfig:
    controlplane:
      generateType: controlplane
      talosVersion: v1.9.6
  infrastructureTemplate:
    apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
    kind: KubevirtMachineTemplate
    name: talos-kv-control-plane-template
  replicas: 1


---
apiVersion: bootstrap.cluster.x-k8s.io/v1alpha3
kind: TalosConfigTemplate
metadata:
  name: talos-kv-controlplane-config
  namespace: default
spec:
  template:
    spec:
      generateType: controlplane
      talosVersion: v1.9.6

---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: KubevirtMachineTemplate
metadata:
  name: talos-kv-control-plane-template
  namespace: default
spec:
  template:
    spec:
      virtualMachineTemplate:
        metadata:
          labels:
            cluster.x-k8s.io/cluster-name: talos-kv-cluster
        spec:
          runStrategy: Always
          template:
            spec:
              domain:
                devices:
                  disks:
                    - name: rootdisk
                      disk:
                        bus: virtio
                    - name: cloudinit
                      disk:
                        bus: virtio
                resources:
                  requests:
                    memory: 2Gi
              volumes:
                - name: rootdisk
                  dataVolume:
                    name: talos-node-dv
                - name: cloudinit
                  cloudInitNoCloud:
                    userDataBase64: ""

Thanks!

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