Kubernetes 入口块在创建状态

Kubernetes ingress block in creating state

我已经使用 Google Kubernetes Engine 部署了一个应用程序。所有功能都运行良好,但我遇到了一个奇怪的问题。如果我在 Google 云控制台中检查状态,入口始终处于创建阶段。

你可以在图片中看到它:

你有什么解决的建议吗?

谢谢

[编辑]

kubectl describe ingress: 
Name:             ++++++-nginx-ingress
Namespace:        ++++++
Address:
Default backend:  default-http-backend:80 (10.4.0.4:8080)
Rules:
  Host                        Path  Backends
  ----                        ----  --------
  ++++++-back.*******.net
                                 ++++++-nginx-np:80 (<none>)
  ++++++.*******.net
                                 ++++++-front-np:80 (<none>)
Annotations:
  ingress.kubernetes.io/backends:                    {"k8s-be-30141--93abcf3e6a0e0671":"HEALTHY","k8s-be-32338--93abcf3e6a0e0671":"HEALTHY","k8s-be-32589--93abcf3e6a0e0671":"HEALTHY"}
  ingress.kubernetes.io/url-map:                     k8s-um-++++++-++++++-nginx-ingress--93abcf3e6a0e0671
  kubectl.kubernetes.io/last-applied-configuration:  {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.allow-http":"false","kubernetes.io/ingress.global-static-ip-name":"++++++-nginx-ingress-ip"},"labels":{"app":"++++++-nginx-ingress"},"name":"++++++-nginx-ingress","namespace":"++++++"},"spec":{"rules":[{"host":"++++++-back.*******.net","http":{"paths":[{"backend":{"serviceName":"++++++-nginx-np","servicePort":80}}]}},{"host":"++++++.*******.net","http":{"paths":[{"backend":{"serviceName":"++++++-front-np","servicePort":80}}]}}]}}

  kubernetes.io/ingress.allow-http:             false
  kubernetes.io/ingress.global-static-ip-name:  ++++++-nginx-ingress-ip
Events:   

                                  <none>

YAML 文件:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
 name: ++++++-nginx-ingress
 labels:
   app: ++++++-nginx-ingress
 annotations:
     kubernetes.io/ingress.global-static-ip-name: ++++++-nginx-ingress-ip
     kubernetes.io/ingress.allow-http: "false"
 namespace: ++++++
spec:
 rules:
 - host: ++++++-back.++++++.net
   http:
     paths:
     - backend:
         serviceName: ++++++-nginx-np
         servicePort: 80
 - host: ++++++.++++++.net
   http:
     paths:
     - backend:
         serviceName: ++++++-front-np
         servicePort: 80

检查你的输出我可以看到在 Spec.Backend

之后没有创建 loadbalncer 或者没有正常获取你的静态 IP ++++++-nginx-ingress-ip
status:
  loadBalancer:
    ingress:
    - ip: xx.xx.xx.xx

在为入口配置 TLS 时使用注释 kubernetes.io/ingress.allow-http: "false"

另一件事,您可以检查 L7 HTTP 负载平衡 的附加组件是否在创建集群时默认启用