首页 > 技术文章 > Kubernetes Ingress-nginx rewrite重写

malukang 2020-08-20 11:54 原文

 

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

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: /

 

推荐阅读