Onboarding with ArgoCD

Learn how to install PerfectScale exporter with ArgoCD with this comprehensive guide

Installing exporter with ArgoCD

To install the exporter with ArgoCD, use the following instructions.

  1. Complete 1-5 steps from Onboarding a cluster.

  2. Make sure to save the clientId and clientSecret, as we will require it later on.

    Credentials
    Credentials
  3. Download the most recent Helm chart that is used for ArgoCD to your repository (for this guide, we'll be utilizing [email protected]:perfectscale/ps-kube.git).

helm fetch perfectscale/exporter
tar -xf exporter-*.tgz && rm exporter-*.tgz
  1. Create an additional (for example, dev.yaml value) file with the following content

cat > exporter/dev.yaml <<EOF
secret:
  create: true
  name: "perfectscale-secret"
  clientSecret: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx"
  clientId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx"
settings:
  clusterName: "xxx"
EOF

💡Replace clientSecret and clientId with copied before.

  1. Push all the modifications to your git repository, which is accessible by ArgoCD.

There are two methods to add an application to ArgoCD: using the WEB UI or creating a YAML CRD file. You can select the approach that best suits your infrastructure.

WEB UI

  1. Login to the ArgoCD Web UI interface and click the NEW APP button.

    New app ArgoCD
    New app ArgoCD

    New app form1
    New app form1

    New app form2
    New app form2

    New app form3
    New app form3

    New app form4
    New app form4

  2. Once the creation process is completed, you will see the OutOFSync application.

    OutOFSync application
    OutOFSync application

  3. Synchronize the application.

    Application synchronization
    Application synchronization

    Synchronized application
    Synchronized application

  4. Ensure that all pods are running.

    Check running pods1
    Check running pods1

CRD

  1. Create a Custom Resource Definition file for the ArgoCD.

cat > perfectscale.yaml <<EOF
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  labels:
    argocd.argoproj.io/instance: argocd-applications
  name: perfectscale-crd
spec:
  destination:
    namespace: perfectscale
    server: https://kubernetes.default.svc
  project: default
  source:
    helm:
      valueFiles:
      - values.yaml
      - dev.yaml
    path: exporter
    repoURL: [email protected]:perfectscale/ps-kube.git
    targetRevision: HEAD
  syncPolicy:
    syncOptions:
    - CreateNamespace=true
EOF
  1. Apply the following command in the cluster application.

kubectl apply -f  perfectscale.yaml -n argo-cd

💡 Replace the namespace for argo-cd with the one where you have stored all of your applications.

  1. Check a new application in the ArgoCD.

    New application in ArgoCD
    New application in ArgoCD

  2. Synchronize the application.

    Sync the application
    Sync the application

  3. Ensure that all pods are running.

    Check running pods2
    Check running pods2

Last updated