我无法访问域以在 Kubernetes 中运行入口服务,以下是入口服务的 YAML 配置,我无法在浏览器中访问 ticketing.dev >
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-service
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- host: ticketing.dev
http:
paths:
- path: /api/users/?(.*)
pathType: Prefix
backend:
service:
name: auth-srv
port:
number: 3000
- path: /?(.*)
pathType: Prefix
backend:
service:
name: client-srv
port:
number: 3000
我已将域名添加到 windows 主机文件中 驱动程序 \etc\host 127.0.0.1 ticketing.dev
答案 0 :(得分:0)
我刚刚重新应用了这些步骤,现在可以使用了
https://kubernetes.github.io/ingress-nginx/deploy/#provider-specific-steps