We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
示例中yaml:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example-ingress annotations: ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /apple pathType: Exact backend: service: name: apple-service port: number: 5678 - path: /banana pathType: Exact backend: service: name: banana-service port: number: 5678
实际访问中全部为404,无法访问http://localhost/apple地址。 查看NGINX Ingress(https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/) 文档如下:
If cluster version >= 1.19 the Ingress resource above will not work, instead of annotations you should use the new ingressClassName: nginx property.
修改yaml,添加ingressClassName: nginx属性,如下:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example-ingress annotations: ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx rules: - http: paths: - path: /apple pathType: Exact backend: service: name: apple-service port: number: 5678 - path: /banana pathType: Exact backend: service: name: banana-service port: number: 5678
访问成功
The text was updated successfully, but these errors were encountered:
No branches or pull requests
示例中yaml:
实际访问中全部为404,无法访问http://localhost/apple地址。 查看NGINX Ingress(https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/) 文档如下:
修改yaml,添加ingressClassName: nginx属性,如下:
访问成功
The text was updated successfully, but these errors were encountered: