Commit 20ea3510 authored by Alex Robinson's avatar Alex Robinson

Merge pull request #7619 from a-robinson/dns

Convert the skydns rc to use v1beta3 and add a health check to it
parents ba438a80 9ea76dc0
apiVersion: v1beta3
kind: ReplicationController kind: ReplicationController
apiVersion: v1beta1 metadata:
id: kube-dns labels:
namespace: default k8s-app: kube-dns
labels: kubernetes.io/cluster-service: "true"
k8s-app: kube-dns name: kube-dns
kubernetes.io/cluster-service: "true" namespace: default
desiredState: spec:
replicas: {{ pillar['dns_replicas'] }} replicas: {{ pillar['dns_replicas'] }}
replicaSelector: selector:
k8s-app: kube-dns k8s-app: kube-dns
podTemplate: template:
labels: metadata:
name: kube-dns labels:
k8s-app: kube-dns k8s-app: kube-dns
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"
desiredState: name: kube-dns
manifest: spec:
version: v1beta2 containers:
id: kube-dns - name: etcd
dnsPolicy: "Default" # Don't use cluster DNS. image: gcr.io/google_containers/etcd:2.0.9
containers: command:
- name: etcd - /usr/local/bin/etcd
image: gcr.io/google_containers/etcd:2.0.9 - --addr
command: [ - 127.0.0.1:4001
"/usr/local/bin/etcd", - --bind-addr
"--addr", - 127.0.0.1:4001
"127.0.0.1:4001", - -initial-cluster-token=skydns-etcd
"--bind-addr", - name: kube2sky
"127.0.0.1:4001", image: gcr.io/google_containers/kube2sky:1.4
"-initial-cluster-token=skydns-etcd", args:
] # entrypoint = "/kube2sky"
- name: kube2sky - -domain={{ pillar['dns_domain'] }}
image: gcr.io/google_containers/kube2sky:1.4 - -kubecfg_file=/etc/dns_token/kubeconfig
volumeMounts: volumeMounts:
- name: dns-token - mountPath: /etc/dns_token
mountPath: /etc/dns_token name: dns-token
readOnly: true readOnly: true
command: [ - name: skydns
# entrypoint = "/kube2sky", image: gcr.io/google_containers/skydns:2015-03-11-001
"-domain={{ pillar['dns_domain'] }}", args:
"-kubecfg_file=/etc/dns_token/kubeconfig", # entrypoint = "/skydns"
] - -machines=http://localhost:4001
- name: skydns - -addr=0.0.0.0:53
image: gcr.io/google_containers/skydns:2015-03-11-001 - -domain={{ pillar['dns_domain'] }}.
command: [ ports:
# entrypoint = "/skydns", - containerPort: 53
"-machines=http://localhost:4001", name: dns
"-addr=0.0.0.0:53", protocol: UDP
"-domain={{ pillar['dns_domain'] }}.", livenessProbe:
] exec:
ports: command:
- name: dns - "/bin/sh"
containerPort: 53 - "-c"
protocol: UDP # The health check succeeds by virtue of not hanging. It'd be nice
volumes: # to also check local services are known, but if that's broken then
- name: dns-token # etcd or kube2sky has to be restarted, not skydns.
source: - "nslookup foobar 127.0.0.1 &> /dev/null; echo ok"
secret: initialDelaySeconds: 30
target: timeoutSeconds: 5
kind: Secret dnsPolicy: Default # Don't use cluster DNS.
namespace: default volumes:
name: token-system-dns - name: dns-token
secret:
secretName: token-system-dns
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment