Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup Letsencrypt for Google Cloud Compute Engine load balancer?

I've setup my Google Cloud Project to use a load balancer in combination with auto scaling instance templates. Currently the instance group only has one instance.

My domain name successfully refers to the load balancers IP. Till these steps everything is working correctly.

Now I want to setup SSL for this project. I would like to do this with the Letsencrypt service, however I'm having no success when trying to set this up.

In the Google Cloud Engine load balancer window there is an option to setup an earlier created certificate with Google Cloud shell to the load balancer frontend. Unfortunately I can only create a .csr and .key file with the Google Cloud Shell. Furthermore, I can create an unsafe ssl certificate and get the .cert file from it, but I would like to create a safe SSL cert file using letsencrypt. The Letsencrypt services requires direct access to the domain from to command line interface the commando was executed on, this is probably the reason why I’m getting an error indicating the domain name cannot be retrieved.

I’m looking for a way to install the Letsencrypt certificate on the loadbalancer using Google Cloud. Is there a way how I can manually create a .cert file with letsencrypt instead of installing this directly? If not is there another way or service to create a .cert file from a .csr and .key file?

like image 734
Lennard Deurman Avatar asked Nov 16 '17 19:11

Lennard Deurman


People also ask

How do I add an SSL certificate to Google cloud?

Go to the Certificates tab in the Google Cloud console. Click Create SSL certificate. Enter a name and an optional description for the certificate. Select Create Google-managed certificate.


1 Answers

You can use sslforfree.com, which calls LetsEncrypt for you and gives you the keys for downloading. It can also remind you to renew your certs. (There's currently no way to auto-renew certs in Google LB)

like image 138
danqing Avatar answered Sep 22 '22 05:09

danqing