我正在使用 GKE Identity-aware proxy > L7 load balancer > Custom host and path rules。它适用于根路径。但它不适用于自定义路径。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: basic-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: "my-static-ip"
spec:
rules:
- host: my.custom.org
http:
paths:
- path: /v1/*
backend:
serviceName: webv1
servicePort: 8080
- path: /v3/*
backend:
serviceName: webv3
servicePort: 8080
- path: /nginx/*
backend:
serviceName: nginx
servicePort: 80
- path: /*
backend:
serviceName: nginx
servicePort: 80
路径/
和/nginx/
工作正常。/v2/
并/v3/
抛出There was a problem with your request. Error code 11
。
如果我禁用 IAP,一切正常。
环境:
Kubernetes版本(使用
kubectl version
):1.12.7-gke.17云提供商或硬件配置:GKE
使用 Ingress @ https://cloud.google.com/kubernetes-engine/docs/tutorials/http-balancer设置 HTTP 负载平衡
为 GKE 启用 Cloud IAP @ https://cloud.google.com/iap/docs/enabling-kubernetes-howto