sslgoogle-cloud-platformgoogle-compute-enginecertbotgcp-load-balancer

how to have multiple certificates for a loadbalancer?


Currently, my infrastructure consists of a Compute Engine with an Apache2 server and a PHP website. In this PHP site, it's possible to have multiple users, and each user can have a customized domain and a specific page.

I configured a Load Balancer, defining the HTTPS protocol, and pointed it to my VM. In the certificate section, I created a new certificate (client-certificates) provided by Cloud Load Balancing and added all the desired domains to it: client1.com, client2.com, client3.com.

So far, everything is working perfectly. However, the issue arises when a new client wants to have a certificate for their own domain, for example, client4.com. The steps I have to take are as follows:

  1. Delete the existing client certificates since they cannot be edited.
  2. Create a new certificate named client-certificates-v2 and add the new domain to it, resulting in: client1.com, client2.com, client3.com, client4.com.

However, when I delete the old certificate, all other clients with domains immediately lose their secure connection, and it takes some time for the new certificate to propagate. Based on my experience, this can take about 30 minutes.

Is there another way to do this without affecting clients who already have certificates? I'm new to this area, and I may be missing some steps. I'm open to ideas, criticisms, and links to understand what I need to do and better comprehend this process.


Solution

  • You do not need to delete the current certificate. Create a new certificate and add that to the certificate list. See this document.

    The maximum number of Google-managed certificates is 100. Each forwarding rule can have 1-14 additional certificates. See this document for more details on quotas.