How to build a static site with Google Cloud Storage (Load Balancer, CDN, SSL)

This article describes how to build a static site with Google Cloud Storage with Load Balancer and CDN, SSL, DNS etc.

🐞 Prerequisite requirements

It is assumed that the following requirements will be met:

  • Host your images and HTML, etc in Google Cloud Storage
  • Deliver images, etc. using HTTPS URL
  • Subscribe to your specific domain

🐹 What to do

  • A. Setting up Google Cloud Storage
  • B. Configuring Google Cloud Load Balancer

😎 A. Configuring Google Cloud Storage

(1) Make your domain proprietary on Google Search Console

Please refer to the following page to check the ownership of the domain “" on Google Search Console.

This can be confirmed by setting the TXT specified in the DNS.

(2) Creating a bucket on the Google Cloud Storage screen

Create a bucket named “".

Do not put _ in the domain name because it will cause an error later.

(3) Set permission to view Storage Objects for allUsers.

Add a public status to the bucket “" that I made earlier by referring to the following page.

(4) Set to CNAME in DNS

Set in the CNAME of “" on DNS.

🗽 B. Configuring the Google Cloud Load Balancer

(1) Create a Load Balancer with a bucket as a backend

Create Load Balancing with a bucket as the backend.
Points to note are as follows.

  • Do not use ephemerals for IP addresses. Set a fixed IP.
  • Allow CDNs on demand
  • The network will be at a premium.
  • There is an option that Google automatically creates an SSL certificate in the HTTPS setting, so I use it.

(2) Configure Load Balancer’s IP in DNS

Set the IP of the Load Balancer in the A Type of “" on the DNS.

(3) Waiting for DNS penetration

After 5-10 minutes of waiting for DNS penetration, you will get a green mark on your SSL.
Then, try to make a communication check.

🎃 References

🖥 Recommended VPS Service

VULTR provides high performance cloud compute environment for you. Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour). In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!