我正试图通过nginx入口路由仪表板流量。我有两个集群单主机v1.9.0和多主机v1.10.0。低于入口规则工作(curl-kv
https://kubeapi.sfgroups.com/dashboard/
)在单主集群中,但在多主集群中得到404。
单主入口版本:0.9.0-beta.19
多主入口版本:0.15.0
这是规则。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/secure-backends: "true"
name: ingress-dev-dashboard
spec:
rules:
- host: kubeapi.sfgroups.com
http:
paths:
- backend:
serviceName: kubernetes-dashboard
servicePort: 443
path: /dashboard
tls:
- hosts:
- kubeapi.sfgroups.com
secretName: kubeapi-secret
输出
> GET /dashboard/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: kubeapi.sfgroups.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Mon, 18 Jun 2018 21:57:38 GMT
< Content-Length: 19
<
404 page not found
有解决这个问题的技巧吗?
谢谢
锶