- March 14, 2024
- 1 min read
Fixing error 'ERR_TOO_MANY_REDIRECTS' when using HAProxy with ArgoCD
When you use HAProxy Ingress with ArgoCD on Kubernetes you are going to run into this error 'ERR_TOO_MANY_REDIRECTS' when you browse to the ArgoCD server URL. I lost of few hours trying to figure out what the cause is and wanted to write this up with the hope that it saves some one else time later and also a note for myself so I don't forget exactly what I did to solve the issue.
I installed ArgoCD server on my EKS cluster following the instructions in the ArgoCD docs using the command below
kubectcl create namespace gitops
kubectl apply -n gitops -f https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yamlAfter that I created an Ingress Resource by running the command below
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd
namespace: gitops
spec:
ingressClassName: haproxy
rules:
- host: gitops.sandbox2841.opentlc.com
http:
paths:
- backend:
service:
name: argocd-server
port:
name: https
path: /
pathType: Prefix
tls:
- hosts:
- gitops.sandbox2841.opentlc.com
EOFBrowse to https://gitops.sandbox2841.opentlc.com and started noticing 'ERR_TOO_MANY_REDIRECTS'. reason why this was happening is because HAProxy by default terminates SSL and forwards HTTP to backend service and ArgoCD server when it sees an HTTP traffic it automatically redirects to HTTPS. This results in an infinite loop and eventually HAProxy gives up and you see that error in browser.
So to fix this problem I simply had to add an annotation ingress.kubernetes.io/ssl-passthrough: "true" to the ingress resource so HAProxy instead of terminating HTTPS traffic at the proxy will do an SNI passthrough.
Updated Ingress resource as shown below
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd
namespace: gitops
annotations:
ingress.kubernetes.io/ssl-passthrough: "true"
spec:
ingressClassName: haproxy
rules:
- host: gitops.sandbox2841.opentlc.com
http:
paths:
- backend:
service:
name: argocd-server
port:
name: https
path: /
pathType: Prefix
tls:
- hosts:
- gitops.sandbox2841.opentlc.com
EOFGrab the admin password from kubernetes secret by running command below
kubectl get secrets argocd-initial-admin-secret -n gitops -o jsonpath="{.data.password}" | base64 -d | pbcopyBrowse to https://gitops.sandbox2841.opentlc.com enter admin for username and paste the password obtained from previous step and you will be logged into ArgoCD server successfully as shown in screen capture below

Hope this helps,
Thanks,
Ram
Related Posts
RAM GOPINATHAN
September 17, 2026
Onboarding Edge Devices to FlightCTL with FIDO Device Onboarding
How I wired FDO's owner service, a bootc image layering go-fdo-client on the FlightCTL agent base, and two Ansible playbooks together so edge devices enroll into FlightCTL with zero manual steps.
RAM GOPINATHAN
September 14, 2026
Provisioning Devices and Onboarding to FlightCTL
Building a bootc image with the FlightCTL agent, baking it into an AMI, and provisioning EC2 test devices that inject their enrollment credentials via cloud-init and show up as pending enrollments in FlightCTL.
RAM GOPINATHAN
September 12, 2026
Deploying FlightCTL on EKS: Edge Fleet Management with Keycloak OIDC
A step-by-step walkthrough of standing up FlightCTL on Amazon EKS with Keycloak OIDC auth, ALB ingress, and a dedicated NLB for mTLS device enrollment.