zackzhangkai commented on issue #3599:
URL: https://github.com/apache/apisix/issues/3599#issuecomment-782575030


   
   configmap: 
   
   ```bash
   data:
     config.yaml: |
       etcd:
         host:
           - "https://etcd.kube-system.svc.cluster.local:2379";
         tls:
           verify: true
       apisix:
         ssl:
           ssl_trusted_certificate: /etc/ssl/etcd/ssl/
   ```
   
   deployment mount this volume:
   
   ```bash
           - mountPath: /etc/ssl/etcd/ssl
             name: etcd-certs-0
             readOnly: true
   ...
         volumes:
         - hostPath:
             path: /etc/ssl/etcd/ssl
             type: DirectoryOrCreate
           name: etcd-certs-0
   ```
   
   Errors:
   
   ```
   /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init
   /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   request etcd endpoint 
'https://etcd.kube-system.svc.cluster.local:2379/version' error, certificate 
verify failed
   ```
   
   the certs have no problem.
   
   ```bash
   [root@ssa3 ~]# curl https://127.0.0.1:2379/version --cacert 
/etc/ssl/etcd/ssl/ca.pem --cert /etc/ssl/etcd/ssl/admin-ssa3.pem   --key 
/etc/ssl/etcd/ssl/admin-ssa3-key.pem
   {"etcdserver":"3.3.12","etcdcluster":"3.3.0"}
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to