mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Set all credentials in secrets
This commit is contained in:
parent
a7e487d413
commit
de07d9dbda
@ -37,9 +37,10 @@ Connect your `kubectl` client to the cluster you want to test ExternalDNS with.
|
||||
|
||||
Begin by creating a Kubernetes secret to securely store your CloudFlare API key. This key will enable ExternalDNS to authenticate with CloudFlare:
|
||||
```shell
|
||||
kubectl create secret generic cloudflare-api-key --from-literal=apiKey=YOUR_API_KEY
|
||||
kubectl create secret generic cloudflare-api-key --from-literal=API_KEY=YOUR_API_KEY ---from-literal=CF_API_EMAIL=YOUR_CLOUDFLARE_EMAIL
|
||||
```
|
||||
Ensure to replace YOUR_API_KEY with your actual CloudFlare API key.
|
||||
Ensure to replace YOUR_API_KEY with your actual CloudFlare API key and YOUR_CLOUDFLARE_EMAIL with the email associated with your CloudFlare account.
|
||||
|
||||
Then apply one of the following manifests file to deploy ExternalDNS.
|
||||
|
||||
### Using Helm
|
||||
@ -55,9 +56,11 @@ env:
|
||||
name: cloudflare-api-key
|
||||
key: apiKey
|
||||
- name: CF_API_EMAIL
|
||||
value: "YOUR_CLOUDFLARE_EMAIL"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: YOUR_CLOUDFLARE_EMAIL
|
||||
```
|
||||
Replace YOUR_CLOUDFLARE_EMAIL with the email associated with your CloudFlare account.
|
||||
|
||||
Finally, install the ExternalDNS chart with Helm using the configuration specified in your values.yaml file:
|
||||
```shell
|
||||
@ -94,12 +97,15 @@ spec:
|
||||
- --cloudflare-dns-records-per-page=5000 # (optional) configure how many DNS records to fetch per request
|
||||
env:
|
||||
- name: CF_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: apiKey
|
||||
- name: CF_API_EMAIL
|
||||
value: "YOUR_CLOUDFLARE_EMAIL"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: API_KEY
|
||||
- name: CF_API_EMAIL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: YOUR_CLOUDFLARE_EMAIL
|
||||
```
|
||||
|
||||
### Manifest (for clusters with RBAC enabled)
|
||||
@ -166,12 +172,15 @@ spec:
|
||||
- --cloudflare-dns-records-per-page=5000 # (optional) configure how many DNS records to fetch per request
|
||||
env:
|
||||
- name: CF_API_KEY
|
||||
valueFrom:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: apiKey
|
||||
- name: CF_API_EMAIL
|
||||
value: "YOUR_CLOUDFLARE_EMAIL"
|
||||
- name: CF_API_EMAIL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cloudflare-api-key
|
||||
key: YOUR_CLOUDFLARE_EMAIL
|
||||
```
|
||||
|
||||
## Deploying an Nginx Service
|
||||
|
Loading…
Reference in New Issue
Block a user