- Create a Cloudflare account
- Go to My Profile > API Tokens and create an API token with the following permissions:
- Zone - Zone: Read
- Zone - DNS: Edit
Create a Kubernetes Secret with your Cloudflare API token:
# Option 1: Apply the manifest (namespace is already defined in the YAML)
kubectl apply -f cloudflare-api-token-secret.yaml
# Option 2: Create via kubectl command
kubectl create secret generic cloudflare-api-token-secret \
--from-literal=api-token=YOUR_CLOUDFLARE_API_TOKEN \
--namespace=cert-managerThe API token secret is created in the cert-manager namespace. The ClusterIssuer is a cluster-scoped resource and does not belong to any namespace.
kubectl apply -f clusterissuer.yamlCreate the remaining resources in your application namespace:
kubectl apply -f certificate.yaml -n <application-namespace>
kubectl apply -f ingress.yaml -n <application-namespace>