k8s注解配置,文件大小,重定向

satuo20 9月前 ⋅ 260 阅读
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: cmgateway-api
  namespace: kp-test
  annotations:
    kubesphere.io/alias-name: 课后服务网关
    kubesphere.io/creator: duanzhengwei
    # 上传文件大小
    nginx.ingress.kubernetes.io/proxy-body-size: 500m
    # 超时时间
    nginx.ingress.kubernetes.io/proxy-connect-timeout: '180000'
    nginx.ingress.kubernetes.io/proxy-read-timeout: '180000'
    nginx.ingress.kubernetes.io/proxy-send-timeout: '180000'
    # 重定向
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: cmtest.local.yjzhixue.com
      http:
        paths:
          - path: /api/(.*)
            pathType: ImplementationSpecific
            backend:
              serviceName: gateway-svc
              servicePort: 80

全部评论: 0

    我有话说: