Created
April 29, 2019 09:39
-
-
Save saidsef/44c8210058e625d111e9e1b3b05dc6f0 to your computer and use it in GitHub Desktop.
Kubernetes External-DNS
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: Namespace | |
| metadata: | |
| name: dns | |
| labels: | |
| name: dns | |
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: external-dns | |
| namespace: dns | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 | |
| kind: ClusterRole | |
| metadata: | |
| name: external-dns | |
| namespace: dns | |
| rules: | |
| - apiGroups: [""] | |
| resources: ["services"] | |
| verbs: ["get","watch","list"] | |
| - apiGroups: [""] | |
| resources: ["pods"] | |
| verbs: ["get","watch","list"] | |
| - apiGroups: ["extensions"] | |
| resources: ["ingresses"] | |
| verbs: ["get","watch","list"] | |
| - apiGroups: [""] | |
| resources: ["nodes"] | |
| verbs: ["list"] | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: external-dns-viewer | |
| namespace: dns | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: ClusterRole | |
| name: external-dns | |
| subjects: | |
| - kind: ServiceAccount | |
| name: external-dns | |
| namespace: dns | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: external-dns | |
| namespace: dns | |
| labels: | |
| kubernetes.io/cluster-service: "true" | |
| spec: | |
| strategy: | |
| type: Recreate | |
| selector: | |
| matchLabels: | |
| app: external-dns | |
| template: | |
| metadata: | |
| labels: | |
| app: external-dns | |
| annotations: | |
| scheduler.alpha.kubernetes.io/critical-pod: "" | |
| scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' | |
| spec: | |
| serviceAccountName: external-dns | |
| containers: | |
| - name: external-dns | |
| image: registry.opensource.zalan.do/teapot/external-dns:latest | |
| args: | |
| - --source=service | |
| - --source=ingress | |
| - --provider=aws | |
| - --policy=upsert-only # would prevent ExternalDNS from deleting any records, omit to enable full synchronization | |
| - --aws-zone-type=public # only look at public hosted zones (valid values are public, private or no value for both) | |
| - --registry=txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment