github.com/nginxinc/kubernetes-ingress@v1.12.5/examples-of-custom-resources/advanced-routing/cafe-virtual-server.yaml (about) 1 apiVersion: k8s.nginx.org/v1 2 kind: VirtualServer 3 metadata: 4 name: cafe 5 spec: 6 host: cafe.example.com 7 upstreams: 8 - name: tea-post 9 service: tea-post-svc 10 port: 80 11 - name: tea 12 service: tea-svc 13 port: 80 14 - name: coffee-v1 15 service: coffee-v1-svc 16 port: 80 17 - name: coffee-v2 18 service: coffee-v2-svc 19 port: 80 20 routes: 21 - path: /tea 22 matches: 23 - conditions: 24 - variable: $request_method 25 value: POST 26 action: 27 pass: tea-post 28 action: 29 pass: tea 30 - path: /coffee 31 matches: 32 - conditions: 33 - cookie: version 34 value: v2 35 action: 36 pass: coffee-v2 37 action: 38 pass: coffee-v1