1

尝试使用 CLI 登录时,出现错误

FATA[0004] rpc error: code = Internal desc = transport: received the unexpected content-type "text/plain; charset=utf-8"

这是我们的 Ingress 配置:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: argocd-server-ingress
  namespace: argocd
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  tls:
    - hosts:
      - argocd.foo.dev
      secretName: argocd-foo-dev-tls
  rules:
    - host: argocd.foo.dev
      http:
        paths:
        - backend:
            serviceName: argocd-server
            servicePort: https
          path: /

Web UI 按预期工作。

我正在使用命令:

argocd login argocd.foo.dev

什么不见​​了?

4

1 回答 1

2

While I am not 100% what is the reason for the above error, using --grpc-web works around it:

argocd login argocd.foo.dev --grpc-web

Documentation says that this flag is needed when HTTP2 is not supported:

Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.

In our case, our ingress controller is and it does support .

于 2020-09-03T18:23:06.473 回答