Skip to content

Instantly share code, notes, and snippets.

@fenar
Last active June 11, 2021 22:13
Show Gist options
  • Select an option

  • Save fenar/bd2348fbd8c1fe37955534e97e910de5 to your computer and use it in GitHub Desktop.

Select an option

Save fenar/bd2348fbd8c1fe37955534e97e910de5 to your computer and use it in GitHub Desktop.

ArgoCD Cluster Add-On

Arrange Contexts vs Clusters and after that add cluster to argocd as new destination cluster
You must obtain an API token(s) by visiting https://oauth-openshift.apps.cluster-name.domain-name/oauth/token/request

oc config get-contexts
oc login --token=<insert-here> --server=https://api.<cluster-name1>.<domain-name1>:6443
oc config rename-context $(oc config current-context) acmhub
oc login --token=<insert-here> --server=https://api.<cluster-name2>.<domain-name2>:6443
oc config rename-context $(oc config current-context) acmmanaged
oc config get-contexts
oc config use-context acmhub
oc adm policy add-cluster-role-to-user cluster-admin -z openshift-gitops-argocd-application-controller -n openshift-gitops
oc get secret openshift-gitops-cluster -n openshift-gitops -o jsonpath='{.data.admin\.password}' | base64 -d
argocd --insecure login openshift-gitops-server-openshift-gitops.apps.<cluster-name1>.<domain-name1>:443
argocd cluster add acmmanaged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment