Skip to content

Commit

Permalink
fixing dns validation
Browse files Browse the repository at this point in the history
  • Loading branch information
4c74356b41 authored Nov 18, 2018
1 parent 988117c commit 0f60d60
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions docs/12-dns-addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,26 @@ kube-dns-3097350089-q64qc 3/3 Running 0 20s
Create a `busybox` deployment:

```shell
kubectl run busybox --image=busybox --command -- sleep 3600
kubectl create -f https://k8s.io/examples/admin/dns/busybox.yaml
```

List the pod created by the `busybox` deployment:

```shell
kubectl get pods -l run=busybox
kubectl get pods/busybox
```

> output
```shell
NAME READY STATUS RESTARTS AGE
busybox-2125412808-mt2vb 1/1 Running 0 15s
```

Retrieve the full name of the `busybox` pod:

```shell
POD_NAME=$(kubectl get pods -l run=busybox -o jsonpath="{.items[0].metadata.name}")
busybox 1/1 Running 0 15s
```

Execute a DNS lookup for the `kubernetes` service inside the `busybox` pod:

```shell
kubectl exec -ti $POD_NAME -- nslookup kubernetes
kubectl exec -ti busybox -- nslookup kubernetes.default
```

> output
Expand Down

0 comments on commit 0f60d60

Please sign in to comment.