kamaok

k8s-ingress-1

Dec 1st, 2020 (edited)
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.13 KB | None | 0 0
  1. # kubectl get  ing ingress-nginx-main -o yaml
  2. ...
  3.   name: ingress-nginx-main
  4.   namespace: default
  5. spec:
  6.   rules:
  7.   - host: stage2.mydomain.com
  8.     http:
  9.       paths:
  10.       - backend:
  11.           serviceName: service-1
  12.           servicePort: 80
  13.         path: /$
  14.         pathType: ImplementationSpecific
  15.       - backend:
  16.           serviceName: service-2
  17.           servicePort: 80
  18.         path: /.+$
  19.         pathType: ImplementationSpecific
  20.       - backend:
  21.           serviceName: service-2
  22.           servicePort: 80
  23.         path: /trade_ws$
  24.         pathType: ImplementationSpecific
  25.       - backend:
  26.           serviceName: service-1
  27.           servicePort: 80
  28.         path: /trade
  29.         pathType: ImplementationSpecific
  30.  
  31. # kubectl get  ing ingress-nginx-subroutes -o yaml
  32. ...
  33.   name: ingress-nginx-subroutes
  34.   namespace: default
  35. spec:
  36.   rules:
  37.   - host: stage2.mydomain.com
  38.     http:
  39.       paths:
  40.       - backend:
  41.           serviceName: service-1
  42.           servicePort: 80
  43.         path: /(ru|es|tr|id|cn|vn|ar|ko|zh|fl|hi)$
  44.         pathType: ImplementationSpecific
  45.       - backend:
  46.           serviceName: service-1
  47.           servicePort: 80
  48.         path: /(orders|assets/overview|assets/balance|assets/history|assets/deposit|assets/withdraw|account/dashboard|account/security|account/api|account/security/google-authenticaton|account/security/anti-phishing|account/security/change-password|404|about-us|airdrop|bug-bounty|fee-schedule|forgot-password|login|markets|register|reset-password|two-factor|verify|static|_next)
  49.         pathType: ImplementationSpecific
  50.       - backend:
  51.           serviceName: service-1
  52.           servicePort: 80
  53.         path: /(ru|es|tr|id|cn|vn|ar|ko|zh|fl|hi|en)/(orders|assets|/overview|assets/balance|assets/history|assets/deposit|assets/withdraw|account/dashboard|account/security|account/api|account/security/google-authenticaton|account/security/anti-phishing|account/security/change-password|404|about-us|airdrop|bug-bounty|fee-schedule|forgot-password|login|markets|register|reset-password|trade|two-factor|verify|static|_next)
  54.         pathType: ImplementationSpecific
  55.  
  56.  
  57. Service-1
  58. location ~* "^/(ru|es|tr|id|cn|vn|ar|ko|zh|fl|hi|en)/(orders|assets|/overview|assets/balance|assets/history|assets/deposit|assets/withdraw|account/dashboard|account/security|account/api|acc
  59. ount/security/google-authenticaton|account/security/anti-phishing|account/security/change-password|404|about-us|airdrop|bug-bounty|fee-schedule|forgot-password|login|markets|register|reset-password|trade|t
  60. wo-factor|verify|static|_next)"
  61.  
  62. Service-1
  63. location ~* "^/(orders|assets/overview|assets/balance|assets/history|assets/deposit|assets/withdraw|account/dashboard|account/security|account/api|account/security/google-authenticaton|acco
  64. unt/security/anti-phishing|account/security/change-password|404|about-us|airdrop|bug-bounty|fee-schedule|forgot-password|login|markets|register|reset-password|two-factor|verify|static|_next)"
  65.  
  66. Service-1
  67. location ~* "^/(ru|es|tr|id|cn|vn|ar|ko|zh|fl|hi)$"
  68.  
  69. Service-2
  70. location ~* "^/trade_ws$"
  71.  
  72. Service-1
  73. location ~* "^/trade"
  74.  
  75. Service-2
  76. location ~* "^/.+$"
  77.  
  78. Service-1
  79. location ~* "^/$"
Add Comment
Please, Sign In to add comment