cluster-api-operator icon indicating copy to clipboard operation
cluster-api-operator copied to clipboard

Move mgt-cluster into wl-cluster

Open guettli opened this issue 2 years ago • 8 comments

User Story

As a operator of clusters I would like to move the mgt-cluster into the wl-cluster after the wl-cluster was successfuly created.

Up to now we rely on the clusterctl command.

Since we plan to use cluster-api-operator, would be great if the operator could move the mgt-cluster.

/kind feature

guettli avatar May 31 '23 09:05 guettli

@guettli thanks for the issue, this is interesting!

Based on the initial design document of the operator, the intention was, AFAIU, clusterctl move operation won't be taken care by the operator, since it is not a replacement for clusterctl in first place based on the Non-Goals section:

"As stated in the Goals/Non-Goals, the move operation will not be driven by the operator but rather remain within the CLI for now"

However on the other hand, I am not fully aware of what are the drawbacks/constraints of delegating it to operator itself, which would greatly ease the life of the cluster admins.

@Fedosin @alexander-demicev @JoelSpeed thoughts?

furkatgofurov7 avatar May 31 '23 09:05 furkatgofurov7

I'm not against the idea but you'd need to come up with an API to control the movement, which, might prove tricky 🤔 What would an API to cause a migration look like?

JoelSpeed avatar May 31 '23 12:05 JoelSpeed

If my understanding is correct, the workflow should look like this:

  1. Deploy CAPI operator on the management cluster.
  2. Deploy CAPI providers.
  3. Create a workload cluster.
  4. Move the CAPI operator with providers to the workload cluster.

Does it make sense to make it possible for clusterctl to move the operator together with providers?

alexander-demicev avatar May 31 '23 17:05 alexander-demicev

I'm not against the idea but you'd need to come up with an API to control the movement, which, might prove tricky thinking What would an API to cause a migration look like?

@JoelSpeed I think a declarative solution would be nice. This means you define right from the start that as soon as the wl-cluster is ready for the move, the move should be done.

guettli avatar Jun 01 '23 06:06 guettli

While this isn't what's requested in this issue, maybe a better alternative would be to support adopting existing CAPI setups. That way the workflow could be

  1. create kind cluster
  2. deploy capi with clusterctl
  3. deploy cluster to be used as mgmt cluster
  4. clusterctl move
  5. install operator
  6. adopt moved capi installation

Afterwards capi can be operated using the operator.

schrej avatar Jun 07 '23 17:06 schrej

/triage accepted

alexander-demicev avatar Jul 21 '23 11:07 alexander-demicev

This can be a part of clusterctl plugin for operator https://github.com/kubernetes-sigs/cluster-api/pull/8957

alexander-demicev avatar Jul 21 '23 11:07 alexander-demicev

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

k8s-triage-robot avatar Jul 20 '24 11:07 k8s-triage-robot

Closing due to inactivity, feel free to re-open if you think otherwise.

furkatgofurov7 avatar Sep 18 '24 16:09 furkatgofurov7