From ebe43fd5ca5eaf75d8ac205b80af91a580001d16 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 9 Jun 2015 18:52:52 -0700 Subject: [PATCH] Add instructions for validating the DNS server. --- cluster/addons/dns/README.md | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/cluster/addons/dns/README.md b/cluster/addons/dns/README.md index 9bd47d0419b..f7588545f13 100644 --- a/cluster/addons/dns/README.md +++ b/cluster/addons/dns/README.md @@ -95,6 +95,68 @@ Salt. You will need to replace the `{{ }}` blocks with your own values for the config variables mentioned above. Other than the templating, these are normal kubernetes objects, and can be instantiated with `kubectl create`. +## How do I test if it is working? +First deploy DNS as described above. + +### 1 Create a simple Pod to use as a test environment. + +Create a file named busybox.yaml with the +following contents: + +```yaml +apiVersion: v1beta3 +kind: Pod +metadata: + name: busybox + namespace: default +spec: + containers: + - image: busybox + command: + - sleep + - "3600" + imagePullPolicy: IfNotPresent + name: busybox + restartPolicy: Always +``` + +Then create a pod using this file: + +``` +kubectl create -f busybox.yaml +``` + +### 2 Wait for this pod to go into the running state. + +You can get its status with: +``` +kubectl get pods busybox +``` + +You should see: +``` +NAME READY REASON RESTARTS AGE +busybox 1/1 Running 0 +``` + +### 3 Validate DNS works +Once that pod is running, you can exec nslookup in that environment: +``` +kubectl exec busybox -- nslookup kubernetes +``` + +You should see something like: +``` +Server: 10.0.0.10 +Address 1: 10.0.0.10 + +Name: kubernetes +Address 1: 10.0.0.1 +``` + +If you see that, DNS is working correctly. + + ## How does it work? SkyDNS depends on etcd for what to serve, but it doesn't really need all of what etcd offers (at least not in the way we use it). For simplicty, we run