How to deploy NextJS app to Kubernetes Cluster in GCP with Custom Domain?
39 mins read
Founder and Engineer
NextJS is a popular framework to write react web applications. It has amazing features like Static Site Generation (SSG) and Server Side Rendering to make your web applications extremely fast and gives a boost to your SEO. It comes correctly configured with all the bells and whistles needed to make your react application production-ready.
But deploying an app to cloud environment requires quite a lot of configuration and learning new things. This tutorial guides you on how you can deploy NextJS application to a Kubernetes Cluster on Google Cloud Platform and then point your custom domain name to it.
Domain Name In the last stage, we will pointing your custom domain name to your NextJS application hosted on Google Cloud Platform. You can buy domain names from various sites like NameCheap, Or Domain.Google.
Google Cloud Account You also need to have account created on Google Cloud Console with billing account setup. If you don't have one, you can create here.
Running on Google Cloud may incur charges. Please make sure you follow instructions in last step to clean up your cluster after you are done.
What you need?
Before we begin, we need below dependencies installed on your machine -