Skip to content

[.backport v2.15.1] Switching from K3s to RKE2 in CAPI cluster creation does not restore cloud-provider-name to external #18485

Description

@rancher-ui-project-bot

This is a .backport issue for #18300, automatically created via GitHub Actions workflow initiated by @eva-vashkevich

Original issue body:

Setup

  • Rancher version: v2.15-7fb83830861c05ae2b23e16fcb414a7045b1c3a1-head
  • Rancher UI Extensions: CAPA UI - 0.0.0-rc5
  • Browser type & version:

Describe the bug
When creating a CAPI AWS cluster, switching the Kubernetes version from K3s to RKE2 clears the cloud-provider-name setting. Clicking Create then fails with the error "Cloud provider must be set to External when using CAPA", even though the user never explicitly changed the cloud provider setting.

To Reproduce

  1. Install the CAPA UI extension
  2. Navigate to Cluster Management → Create → select CAPI AWS
  3. In the Kubernetes version dropdown, select a K3s version
  4. Switch back to an RKE2 version
  5. Fill in remaining required fields and click Create

Result
cloud-provider-name is cleared when switching distros, causing a validation error: "Cloud provider must be set to External when using CAPA"

Expected Result
cloud-provider-name is automatically set to external when RKE2 is selected for a CAPI cluster (as it is on initial load)

Screenshots

Screen.Recording.2026-07-07.at.4.30.58.PM.mov

Additional context
Related to #16539

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions