Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ssl 带有通配符证书的argocd_Ssl_Kubernetes_Nginx Ingress_Argocd - Fatal编程技术网

Ssl 带有通配符证书的argocd

Ssl 带有通配符证书的argocd,ssl,kubernetes,nginx-ingress,argocd,Ssl,Kubernetes,Nginx Ingress,Argocd,我使用的是AWS NLB,因此SSL应该发生在argocd(1.7.8)端。然而,似乎我什么都不做argocd总是使用自签名证书 ➜ curl -vvI https://argocd-dev.example.com * Trying 54.18.49.47:443... * Connected to argocd-dev.example.com (54.18.49.47) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1

我使用的是AWS NLB,因此SSL应该发生在argocd(1.7.8)端。然而,似乎我什么都不做argocd总是使用自签名证书

➜ curl -vvI https://argocd-dev.example.com
*   Trying 54.18.49.47:443...
* Connected to argocd-dev.example.com (54.18.49.47) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: self signed certificate
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
这是我的入口

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: argocd-server-ingress
  namespace: argocd
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/proxy-body-size: 100m
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
spec:
  rules:
  - host: argocd-dev.example.com
    http:
      paths:
      - backend:
          serviceName: argocd-server
          servicePort: https
以下是如何启动argocd服务器:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: argocd-server
    app.kubernetes.io/part-of: argocd
  name: argocd-server
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: argocd-server
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
  template:
    metadata:
      labels:
        app.kubernetes.io/name: argocd-server
    spec:
      containers:
      - command:
        - argocd-server
        - --staticassets
        - /shared/app
        - --loglevel 
        - debug
        - --client-certificate 
        - /var/ssl-cert/tls.crt
        - --client-key
        - /var/ssl-cert/tls.key
        image: argoproj/argocd:v1.7.8
        imagePullPolicy: Always
        name: argocd-server
        ports:
        - containerPort: 8080
        - containerPort: 8083
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 3
          periodSeconds: 30
        volumeMounts:
        - mountPath: /app/config/ssh
          name: ssh-known-hosts
        - mountPath: /app/config/tls
          name: tls-certs
        - mountPath: /var/ssl-cert
          name: ssl-cert
          readOnly: true
      serviceAccountName: argocd-server
      volumes:
      - emptyDir: {}
        name: static-files
      - configMap:
          name: argocd-ssh-known-hosts-cm
        name: ssh-known-hosts
      - configMap:
          name: argocd-tls-certs-cm
        name: tls-certs
      - name: ssl-cert
        secret:
          secretName: tls-secret

你应该看看

ArgoCD有一些不寻常的配置是必需的


如果负载平衡器正在执行SSL,则需要在http(不安全)模式下启动Argo,或者需要将密码传递到Kubernetes入口。

Argo CD需要在
tls.crt
tls.key
argocd secret的密钥中使用证书和证书密钥


不需要重新启动-更新机密后应立即使用新证书。

是否尝试将servicePort更改为
http