Kubernetes Ingress-nginx rewrite重写

 

从一个域名跳转的到另一个域名访问

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/configuration-snippet: |
         rewrite ^/li800/(.*)$ https://xxoo60.xxoo800.com/li800/$1 redirect;
spec:
  rules:
  - host: store-staging.devops.porsche-internaldns.cn
    http:
      paths:
      - backend:
          serviceName: omp-f-client-web
          servicePort: 8080
        path: /

 

posted @ 2020-08-20 11:54  康康路马  阅读(3065)  评论(0编辑  收藏  举报