Skip to content

CKS cluster with a CNI configuration stays in Starting: jinja control-node part typed text/cloud-config #14810

Open

Description

@bhouse-nexthop

problem

Creating a CKS cluster with cniconfigurationid leaves the cluster stuck in Starting.

With a CNI configuration, the control node's user data is merged into MIME multipart. k8s-control-node.yml starts with ## template: jinja, but CloudInitUserDataProvider types that part text/cloud-config. cloud-init only renders jinja for text/jinja2 parts, so it parses the raw template as YAML:

util.py[WARNING]: Failed loading yaml blob. Invalid format at line 472 column 4:
"while scanning for the next token found character '%' that cannot start any token

The whole CKS cloud-config is dropped: no SSH keys, no kubeadm bootstrap.

Related: registerCniConfiguration accepts a call with no cniconfig. A cluster using that config then fails to create with NullPointerException: Cannot read the array length because "bytes" is null in KubernetesClusterStartWorker.

versions

The steps to reproduce the bug

  1. registerCniConfiguration with a shell-script or MIME CNI config.
  2. createKubernetesCluster with cniconfigurationid set.
  3. The control node boots, cloud-init logs the YAML error above, and the cluster stays in Starting.

For the second issue: registerCniConfiguration name=x (no cniconfig), then create a cluster with it.

What to do about it?

  • Type a jinja-headed cloud-config or shell part as text/jinja2 when building the multipart. cloud-init renders it, then handles the result by its own header.
  • Reject a missing or blank cniconfig at registration time.

Activity

  1. github-actions commented on Nov 30, 2026

    @github-actions

    Warning

    threat detection engine error
    The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

    What happened

    The threat detection engine failed to produce results.

    Review the workflow run logs for details.

    🎯 Triage report

    A CKS cluster created with a CNI configuration stays in Starting. With a CNI configuration, the control node's user data is merged into a MIME multipart. The part that begins with ## template: jinja is typed text/cloud-config, so cloud-init parses the raw template as YAML and drops the whole CKS cloud-config, including SSH keys and the kubeadm bootstrap. The issue also says registerCniConfiguration accepts a call with no cniconfig, and a cluster that uses it then fails with an NPE in KubernetesClusterStartWorker. The proposed fixes are to type the jinja part as text/jinja2, and to reject a missing or blank cniconfig at registration.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Cloud-init drops the CKS config; the reporter gives the log line
    Component component:cks Control node user data and CNI configuration registration
    Severity Severity:Major Cluster never bootstraps when a CNI configuration is used
    Labels type:bug, component:cks, Severity:Major Based on the issue text
    Coding agent Suitable Specific fixes given: MIME part type and registration validation

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: register a shell-script or MIME CNI configuration, create a cluster with it, then check cloud-init's log on the control node for the YAML error.
    • Check the second issue as a separate case: registerCniConfiguration with no cniconfig.

    Generated by Daily Issue Triage · copilot · haiku55 · ~8 AIC · ⊞ 3.8K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/daily-issue-triage.md@139fa09ef17cde4135e696ff8e7af09bc5ddfa6e
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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