首页 文章

GCP IAP服务在负载均衡器上找不到HTTPS代理

提问于
浏览
0

我正在尝试使用HTTPS负载均衡器按照此处的说明设置IAP:https://cloud.google.com/iap/docs/load-balancer-howto

我的后端是gke集群,它在端口80上有一个入口来访问http web服务器 .

前端是https,带有效证书 .

通过HTTPS FE将流量路由从LB到Web服务器没有任何问题,但是当我想使用如下命令启用IAP时:

gcloud beta compute backend-services update k8s-be-30324--34c500f0e91c741a --iap=enabled --global

它返回以下输出:

WARNING: IAP only protects requests that go through the Cloud Load Balancer. See the IAP documentation for important security best practices: https://cloud.google.com/iap/
    WARNING: IAP has been enabled for a backend service that does not use HTTPS. Data sent from the Load Balancer to your VM will not be encrypted.
ERROR: (gcloud.beta.compute.backend-services.update) There was a problem modifying the resource:
 - Invalid value for field 'resource.iap': ''. Backend service with IAP enabled requires at least one HTTPS proxy.

任何建议表示赞赏!谢谢

1 回答

  • 1

    所以我想出一个解决方法是使用与kubernetes集群的ingress创建的相同的LB而不是使用自定义的LB.当然为了避免泄漏未经授权的访问,必须从LB中删除针对http的FE .

相关问题