Skip to content

CKS scale re-creates every node's SSH rules by position, moving added nodes and failing on port conflicts #14828

Backlog

Description

@bhouse-nexthop

problem

Scaling a CKS cluster in an isolated network, VPC tier or Netris VPC revokes the SSH port forwarding rules of the nodes and re-creates them by list position (2222 + index), and in isolated networks also revokes one firewall rule and re-creates the port range.

what effect
every scale every node's SSH port forwarding rule gets a new id
node added with addNodesToKubernetesCluster gets a second rule on a positional port (its own is outside the revoked range), or loses its rule when it falls inside the range
scale up after adding a node (isolated) the new range 2222..2222+n-1 can overlap the added node's firewall rule, the firewall rule create fails with a conflict, and the scale fails after the old range rule and the managed nodes' port forwarding rules are already gone
second scale after a scale (isolated) removeSshFirewallRule revokes the first matching rule; once the range rule has been re-created, that can be an added node's single-port rule, and the old range rule is left in place, so creating the new range rule conflicts
scale down with nodes listed in nodeids (middle workers) remaining nodes are renumbered to new ports
scale down (isolated) provisionSshPortForwardingRules assumes added nodes are last in the list, which isn't true on scale down

Upgrade now reads each node's port from its rule (#14824 / #14825), so moving rules around on scale is not needed by anything else.

versions

4.22 and main.

steps to reproduce

  1. Create a CKS cluster in an isolated network (1 control, 2 workers).
  2. Add an existing VM with addNodesToKubernetesCluster. It gets port 2225.
  3. scaleKubernetesCluster size=3.
  4. The scale fails with a firewall rule conflict, or (depending on rule order) the nodes end up with new port forwarding rule ids and the added node with two rules.

expected

Scale keeps the existing nodes' SSH rules (ports and ids) and only creates rules for nodes that have none, on a port that is free. Scale down removes only the removed nodes' own rules.

Activity

  1. github-actions commented on Dec 1, 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

    On scale, CKS revokes every node's SSH port-forwarding rule and re-creates them by list position (2222 + index). This changes rule IDs and ports for existing nodes, moves nodes added with addNodesToKubernetesCluster, and on isolated networks can conflict with an added node's firewall rule, so the scale fails partway. Scale-down can also renumber the remaining nodes. The reporter's expected behaviour is that existing rules stay and only nodes without a rule get one, on a free port.

    📊 Assessment

    Dimension Value Reasoning
    Type type:bug Scale changes unrelated nodes' rules and fails on conflicts, with reproduction steps
    Component component:cks Scale worker SSH rules on isolated, VPC and Netris networks
    Severity Severity:Major Scale can fail after old rules are removed; added nodes can end up with two rules
    Labels type:bug, component:cks, Severity:Major Based on the issue text
    Coding agent Needs more info Several scale cases (scale-up, second scale, scale-down, nodeids) need a design decision on rule reuse

    🔗 Similar issues

    💡 Notes and suggestions
    • Reproduction: isolated network, 1 control and 2 workers, add an existing VM with addNodesToKubernetesCluster (port 2225), then scaleKubernetesCluster size=3.
    • The issue also lists a second scale failure that depends on rule order. Check both cases in the fix.

    Generated by Daily Issue Triage · copilot · haiku55 · ~9 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