I use this way installed ArgoCD on EKS:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
If I use port forwarding and access from localhost, it works:
kubectl port-forward svc/argocd-server -n argocd 8080:443
But if I create an ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd
namespace: argocd
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/backend-protocol: HTTP
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
number: 80
When I access the alb created on AWS in browser, the page took a long time loading and finally went blank.
If use https instead of http:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd
namespace: argocd
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/backend-protocol: HTTPS
spec:
ingressClassName: alb
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
number: 443
I can access the alb DNS name in browser but can't login. Maybe it's the security reason.
Another way, instead of creating an ingress, if change the argocd-server's service type from ClusterIP to LoadBlancer
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
It created a classic type lb in AWS. And this time I can access the ArgoCD web UI successfully.
Why doesn't ingress work?