【发布时间】:2020-12-22 00:11:22
【问题描述】:
我创建了一个Play Web 应用程序,现在部署在GCP 上。该应用程序工作正常。我想在其中添加https 支持以保护客户端和服务器之间的通信。
我知道在GCP 中有一个创建http load balancers 的选项,但我认为它们适用于直接在VMs/Compute 实例上运行的应用程序,而不是通过GKE。
问题 1 - 我正确吗?我之所以问,是因为当我尝试配置负载均衡器时,我看不到对我当前部署的应用程序的引用。
问题 2 - 对于我在集群上使用 GKE 部署的应用程序,如何添加对 https 的支持?
我当前的应用程序是使用以下yamls 部署的。
apiVersion: apps/v1
kind: Deployment
metadata:
name: name
spec:
replicas: 2
selector:
matchLabels:
app: somename
和
apiVersion: v1
kind: Service
metadata:
name: somename-service
spec:
selector:
app: somename
ports:
- protocol: TCP
port: 9000
targetPort: 9000
type: LoadBalancer
【问题讨论】:
标签: google-cloud-platform google-kubernetes-engine gcp-load-balancer