Skip to content

Instantly share code, notes, and snippets.

@andrewrynhard
Created April 20, 2024 00:34
Show Gist options
  • Save andrewrynhard/e18235367e15d67dcacc7afb00f84eee to your computer and use it in GitHub Desktop.
Save andrewrynhard/e18235367e15d67dcacc7afb00f84eee to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ServiceAccount
metadata:
name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups:
- ""
resources:
- endpoints
- pods
- services
verbs:
- get
- watch
- list
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- watch
- list
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- watch
- list
- apiGroups:
- ""
resources:
- nodes
verbs:
- watch
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
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
spec:
selector:
matchLabels:
app: external-dns
strategy:
type: Recreate
template:
metadata:
labels:
app: external-dns
spec:
containers:
- args:
- --source=service
- --source=ingress
- --registry=txt
image: registry.k8s.io/external-dns/external-dns:v0.14.0
name: external-dns
serviceAccountName: external-dns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment