Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Import an Existing Cluster to ACM

Use this example procedure to bring an existing cluster under ACM management. The existing cluster must be up and running.

We provide this example procedure purely for informational purposes. See Red Hat ACM documentation for the official procedure.

  1. Log in to the hub cluster.
    Ensure the kubeconfig of the hub cluster is stored in the default kubeconfig location (~/.kube/config). Then log in as follows:
  2. Save the cluster name to a variable you can use later on.
  3. Create the project.
  4. Create the namespace.
  5. Create and apply a YAML file that describes the managed cluster.
    1. Create the YAML file.
      We'll call the YAML file managed-cluster.yaml.where mgmt-spoke2 is the cluster name.
    2. Apply the YAML.
  6. Create and apply the klusterlet addon YAML file. The klusterlet is the agent responsible for communications between the hub and managed clusters.
    1. Create the YAML file.
      We'll call the YAML file klusterlet-addon-config.yaml.
    2. Apply the YAML.
  7. View the secret automatically generated from the previous step.
    The automatically-generated secret is called ${CLUSTER_NAME}-import.

    This secret contains the import.yaml that you will apply to the managed cluster to install klusterlet.

  8. Save the klusterlet configuration to local files.
    1. Retrieve the klusterlet CRD and save it to apply later on the managed cluster.
    2. Retrieve import.yaml and save it to apply it later on the managed cluster.
  9. Import the klusterlet.
    Run these commands from the managed cluster. One way to do this is to copy the kubeconfig of the managed cluster to the default kubeconfig location (~/.kube/config).
    1. kubectl apply -f klusterlet-crd.yaml
    2. kubectl apply -f import.yaml
    3. Check the pod status of the klusterlet.
  10. Check the JOINED and AVAILABLE status for your imported cluster. Run this command from the hub cluster.

    Your imported cluster should indicate that it's joined and available.

  11. Check the agent addon. Run this command from the hub cluster.
    All pods should have a STATUS of Running.