Skip to content

Latest commit

 

History

History

README.md

Cloudflare


Prerequisites

  1. Create a Cloudflare account
  2. Go to My Profile > API Tokens and create an API token with the following permissions:
    • Zone - Zone: Read
    • Zone - DNS: Edit

1. Create Secret

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-manager

2. Create ClusterIssuer

The 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.yaml

3. Create Certificate and Ingress

Create the remaining resources in your application namespace:

kubectl apply -f certificate.yaml -n <application-namespace>
kubectl apply -f ingress.yaml -n <application-namespace>

Reference