Skip to content

Commit 6d67d6e

Browse files
authored
Merge pull request #4474 from rhjensen79/master
changed documentation to include more details description when using API Tokens
2 parents 23f8d40 + 5084f3e commit 6d67d6e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/tutorials/cloudflare.md

+22
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Otherwise `CF_API_KEY` and `CF_API_EMAIL` should be set to run ExternalDNS with
2323
You may provide the Cloudflare API token through a file by setting the
2424
`CF_API_TOKEN="file:/path/to/token"`.
2525

26+
Note. The `CF_API_KEY` and `CF_API_EMAIL` should not be present, if you are using a `CF_API_TOKEN`.
27+
2628
When using API Token authentication, the token should be granted Zone `Read`, DNS `Edit` privileges, and access to `All zones`.
2729

2830
If you would like to further restrict the API permissions to a specific zone (or zones), you also need to use the `--zone-id-filter` so that the underlying API requests only access the zones that you explicitly specify, as opposed to accessing all zones.
@@ -41,6 +43,12 @@ Begin by creating a Kubernetes secret to securely store your CloudFlare API key.
4143
kubectl create secret generic cloudflare-api-key --from-literal=apiKey=YOUR_API_KEY --from-literal=email=YOUR_CLOUDFLARE_EMAIL
4244
```
4345

46+
And for API Token it should look like :
47+
48+
```shell
49+
kubectl create secret generic cloudflare-api-key --from-literal=apiKey=YOUR_API_TOKEN
50+
```
51+
4452
Ensure to replace YOUR_API_KEY with your actual CloudFlare API key and YOUR_CLOUDFLARE_EMAIL with the email associated with your CloudFlare account.
4553

4654
Then apply one of the following manifests file to deploy ExternalDNS.
@@ -65,6 +73,20 @@ env:
6573
key: email
6674
```
6775

76+
Use this in your values.yaml, if you are using API Token:
77+
78+
```shell
79+
provider:
80+
name: cloudflare
81+
env:
82+
- name: CF_API_TOKEN
83+
valueFrom:
84+
secretKeyRef:
85+
name: cloudflare-api-key
86+
key: apiKey
87+
```
88+
89+
6890
Finally, install the ExternalDNS chart with Helm using the configuration specified in your values.yaml file:
6991

7092
```shell

0 commit comments

Comments
 (0)