Created
April 11, 2018 07:03
-
-
Save ahelland/ed2bc314c5e36c7743fef34dfc99fb37 to your computer and use it in GitHub Desktop.
Kubernetes YAML definition for ExternalDNS referred to in "Building Microservices with AKS and VSTS — Part 3"
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 | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRole | |
metadata: | |
name: external-dns | |
rules: | |
- apiGroups: [""] | |
resources: ["services"] | |
verbs: ["get","watch","list"] | |
- apiGroups: ["extensions"] | |
resources: ["ingresses"] | |
verbs: ["get","watch","list"] | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: external-dns | |
spec: | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: external-dns | |
spec: | |
serviceAccountName: external-dns | |
containers: | |
- name: external-dns | |
image: registry.opensource.zalan.do/teapot/external-dns:v0.4.8 | |
args: | |
- --source=service | |
- --domain-filter=example.com # (optional) limit to only example.com domains; change to match the zone created above. | |
- --provider=azure | |
- --azure-resource-group=externaldns # (optional) use the DNS zones from the tutorial's resource group | |
volumeMounts: | |
- name: azure-config-file | |
mountPath: /etc/kubernetes | |
readOnly: true | |
volumes: | |
- name: azure-config-file | |
secret: | |
secretName: azure-config-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment