Update Firewall Rules for:
IP: 130.211.0.0/22
tcp:30000-32767
Create NodePort type service:
apiVersion: v1
kind: Service
metadata:
name: yourservicenodeport
labels:
name: your-service-node-port
spec:
type: NodePort
ports:
- port: 80
nodePort: 30001
selector:
name: yourpods
Create health check.
For the nodeport which is in this case: 30001
Create an ingress service:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: youTheking-ingress-service
spec:
backend:
serviceName: yourservice
servicePort: 80
Wait for few minutes, be patient.
Change the health check on http load balancer.
a. Go to the Load Balancing on Networking Tab.
b. Click Advance menu.
c. Go Backend Services and Edit.
d. Update health check option and use the one created for nodeport service.
Repeat step 5 for instance group to be recognized health.
SSL is needed, go back to the load balancer, edit, click Frontend Configuration, then add https with cert.
You are ready to roll.
我不确定我完全理解你的问题,但我会尝试回答它。
使用由受信任的CA签名的证书公开您的服务有两个选项:
继续使用真实证书进行当前操作。您可能需要将证书放入一个密钥中,并将nginx配置指向该密钥以加载证书。
使用Google L7负载均衡器替换nginx。您可以将证书上传到Google,配置L7负载均衡器以终止HTTPS并将流量转发到后端。
nodePort
(在此情况下为30001),路径/
,无需进行操作。 - Michal Foksa