kubernetes ingress 301问题

问题:按照官方文档搭建ingress后,请求url都会返回301。

解决方法:

    ingress.kubernetes.io/ssl-redirect: "false"

完整yaml文件:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  namespace: default
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
  - http:
      paths:
      - path: /portal
        backend:
          serviceName: portal-service
          servicePort: 6000

你可能感兴趣的:(kubernetes ingress 301问题)