我正在尝试在 GKE 上配置 https 负载平衡器。我正在关注:https ://cloud.google.com/load-balancing/docs/ssl-certificates和https://cloud.google.com/kubernetes-engine/docs/concepts/ingress
我的配置使用 Let's Encrypt 的证书已经工作了一段时间。但是一直更新证书太麻烦了,所以我想测试一下谷歌的托管服务。
到目前为止,这就是我设置它的方式,但卡在FAILED_NOT_VISIBLE
. 关于如何进一步修复或调试此问题的任何想法?
k8s/staging/staging-ssl.yml
7 apiVersion: extensions/v1beta1
8 kind: Ingress
9 metadata:
10 name: my-staging-lb-ingress
11 annotations:
12 kubernetes.io/ingress.global-static-ip-name: "my-staging-global"
13 ingress.gcp.kubernetes.io/pre-shared-cert: "staging-google-managed-ssl"
14 kubernetes.io/ingress.allow-http: "false"
15 spec:
16 rules:
17 - host: staging.my-app.no
18 http:
19 paths:
20 - path: /*
21 backend:
22 serviceName: my-svc
23 servicePort: 3001
保留IP
$ gcloud compute addresses list
NAME REGION ADDRESS STATUS
my-staging-global 35.244.160.NNN RESERVED
$ host staging.my-app.no
35.244.160.NNN
$ gcloud beta 计算 ssl-certificates 描述 staging-google-managed-ssl
creationTimestamp: '2018-12-20T04:59:39.450-08:00'
id: 'NNNN'
kind: compute#sslCertificate
managed:
domainStatus:
staging.my-app.no: FAILED_NOT_VISIBLE
domains:
- staging.my-app.no
status: PROVISIONING
name: staging-google-managed-ssl
selfLink: https://www.googleapis.com/compute/beta/projects/my-project/global/sslCertificates/staging-google-managed-ssl
type: MANAGED
我在将SSL 证书资源与目标代理相关联的帖子开头链接到的文档中找到了一个部分 :
使用以下 gcloud 命令将 SSL 证书资源与目标代理相关联,无论 SSL 证书是自我管理的还是 Google 管理的。
gcloud compute target-https-proxies create [NAME] \
--url-map=[URL_MAP] \
--ssl-certificates=[SSL_CERTIFICATE1][,[SSL_CERTIFICATE2],[SSL_CERTIFICATE3],...]
当我的 Ingress 配置中有这条线时,是否有必要这样做?
13 ingress.gcp.kubernetes.io/pre-shared-cert: "staging-google-managed-ssl"