Purchase a domain from Cloudflare beforehand and follow the guide to configure it.


Verify Nginx Ingress Controller Hostname

To create a record in Cloudflare’s nameserver, check the IP of the Nginx Ingress Controller.

kubectl get svc \
      -n ingress-nginx \
      ingress-nginx-controller \
      -o jsonpath='{.status.loadBalancer.ingress[0].ip}' \
  | xargs -I{} echo "{}"

Create a Cloudflare Record

Navigate to DNS > Records page, click Add record and enter the values as shown below, then click Save.

  • Record Name: *
  • Record Type: A
  • Value: The retrieved Nginx Ingress Controller IP
  • Proxy Status: Disabled

You can verify that the record has been applied correctly with the following command:

dig "<domain registered as a record>"