Skip to content

Add dedicated Rancher Cluster Registration page#158

Open
anmazzotti wants to merge 1 commit intorancher:mainfrom
anmazzotti:update_import_doc
Open

Add dedicated Rancher Cluster Registration page#158
anmazzotti wants to merge 1 commit intorancher:mainfrom
anmazzotti:update_import_doc

Conversation

@anmazzotti
Copy link
Contributor

This PR adds a new "Rancher Cluster Registration" page.
This page serves to consolidate some documentation about Cluster import into Rancher, which was sparse before.
It includes:

  • Instructions and details on how to import clusters
  • Clarification that manual import of the CAPI cluster is not a Turtles supported workflow
  • How to setup a custom description on imported clusters
  • How to delete and reimport clusters.

Fixes #148

Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com>
@anmazzotti anmazzotti requested a review from a team as a code owner March 6, 2026 12:36
@anmazzotti anmazzotti self-assigned this Mar 6, 2026
@netlify
Copy link

netlify bot commented Mar 6, 2026

Deploy Preview for susecapi ready!

Name Link
🔨 Latest commit 56c6300
🔍 Latest deploy log https://app.netlify.com/projects/susecapi/deploys/69aaca543473f8000893d7b7
😎 Deploy Preview https://deploy-preview-158--susecapi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@anmazzotti anmazzotti added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 6, 2026
@anmazzotti anmazzotti moved this to PR to be reviewed in CAPI / Turtles Mar 6, 2026
Copy link
Collaborator

@sunilarjun sunilarjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update @anmazzotti, left some review comments with minor grammar edits and some syntax edits for code blocks, admonitions, and numbered lists. Please let me know if you have any questions.

======

== Mark Namespace for auto-import
== Wait for the Cluster to appear in Rancher dashboard.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
== Wait for the Cluster to appear in Rancher dashboard.
== Next Steps: Wait for the cluster to appear in the Rancher Dashboard

====
To prevent a cluster from getting stuck in deletion when Fleet is removed, keep auto-import enabled in the UI or avoid manually removing labels in the cluster's namespace, as Turtles will no longer handle the 'import' functionality from that point onward.
==== No newline at end of file
The Cluster provisioned in this tutorial contains the `cluster-api.cattle.io/rancher-auto-import` label.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Cluster provisioned in this tutorial contains the `cluster-api.cattle.io/rancher-auto-import` label.
The cluster provisioned in this tutorial contains the `cluster-api.cattle.io/rancher-auto-import` label.

To prevent a cluster from getting stuck in deletion when Fleet is removed, keep auto-import enabled in the UI or avoid manually removing labels in the cluster's namespace, as Turtles will no longer handle the 'import' functionality from that point onward.
==== No newline at end of file
The Cluster provisioned in this tutorial contains the `cluster-api.cattle.io/rancher-auto-import` label.
This label will instruct Turtles to automatically import the Cluster into Rancher.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This label will instruct Turtles to automatically import the Cluster into Rancher.
This label will instruct Turtles to automatically import the cluster into Rancher.

:revdate: 2026-03-06
:page-revdate: {revdate}

== How to register a CAPI Cluster in Rancher using Turtles auto-import
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
== How to register a CAPI Cluster in Rancher using Turtles auto-import
== How to register a CAPI cluster in Rancher using Turtles auto-import


== How to register a CAPI Cluster in Rancher using Turtles auto-import

The only supported workflow to register CAPI Clusters in Rancher using Turtles, is by using the `cluster-api.cattle.io/rancher-auto-import` label:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The only supported workflow to register CAPI Clusters in Rancher using Turtles, is by using the `cluster-api.cattle.io/rancher-auto-import` label:
The only supported workflow to register CAPI clusters in Rancher using Turtles, is by using the `cluster-api.cattle.io/rancher-auto-import` label:

Marking a cluster for auto-import triggers automatic registration by the Turtles controller, manual execution of registration commands is not supported.
====

== Add a custom description to Rancher Cluster
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
== Add a custom description to Rancher Cluster
== Add a custom description to Rancher cluster


== Delete the imported cluster from Rancher

The `cluster-api.cattle.io/capi-cluster-owner` and `cluster-api.cattle.io/capi-cluster-owner-ns` labels can be used to delete the Rancher Cluster:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `cluster-api.cattle.io/capi-cluster-owner` and `cluster-api.cattle.io/capi-cluster-owner-ns` labels can be used to delete the Rancher Cluster:
The `cluster-api.cattle.io/capi-cluster-owner` and `cluster-api.cattle.io/capi-cluster-owner-ns` labels can be used to delete the Rancher cluster:

. Turtles controller will annotate the CAPI cluster with `imported: true`.
. This annotation prevents the cluster from being re-imported automatically by Rancher.
. Verify the annotation using the following command:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+

Comment on lines +80 to +81
[NOTE]
Deleting the Rancher cluster only removes the `clusters.management.cattle.io` resource and disables auto-import for the associated CAPI cluster. The underlying CAPI cluster iteself remains intact.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[NOTE]
Deleting the Rancher cluster only removes the `clusters.management.cattle.io` resource and disables auto-import for the associated CAPI cluster. The underlying CAPI cluster iteself remains intact.
[NOTE]
====
Deleting the Rancher cluster only removes the `clusters.management.cattle.io` resource and disables auto-import for the associated CAPI cluster. The underlying CAPI cluster iteself remains intact.
====

Comment on lines +85 to +91
If you need to re-import the same CAPI cluster into Rancher:

Remove the `imported: true` annotation:
[source, bash]
----
kubectl -n capi-clusters patch clusters.cluster.x-k8s.io <cluster-name> --type='json' -p='[{"op": "remove", "path": "/metadata/annotations/imported"}]'
----
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you need to re-import the same CAPI cluster into Rancher:
Remove the `imported: true` annotation:
[source, bash]
----
kubectl -n capi-clusters patch clusters.cluster.x-k8s.io <cluster-name> --type='json' -p='[{"op": "remove", "path": "/metadata/annotations/imported"}]'
----
If you need to re-import the same CAPI cluster into Rancher, remove the `imported: true` annotation via the command below:
[source, bash]
----
kubectl -n capi-clusters patch clusters.cluster.x-k8s.io <cluster-name> --type='json' -p='[{"op": "remove", "path": "/metadata/annotations/imported"}]'
----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: PR to be reviewed

Development

Successfully merging this pull request may close these issues.

Manually importing CAPI clusters is not supported

2 participants