Closed alam0rt closed 1 year ago
@alam0rt CAPOCI cannot adopt an existing cluster, the functionality does not exist. May I please know the use case? In general Cluster API, be any provider, does not have facility to adopt a cluster. You can use an existing cluster as a management cluster, but you cannot adopt an existing cluster.
Hey @shyamradhakrishnan, in order to upgrade/manage the management cluster, I was hoping that I could provision a new kind cluster + clusterctl init + apply the existing management manifests into it and have it reconcile the existing OKE cluster.
@alam0rt ideally you should use Cluster API pivot procedure https://cluster-api.sigs.k8s.io/clusterctl/commands/move.html to make the management cluster(which I am assume is an OKE cluster) self sustaining. Unfortunately, since you have already deleted the kind cluster, there is nothing that can be done at this point. As I said, reconciling existing objects is not something Cluster API has in-built, there are some conversations happening in the community but nothing concrete. You can create an OCIManagedCluster/OCIManagedControlPlane object, rather than a empty one as you are doing right now, and put it all the necessary OCIDs etc after comparing it with an existing Custom resource, but it would be a time consuming process. The simplest for now will be to delete and recreate the setup if at all that is possible.
Ah, thanks for the pointer. That's no issue at all, easy to recreate :)
What happened:
After recreating my local kind cluster + installing CAPI to it along with the cluster manifests (the OKE cluster already exists, I am just recreating kind cluster), the CAPOCI provider was unable to use the existing OKE cluster
What you expected to happen: I expected that CAPOCI would see that an existing OKE cluster was already present and would adopt it.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
using the https://github.com/oracle/cluster-api-provider-oci/releases/download/v0.12.0/cluster-template-managed.yaml template
Environment:
clusterctl version
):clusterctl version: &version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.0-rc.1", GitCommit:"038b533a120058dff6f3ae985981bdc2bd844991", GitTreeState:"clean", BuildDate:"2023-07-18T15:37:43Z", GoVersion:"go1.20.4", Compiler:"gc", Platform:"linux/arm64"}
kubectl version
):r
docker info
):not relevant
/etc/os-release
):not relevant