ArgoCD新手。我已经在我的EKS集群上部署了ArgoCD,前面有一个AWS ALB控制器。
...
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/listen-port: '[{"HTTPS":443}]'
name: argo-ingress
namespace: argocd
spec:
rules:
- host: argocd.example.com
http:
paths:
- backend:
serviceName: argocd-server
servicePort: 80
path: /
假设SSL终止于ALB,我部署了API服务器和API服务器,并使用以下参数:
spec:
containers:
- command:
- argocd-server
- --insecure
- --staticassets
- /shared/app
当我在集群上转发ArgoCD时,我能够在本地检索对象。
HTTP request sent, awaiting response... 200 OK
Length: 2080536 (2.0M) [application/javascript]
Saving to: ‘main.12b930b6a3d660c9da5a.js.2’
100%[===================================================================================================================>] 2,080,536 --.-K/s in 0.03s
2020-10-26 02:14:53 (64.2 MB/s) - ‘main.12b930b6a3d660c9da5a.js.2’ saved [2080536/2080536]
然而,当我使用浏览器访问UI时,我会得到200个MSG,并得到一个空白的UI页面,而main.js和图像会得到400个错误。有人能帮我解决这个问题吗?
我设法找到了这个问题。入口控制器规则中存在拼写错误。结果,所有请求都由最后一个ALB规则处理,结果是404。修复方法是在路径中包含一个"*"。见下文:
...
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/listen-port: '[{"HTTPS":443}]'
name: argo-ingress
namespace: argocd
spec:
rules:
- host: argocd.example.com
http:
paths:
- backend:
serviceName: argocd-server
servicePort: 80
path: /*