Skip to main content
InterviewHubPRO
Section Overview
Q14

Question 14 of 50

Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

28%
GitOps & ArgoCD (50 Qs)•Part 2: ArgoCD at Scale & Progressive Delivery (Mid-Level)

How do you manage Secrets in GitOps without exposing plaintext in Git?

senior LevelCode ExamplegitopsArgoCD at Scale

In Simple Words: Checking plaintext passwords, API keys, or private certificates into Git is a severe security violation.

Industry Solutions:

  1. External Secrets Operator (ESO) (Recommended): Store secrets in AWS Secrets Manager, HashiCorp Vault, or Google Secret Manager. Commit a declarative ExternalSecret manifest to Git. ESO pulls the secret from the cloud provider inside the cluster and creates a native Kubernetes Secret.
  2. Sealed Secrets (Bitnami): Encrypt secrets client-side using a public key. The encrypted SealedSecret can safely sit in a public Git repository; only the in-cluster Sealed Secrets controller holds the private key to decrypt it into a Kubernetes Secret.
  3. Mozilla SOPS: Encrypts secret values inside YAML files using KMS keys (AWS KMS, GCP KMS, PGP).
yaml
# ExternalSecret committed safely to Git
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: database-credentials
spec:
  secretStoreRef:
    name: aws-secrets-manager
    kind: ClusterSecretStore
  target:
    name: db-secret # Native K8s Secret created inside cluster
  data:
    - secretKey: password
      remoteRef:
        key: prod/rds/mysql
        property: db_password