Skip to content

Cloudflare

Cloudflare provider requires apiToken token field in string format.

DNS example

providers:
  cloudflare:
    - name: cloudflare-1
      apiToken: token

Create Cloudflare credentials

You can create Cloudflare API token by following this guide. The required permissions for the zone you want to use are:

Zone:Read
DNS:Read
DNS:Edit

DNS setup

If you wish to use Cloudflare as your DNS provider where Claudie creates DNS records pointing to Claudie managed clusters, you will need to create a public DNS zone by following this guide.

Cloudflare is not my domain registrar

If you haven't acquired a domain via Cloudflare and wish to utilize Cloudflare for hosting your zone, you can refer to this guide on Cloudflare nameservers. However, if you prefer not to use the entire domain, an alternative option is to delegate a subdomain to Cloudflare.

Input manifest examples

Load balancing example

Showcase example

To make this example functional, you need to specify control plane and node pools. This current showcase will produce an error if used as is.

name: CloudflareExampleManifest
providers:
  cloudflare:
    - name: cloudflare-1 # Name of this provider instance.
      apiToken: kslISA878a6etYAfXYcg5iYyrFGNlCxc # API token of this provider instance.
    - name: aws-1
      accessKey: SLDUTKSHFDMSJKDIALASSD
      secretKey: iuhbOIJN+oin/olikDSadsnoiSVSDsacoinOUSHD

nodePools: 
  dynamic:
    - name: loadbalancer
      providerSpec:
        name: aws-1
        region: eu-central-1
        zone: eu-central-1c
      count: 2
      serverType: t3.medium
      image: ami-0965bd5ba4d59211c

kubernetes:
  clusters:
    - name: cluster
      version: v1.24.0
      network: 192.168.2.0/24
      pools:
        control: []
        compute: []

loadBalancers:
  roles:
    - name: apiserver
      protocol: tcp
      port: 6443
      targetPort: 6443
      target: k8sControlPlane

  clusters:
    - name: apiserver-lb-prod
      roles:
        - apiserver
      dns:
        dnsZone: dns-zone
        provider: cloudflare-1
        hostname: my.fancy.url
      targetedK8s: prod-cluster
      pools:
        - loadbalancer-2