Skip to content

openshift-spoke-cluster-join-hub

Join spoke cluster to hub using ACM/OCM kustomize manifests

This task runs on a spoke cluster in a hub-spoke OpenShift topology. It registers the spoke cluster with the hub by applying ACM/OCM manifests via kustomize.

Process

  1. Writes the hub cluster kubeconfig to disk from openshift/hub-cluster-kubeconfig
  2. Renders 5 ACM/OCM manifests into a register-cluster/ directory:
  3. namespace.yaml — Namespace for the spoke on the hub
  4. managedcluster.yaml — ManagedCluster resource
  5. klusterletaddonconfig.yaml — KlusterletAddonConfig resource
  6. auto-import-secret.yaml — Secret containing the spoke's kubeconfig (base64-encoded JSON)
  7. kustomization.yaml — Kustomize entry point
  8. Runs: oc apply -k ./register-cluster/
  9. Removes the hub kubeconfig from disk

Requirements

  • Hub cluster must be running with ACM/OCM installed
  • Hub cluster kubeconfig must be stored in openshift/hub-cluster-kubeconfig
  • Spoke cluster kubeconfig must be available in openshift/kubeconfig

Parameters

  • openshift/hub-cluster-kubeconfig: Kubeconfig for the hub cluster
  • openshift/kubeconfig: Kubeconfig for the spoke cluster (used in auto-import-secret)

Objects that Reference openshift-spoke-cluster-join-hub

Not used in current content packs

Objects used by openshift-spoke-cluster-join-hub