Created
August 30, 2022 14:25
-
-
Save chrisedrego/c2e6f79a76f06b99e88f9f470bc77c53 to your computer and use it in GitHub Desktop.
External DNS addons cloudflare ingress setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: external-dns | |
namespace: default | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: external-dns | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- services | |
- endpoints | |
- pods | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- extensions | |
- networking.k8s.io | |
resources: | |
- ingresses | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- extensions | |
resources: | |
- ingresses | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
verbs: | |
- list | |
- watch | |
- apiGroups: | |
- contour.heptio.com | |
resources: | |
- ingressroutes | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- projectcontour.io | |
resources: | |
- httpproxies | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- "" | |
resources: | |
- endpoints | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- networking.k8s.io | |
resources: | |
- ingresses | |
verbs: | |
- get | |
- watch | |
- list | |
- apiGroups: | |
- "" | |
- extensions | |
- apps | |
- networking.k8s.io | |
- networking.istio.io | |
- httpproxies | |
- extensionservices | |
- tlscertificatedelegations | |
resources: | |
- '*' | |
verbs: | |
- '*' | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: external-dns | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: external-dns | |
subjects: | |
- kind: ServiceAccount | |
name: external-dns | |
namespace: default | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: external-dns | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: external-dns | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: external-dns | |
spec: | |
containers: | |
- args: | |
- --source=ingress | |
- --domain-filter=<CLOUDFLARE_DOMAIN_NAME> | |
- --zone-id-filter=<CLOUDFLARE_ZONE_ID> | |
- --provider=cloudflare | |
- --policy=sync | |
env: | |
- name: CF_API_TOKEN | |
value: <PASTE_CLOUDFLARE_API_TOKEN> | |
image: k8s.gcr.io/external-dns/external-dns:v0.7.6 | |
imagePullPolicy: IfNotPresent | |
name: external-dns | |
serviceAccount: external-dns | |
serviceAccountName: external-dns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment