Deploy the Cortex KSPM agent to on-premises Kubernetes clusters using ArgoCD. ArgoCD is a declarative GitOps continuous delivery tool that automates agent deployment and configuration synchronization from a Git repository.
Install ArgoCD.
kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Connect ArgoCD to a git repository.
# HTTPS based authentication cat <<EOF | kubectl apply -f - apiVersion: v1 kind: Secret metadata: name: gitlab-repo namespace: argocd labels: argocd.argoproj.io/secret-type: repository stringData: type: git url: https://gitlab.example.com/kspm/kspm-gitops.git username: <GIT_USERNAME> password: <GIT_TOKEN> EOF # SSH based authentication cat <<EOF | kubectl apply -f - apiVersion: v1 kind: Secret metadata: name: gitlab-repo namespace: argocd labels: argocd.argoproj.io/secret-type: repository stringData: type: git url: git@gitlab.example.com:kspm/kspm-gitops.git sshPrivateKey: | -----BEGIN OPENSSH PRIVATE KEY----- <your-private-key> -----END OPENSSH PRIVATE KEY----- EOFApply the ArgoCD Application manifest.
kubectl apply -f charts/overlays/application.yaml