簡體   English   中英

所有瀏覽器都不信任 SSL 證書

[英]SSL Cert Not Trusted By All Browsers

我們有一個來自 DigiCert 的通配符證書,它安裝在我們的 aks 實例上,它適用於 IE 和 Chrome,但 firefox 有很大的問題,不信任該站點。 當我通過 SSL 檢查器運行該站點時,它表明

The certificate is not trusted in all web browsers. You may need to install an Intermediate/chain certificate to link it to a trusted root certificate.

這些是最初安裝證書所遵循的說明:

將 SSL 證書安裝到每個命名空間中 從 pfx 文件導出證書 為此,您將需要 openssl。 這是我能找到的在 Windows 10 中安裝和使用它的最佳資源。

openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.txt

打開 .txt 文件並刪除標題(即從 -----BEGIN CERTIFICATE----- 一直到底部)

從 pfx 文件導出私鑰

openssl pkcs12 -in filename.pfx -nocerts -out key.txt

打開 .txt 文件並刪除標題(即保留 -----BEGIN ENCRYPTED PRIVATE KEY----- 到底部)

從私鑰中刪除密碼

openssl rsa -in key.txt -out server.txt

創建 secrets 通過 azure 的 cli 連接到 kube,然后運行命令:

az aks get-credentials -g aks-rg -n clustername

將 kube 合並到您的 kubectl cli。

如果您需要刪除以前安裝的證書,您應該運行以下命令:

kubectl delete secret clustername-tls --namespace dev
kubectl delete secret clustername-tls --namespace test
kubectl delete secret clustername-tls --namespace uat
kubectl delete secret clustername-tls --namespace prod

要創建新證書:

kubectl create secret tls clustername-tls --key server.txt --cert cert.txt --namespace dev
kubectl create secret tls clustername-tls --key server.txt --cert cert.txt --namespace test
kubectl create secret tls clustername-tls --key server.txt --cert cert.txt --namespace uat
kubectl create secret tls clustername-tls --key server.txt --cert cert.txt --namespace prod

正確安裝中間證書錯過了什么?

你在 ingress 中使用這個秘密作為 tls-secret 嗎?

您必須使用入口控制器實現入口,並且必須在路徑內使用您的秘密。

您可以按照本指南使用 cert-manager 設置 ingress-nginx 控制器。

入口 nginx 將用作負載均衡器並將應用程序公開到互聯網。 certmanager 將用作管理 ssl 和 tls 證書。

cert-manager 自動生成 ssl 證書並對其進行管理。

請按照此操作: https : //www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM