简体   繁体   English

创建 ManagedCertificate 结果为“Status: FailedNotVisible”

[英]Creating a ManagedCertificate results in "Status: FailedNotVisible"

Using Kube.netes 1.12.6-gke.7 or higher it is possible to create a ManagedCertificate which is then referenced from an Ingress Resource exposing a Service to the Inte.net.使用 Kube.netes 1.12.6-gke.7 或更高版本,可以创建一个 ManagedCertificate,然后从向 Inte.net 公开服务的入口资源引用该证书。

Running kubectl describe managedcertificate certificate-name first indicates the certificate is in a Provisioning state but eventually goes to FailedNotVisible.首先运行 kubectl describe managedcertificate certificate-name 表示证书在 Provisioning state 中,但最终转到 FailedNotVisible。

Despite using a Static IP and DNS that resolves fine to the http version of said service all ManagedCertificate's end up in a "Status: FailedNotVisible" state.尽管使用 Static IP 和 DNS 可以很好地解决上述服务的 http 版本,但所有 ManagedCertificate 最终都处于“状态:FailedNotVisible”state。

Outline of what I am doing:我在做什么的概述:

  1. Generating a reserved (static) external IP Address生成保留(静态)外部 IP 地址

  2. Configuring DNS A record in CloudDNS to subdomain.domain.com to generated IP address from step 1.将 CloudDNS 中的 DNS A 记录配置到 subdomain.domain.com 以从步骤 1 生成 IP 地址。

  3. Creating a ManagedCertificate named "subdomain-domain-certificate" with kubectl apply -f with spec:domains containing a single domain corresponding to subdomain.domain.com DNS record in step 2.使用 kubectl apply -f 创建一个名为“subdomain-domain-certificate”的 ManagedCertificate,其中 spec:domains 包含对应于步骤 2 中的 subdomain.domain.com DNS 记录的单个域。
  4. Creating a simple deployment and service exposing it创建一个简单的部署和服务公开它
  5. Creating Ingress resource referring to default backend of service in step 4 as well as annotations for static ip created in step 1 and managed certificate generated in step 3.创建 Ingress 资源,引用步骤 4 中的默认服务后端以及步骤 1 中创建的 static ip 的注释和步骤 3 中生成的托管证书。
  6. Confirm that Ingress is created and is assigned static IP确认 Ingress 已创建并分配 static IP
  7. Visiting http://subdomain.domain.com serves the output from pod created in deployment in step 4访问http://subdomain.domain.com为第 4 步部署中创建的 pod 提供 output

After a little while过了一会儿

kubectl describe managedcertificate subdomain-domain-certificate kubectl 描述 managedcertificate 子域域证书

results in "Status: FailedNotVisible".结果为“状态:FailedNotVisible”。

Name:         subdomain-domain-certificate
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  networking.gke.io/v1beta1
Kind:         ManagedCertificate
Metadata:
  Creation Timestamp:  2019-04-15T17:35:22Z
  Generation:          1
  Resource Version:    52637
  Self Link:           /apis/networking.gke.io/v1beta1/namespaces/default/managedcertificates/subdomain-domain-certificate
  UID:                 d8e5a0a4-5fa4-11e9-984e-42010a84001c
Spec:
  Domains:
    subdomain.domain.com
Status:
  Certificate Name:    mcrt-ac63730e-c271-4826-9154-c198d654f9f8
  Certificate Status:  Provisioning
  Domain Status:
    Domain:  subdomain.domain.com
    Status:  FailedNotVisible
Events:
  Type    Reason  Age   From                            Message
  ----    ------  ----  ----                            -------
  Normal  Create  56m   managed-certificate-controller  Create SslCertificate mcrt-ac63730e-c271-4826-9154-c198d654f9f8

From what I understand if the Load Balancer is configured correctly (done under the hood in the ManagedCertificate resource) and the DNS (which resolves fine to the non https endpoint) checks out the certificate should go in to a Status: Active state?据我了解,如果负载均衡器配置正确(在 ManagedCertificate 资源的幕后完成)和 DNS(可以很好地解析为非 https 端点)检查证书应该 go 进入状态:活动 state?

The issue underlying my problem ended up being a DNSSEC misconfiguration.我的问题背后的问题最终是 DNSSEC 配置错误。 After running the DNS through https://dnssec-analyzer.verisignlabs.com/ I was able to identify and fix the issue.通过https://dnssec-analyzer.verisignlabs.com/运行 DNS 后,我能够识别并解决问题。

DNSSEC was indeed not enabled for my domain but after configuring that, the ManagedCertificate configuration was still not going through and I had no clue what was going on. DNSSEC 确实没有为我的域启用,但是在配置之后, ManagedCertificate 配置仍然没有通过,我不知道发生了什么。 Deleting and re-applying the ManagedCertificate and Ingress manifests did not do the trick.删除并重新应用 ManagedCertificate 和 Ingress 清单并没有解决问题。 But issuing the command gcloud beta compute ssl-certificates list showed several unused managed certificates hanging around and deleting them with cloud compute ssl-certificates delete NAME ... , and then restarting the configuration process did the trick in my case.但是发出命令gcloud beta compute ssl-certificates list显示了几个未使用的托管证​​书,并使用cloud compute ssl-certificates delete NAME ...删除它们,然后重新启动配置过程在我的情况下起到了作用。

You need to make sure the domain name resolves to the IP address of your GKE Ingress, following the directions for " creating an Ingress with a managed certificate " exactly.您需要确保域名解析为 GKE Ingress 的 IP 地址,完全按照“ 使用托管证书创建 Ingress ”的说明进行操作。

For more details, see the Google Cloud Load Balancing documentation.有关更多详细信息,请参阅 Google Cloud 负载平衡文档。 From https://cloud.google.com/load-balancing/docs/ssl-certificates#domain-status :https://cloud.google.com/load-balancing/docs/ssl-certificates#domain-status

"The status FAILED_NOT_VISIBLE indicates that certificate provisioning failed for a domain because of a problem with DNS or the load balancing configuration. Make sure that DNS is configured so that the certificate's domain resolves to the IP address of the load balancer." “状态 FAILED_NOT_VISIBLE 表示由于 DNS 或负载平衡配置问题,域的证书配置失败。确保配置了 DNS,以便证书的域解析为负载平衡器的 IP 地址。”

就我而言,此问题是由我在Ingress资源中输入的拼写错误引起的,该拼写错误拼写了受管证书的名称。

networking.gke.io/managed-certificates: elasticseach-certificate

I just ran into this problem when I was setting up a new service and my allowance of 8 external IPs was used up.我刚刚在设置新服务时遇到了这个问题,并且我的 8 个外部 IP 已用完。

Following the trouble shooting guide , I checked whether there was a forwarding rule for port 443 to my ingress.按照故障排除指南,我检查了是否有端口 443 到我的入口的转发规则。 There wasn't.没有。 When I tried to set it up manually, I got an error telling me I used up my 8 magic addresses.当我尝试手动设置它时,我收到一个错误消息,告诉我我用完了我的 8 个魔术地址。 I deleted forwarding rules I didn't need et voila!我删除了我不需要的转发规则等等!

Now, why the forwarding rule for port 80 was successfully set up for the same ingress is beyond me.现在,为什么我无法为同一个入口成功设置端口 80 的转发规则。

I ran across this same error and found that I had created the managedCertificate in the wrong Kubernetes namespace.我遇到了同样的错误,发现我在错误的 Kubernetes 命名空间中创建了 managedCertificate。 Once the managedCertificate was placed in the correct namespace everything worked.一旦 managedCertificate 被放置在正确的命名空间中,一切都会工作。

After reading the trouble shooting guide , I still wasn't able to resolve my issue.阅读故障排除指南后,我仍然无法解决我的问题。 When I checked the GCP ingress events, it showed that the ingress could not locate the SSL policy.当我查看GCP ingress事件时,显示ingress无法定位到SSL策略。 Check if you missed something when creating the ingress.检查您在创建入口时是否遗漏了什么。

and this is another reference useful to verify your k8s manifests to set up the managed certificate and ingress.这是另一个有用的参考资料,可用于验证您的 k8s 清单以设置托管证书和入口。 Hope it helps someone.希望它能帮助别人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获得 Google 管理的证书(入口)? 我没有收到“ManagedCertificate”的匹配项 - How to get a Google managed certificate (ingress)? I received no matches for "ManagedCertificate" Heroku:禁止在应用程序上创建 email 插件的用户状态 - Heroku: user status banned from creating email addons on apps 从数据库查询结果创建 Flink DataStream - Creating a Flink DataStream from database query results 从 Athena 查询结果创建 CloudWatch 指标 - Creating a CloudWatch Metrics from the Athena Query results 使用分区投影创建表会导致空表 - Creating a table with partition projection results in an empty one 使用 next/image 从 Firebase 存储中获取图像会导致 400 状态代码 - Fetching an image from Firebase storage using next/image results in a 400 status code 使用 --enable-autoscaling 创建节点池会导致参数无效 - Creating a node-pool with --enable-autoscaling results in an invalid argument 用户登录/注销状态设置为上下文,并在使用该上下文时产生问题 - User logged in/out status set as context, and creating problems when that context is used 获取租户状态时出错 - Error in getting the tenant status 为什么 mongo 的状态会抛出我(code = exited, status = 48)? - Why does the status of mongo throw me (code = exited, status = 48)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM