Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/estafette/estafette-cloudflare-dns
Kubernetes controller to set and update dns records in Cloudflare for annotated services and ingresses
https://github.com/estafette/estafette-cloudflare-dns
cloudflare dns golang kubernetes kubernetes-service
Last synced: about 1 month ago
JSON representation
Kubernetes controller to set and update dns records in Cloudflare for annotated services and ingresses
- Host: GitHub
- URL: https://github.com/estafette/estafette-cloudflare-dns
- Owner: estafette
- License: mit
- Created: 2017-03-08T13:29:07.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T01:22:31.000Z (almost 2 years ago)
- Last Synced: 2024-07-31T14:08:25.318Z (4 months ago)
- Topics: cloudflare, dns, golang, kubernetes, kubernetes-service
- Language: Go
- Homepage: https://helm.estafette.io
- Size: 1.21 MB
- Stars: 38
- Watchers: 15
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kubernetes - Estafette Cloudflare DNS - This small Kubernetes application configures dns and proxy settings in Cloudflare for any public service with the correct annotations. (Performance)
README
# estafette-cloudflare-dns
This small Kubernetes application configures dns and proxy settings in Cloudflare for any public service with the correct annotations
[![License](https://img.shields.io/github/license/estafette/estafette-cloudflare-dns.svg)](https://github.com/estafette/estafette-cloudflare-dns/blob/master/LICENSE)
## Why?
In order not to have to set dns records manually or from deployment scripts this application decouples that responsibility and moves it into the Kubernetes cluster itself.
## Installation
Prepare using Helm:
```
brew install kubernetes-helm
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --wait
```Then install or upgrade with Helm:
```
helm repo add estafette https://helm.estafette.io
helm upgrade --install estafette-cloudflare-dns --namespace estafette estafette/estafette-cloudflare-dns
```## Usage
Once it's running put the following annotations on a service of type LoadBalancer and deploy. The `estafette-cloudflare-dns` controller will watch changes to services and process those. Once approximately every 300 seconds it also scans all services as a safety net in case an event has been missed.
```yaml
apiVersion: v1
kind: Service
metadata:
name: myapplication
namespace: mynamespace
labels:
app: myapplication
annotations:
estafette.io/cloudflare-dns: "true"
estafette.io/cloudflare-proxy: "true"
estafette.io/cloudflare-use-origin-record: "false"
estafette.io/cloudflare-origin-record-hostname: ""
estafette.io/cloudflare-hostnames: "mynamespace.mydomain.com"
spec:
type: LoadBalancer
ports:
- name: http
port: 80
targetPort: http
protocol: TCP
selector:
app: myapplication
```