Set a custom label key to improve multi-tenancy and avoid collisions:
application.instanceLabelKey: argocd.argoproj.io/instance
Add this under data in the argocd-cm ConfigMap (e.g. argocd-cm.yaml). After updating, restart the Argo CD application controller/statefulset if not auto-rolling.
Run Argo CD in High Availability mode for production:
argocd-repo-server, argocd-application-controller, argocd-serverARGOCD_CONTROLLER_REPLICAS in the application controller pod spec (must match its replica count)ARGOCD_API_SERVER_REPLICAS in the argocd-server deployment (must match server replica count)Example (controller excerpt):
env:
- name: ARGOCD_CONTROLLER_REPLICAS
value: "4"
Example (server excerpt):
env:
- name: ARGOCD_API_SERVER_REPLICAS
value: "4"
By default, Redis “dangerous” commands (like FLUSH*, CONFIG, SHUTDOWN) are disabled in the Argo CD Redis HA chart for safety.
If you need to enable drop DB–related commands, edit the redis.conf in the argocd-redis-ha-configmap and remove or adjust the rename-command or disable-commands directives accordingly. Apply the change and restart the Redis pods. Only do this if you fully understand the operational and security impact.
You can expose the Argo CD UI (and API) using Envoy Gateway + Gateway API with TLS backend validation using the following manifest:
apiVersion: gateway.networking.k8s.io/v1alpha3
kind: BackendTLSPolicy
metadata:
name: argocd-backend-tls
namespace: argocd
spec:
targetRefs:
- group: ""
kind: Service
name: argocd-server
sectionName: https
validation:
wellKnownCACertificates: "System"
hostname: argocd.mydomain.com
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: argocd
namespace: argocd
spec:
parentRefs:
- name: eg-infra-01
namespace: envoy-gateway-system
sectionName: https
hostnames:
- argocd.mydomain.com
rules:
- backendRefs:
- name: argocd-server
port: 443
matches:
- path:
type: PathPrefix
value: "/"
timeouts:
request: "180s"
Apply with:
kubectl apply -f argocd-httproute.yaml
argocd-rbac-cm.yamlUse Argo CD Agent mode for disconnected or hub-and-spoke environments. See official documentation for installation and operations guidance:
https://argocd-agent.readthedocs.io/latest/
Key benefits:
Expose Argo CD metrics to Prometheus:
Add annotations to the argocd-server Service for the API/server metrics (port 8082):
metadata:
annotations:
prometheus.io/port: "8082"
prometheus.io/scrape: "true"
If you run a dedicated metrics service (e.g. argocd-server-metrics listening on 8083), annotate it similarly:
metadata:
annotations:
prometheus.io/port: "8083"
prometheus.io/scrape: "true"
Prefer ServiceMonitor (Prometheus Operator) when available instead of raw annotations:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: argocd-server
labels:
release: prometheus
spec:
selector:
matchLabels:
app.kubernetes.io/name: argocd-server
namespaceSelector:
matchNames:
- argocd
endpoints:
- port: metrics
interval: 30s
Key metrics to watch:
argocd_app_reconcile_*argocd_app_info, argocd_app_sync_totalargocd_app_k8s_request_totalargocd_api_server_request_duration_seconds