[root@k8s-master k8s-yaml]# kubectl describe ing
Name: my-ingress-for-nginx
Namespace: default
Address:
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host Path Backends
---- ---- --------
a.demo.kuboard.cn
/ my-service:80 (10.244.0.30:80,10.244.2.15:80)
Annotations: Events: <none>
為什么會找不到:官網給出的解釋: Note: Depending on the Ingress controller you are using, you may need to create a default-http-backend Service.
Default Backend
An Ingress with no rules sends all traffic to a single default backend. The default backend is typically a configuration option of the Ingress controller and is not specified in your Ingress resources.
If none of the hosts or paths match the HTTP request in the Ingress objects, the traffic is routed to your default backend.
翻譯:
控制器。注意:根據您正在使用的Ingress控制器,您可能需要創建一個default-http-backend服務。
違約后端
沒有規則的入口將所有流量發送到一個默認后端。默認后端通常是Ingress控制器的一個配置選項,在您的Ingress資源中沒有指定。
如果Ingress對象中的主機或路徑都不匹配HTTP請求,則流量將被路由到默認后端。