How to Set Up Argo CD with Private Repos and Role-Based Access Control for Secure Kubernetes Deployments

Priyanshu Bhatt
5 min readJun 3, 2024

Argo CD has quickly become a favorite among DevOps teams for its ability to manage Kubernetes deployments using the GitOps methodology. One key feature that makes Argo CD powerful and secure is its robust Role-Based Access Control (RBAC) system. In this blog post, we’ll delve into the intricacies of policies and roles in Argo CD, and how you can leverage them to enhance the security and efficiency of your deployment workflows by using Private Repository.

USING PRIVATE REPO FOR ARGOCD

STEP 1: Create an Access Token for your GitHub account from the developer settings in the settings tabs of your account.

STEP 2: Create a Kubernetes secret for the GitHub token, this will be utilized to authenticate to the GitHub repository.

apiVersion: v1
kind: Secret
metadata:
name: argo-private-repo-secret
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository # important label
stringData:
type: git
url: https://github.com/Unthink-pri18/Argo-private-repo.git
username: argo-cd-private-repo # name…

--

--

Priyanshu Bhatt

AWS Solutions Architect || Terraform Certified Associate || DevOps Engineer || I Share Crisp Tech Stories