Hosting websites inside AKS with Cloudflare and Let’s Encrypt
In this article, I will show how we can host websites inside AKS clubbed with Cloudflare and Lets Encrypt. This has been written based on the assumption that you have already provisioned Kubernetes Cluster like AKS and a Load Balancer provisioned to redirect the traffic to websites. If you want to refer in spinning up a new Kubernetes Cluster, please refer my previous article here. So lets get started..
Pre-requisites
- AKS Cluster
- Website Hosting Domain — GoDaddy
- CDN — Cloudflare
- External SSL Certificate — Lets Encrypt
1. Finding a Domain
As a first step, we have to buy a domain from web hosting provider. I am having a GoDaddy account and bought a domain already, this will be used in the example. You may search in the site and buy a domain, so can register your website later on.
2. Cloudflare Setup
Next is to create a Cloudflare account and add an entry against the new domain that was purchased.
a. Enter your domain name

b. Click the free version, continue and wait for retrieving the DNS configurations

c. Copy the namespace servers provided by Cloudflare. This will be used in GoDaddy account, which will replace existing default name servers provided by GoDaddy

d. Go to GoDaddy DNS Management setting and replace the default nameservers with the Cloudflare servers

3. Deploying to AKS
Now we have to configure AKS cluster and deploy website. I will be deploying charts using Helm Package Manager, so it has to be installed on your local machine. After you install helm, next step is to install a NGINX ingress controller and Certmanager for Lets Encrypt certificate. The following script will help you to install the necessary components.










