Jinja HTTPS负载平衡器的SSL问题-Google Cloud [英] SSL issues with jinja HTTPS load balancer - Google Cloud

本文介绍了Jinja HTTPS负载平衡器的SSL问题-Google Cloud的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经能够将此负载平衡器部署为HTTP负载平衡器,并且现在正尝试将其部署为HTTPS负载平衡器.我正在通过Google Cloud上的.JUNJA和.YAML进行尝试.

I have been able to deploy this load balancer as a HTTP load balancer, and am now trying to deploy this as a HTTPS load balancer. I am attempting this with .JUNJA and .YAML on Google Cloud.

我不断收到错误消息:Invalid value for field 'resource.sslCertificates[0]': 'www.example.com'. The\\ URL is malformed.

I keep getting the error: Invalid value for field 'resource.sslCertificates[0]': 'www.example.com'. The\\ URL is malformed.

resources:
  - name: web-lb-hc #Create a health check for the backend
    type: compute.v1.httpsHealthCheck
    properties:
      port: 443
      requestPath: /

  - name: web-url-map #Required to map url to backend
    type: compute.v1.urlMap
    properties:
      defaultService: $(ref.backend.selfLink)

  - name: backend
    type: compute.v1.backendService #Deployment of backend for VM's 
    properties:
      port: 443
      portName: https
      protocol: HTTPS #Defeined HTTP port for communication with backends
      backends:
      - name: backend
        balancingMode: UTILIZATION
        capacityScaler: 1.0
        group: $(ref.web-ins-group.selfLink)
      maxUtilization: 0.8
      connectionDraining:
        drainingTimeoutSec: 300
      healthChecks: 
      - $(ref.web-lb-hc.selfLink)

  - name: web-http-proxy
    type: compute.v1.targetHttpsProxy
    properties:
      urlMap: $(ref.web-url-map.selfLink)
      sslCertificates: ["www.example.com"]
  - name: web-ipaddress
    type: compute.v1.globalAddress

  - name: web-http-forwardingrule #Creation of forwarding rule 
    type: compute.v1.globalForwardingRule
    properties:
      target: $(ref.web-http-proxy.selfLink)
      IPAddress: $(ref.web-ipaddress.address)
      IPProtocol: TCP #Chosen protocol
      portRange: 443-443

对此有任何帮助!

推荐答案

sslCertificates是一组网址.

sslCertificates is an array of urls.

要确定SSL证书的网址,请按照以下步骤操作.

To determine the url for an SSL certificate follow these steps.

获取SSL证书列表:

gcloud compute ssl-certificates list

获取SSL证书的详细信息:

Get the details for the SSL certificate:

gcloud compute ssl-certificates describe NAME

在底部附近的返回数据中查找selfLink.这是您要使用的值.该值将如下所示:

In the returned data near the bottom look for selfLink. This is the value you want to use. This value will look like this:

https://www.googleapis.com/compute/v1/projects/development/global/sslCertificates/production-lb

这篇关于Jinja HTTPS负载平衡器的SSL问题-Google Cloud的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆