官方文档:
工作中遇到的实际问题总结:
1.nginx的路径和后端的路径不同;
例:访问xxx.xxx/apppy/api/test/pic的时候跳转到后端 xxx:xxx:8080/api/test/picapiVersion: extensions/v1beta1kind: Ingressmetadata: annotations: nginx.ingress.kubernetes.io/rewrite-target: /$2 name: gos-api namespace: gosspec: rules: - host: api.baidu.com http: paths: - backend: serviceName: gos-api servicePort: 80 path: /apppy(/|$)(.*)