Installing SSL Certificate on GCP Load Balancer

Harish Sharma
3 min readJun 12, 2021

Installing SSL on individual server is easy and hosting hosting panels like Cpanel or Plesk make it effortless.

However, If you are using Load Balancer things can be little tricky. This tutorial guides you on how you can install SSL Certificate on GCP Load Balancer.

PART — 1

(Certificate Creation)

Login to your GCP console — https://console.cloud.google.com/

1- Choose the desired project.

2- Go to Load Balancing — you can either select from left menu or search from the top search bar, enter ‘Load Balancing’ and choose Loading Balancing under Network Services.

3- On the Load Balancing screen, you will see all the Load Balancers that have been created for your project. Click on Advance Menu

Next, choose ‘Certificate’ tab. Here all your existing certificates will be listed. Click ‘Create SSL Certificate’ to add New certificate.

This opens up new page to enter new certification information —

  • Enter Name
  • Description (optional) — but i recommend adding it, as help easily identify cert
  • Upload private key (you should have it in zip download when certificate was created)
  • Open CA and Cert file in text editor separtely
  • Now Paste CA content below Cert file content.
  • Copy and Paste combined to certificate section — THIS IS IMPORTANT STEP
  • Click create

FYI — In my case i used zerossl.com to create my certificate (they offer 3 months free cert)

Voila! Now you should see under certificate, Refresh if you don’t see it. To ensure certificate is installed correctly, click on cert → ensure you see correct certificate chain — 3 level, as show below. With this you are all set to assign it to your target proxies.

PART — 2

(Create and map certificate with Target Proxy)

Now, again go to Go to load balancer (see Part 1, top of this screen)

Click on Advance menu

Go to Target Proxies. Click Create a Target Proxy and Enter the following details-

  • enter name —
  • type — https proxy
  • choose cert — you should see the certificate you just created
  • url map — select load balancer

PART — 3

(Setup Rule)

Now, again go to Go to load balancer (see Part 1, top of this screen)

Click on Advance menu

Click on forward rule (name), this opens up new screen.

Click Edit

Change target — Choose the new Target Proxy we created in PART-2

And Press SAVE. That’s it…

We All SET. Typically it can take few minutes for changes to reflect when you try to open your website/url.

--

--