While setting up the argocd cli trying to access an argocd server whose endpoint is an ingress-nginx ssl-passthrough, I was getting the error:
FATA[0010] rpc error: code = Unknown desc = unexpected HTTP status code received from server: 307 (Temporary Redirect); malformed header: missing HTTP content-type
To solve the issue, I needed to add the following annotation to the ingress definition as defined on the official guide:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
The final ingress template looks like the following:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my.argo.endpoint.com
namespace: argocd
annotations:
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
ingressClassName: nginx
rules:
- host: my.argo.endpoint.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
name: https
No responses yet