Cloudflare DDNS in K8S cluster

Hi,

I'm trying to set up a DDNS in my kubernetes cluster. I usually to run it in an old docker cluster. However, I do not find how to use the same image in kubernetes...
Is anyone able to run the image below or any other? All I need is accessing my internal lab via cloudflare dns service. I do not have fixed IP at home.
I have this YAML file. But I assume it may be not correct.

bruno@K8S-Master:~/k8s$ cat ddns_v2.yaml
apiVersion: v1
kind: Pod
metadata:
name: ddns
labels:
purpose: ddns
spec:
containers:

  • name: ddns
    image: oznu/cloudflare-ddns
    env:
    • name: API_KEY
      value: MY_KEY
    • name: ZONE
      value: MY_DOMAIN
    • name: SUBDOMAIN
      value: MY_SUBDOMAIN

I always get the same output. The key is correct.

bruno@K8S-Master:~/k8s$ kubectl logs ddns
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 30-Cloudflare-setup: executing…
curl: (6) Could not resolve host: api.cloudflare.com

ERROR: Invalid Cloudflare Credentials - 000

Make sure the API_KEY is correct. You can
get your scoped Cloudflare API Token here:
https://dash.cloudflare.com/profile/api-tokens


[cont-init.d] 30-Cloudflare-setup: exited 1.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 50-remove-record: executing…
[cont-finish.d] 50-remove-record: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

An API Key requires an email address. It does mention API Token, so maybe you can try one of those.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.