kubernetes-the-hard-way/docs/08-dns-addon.md

41 lines
1.0 KiB
Markdown
Raw Normal View History

2016-07-09 19:17:18 +03:00
# Deploying the Cluster DNS Add-on
2016-07-09 18:16:09 +03:00
In this lab you will deploy the DNS add-on which is required for every Kubernetes cluster. Without the DNS add-on the following things will not work:
* DNS based service discovery
* DNS lookups from containers running in pods
2016-07-09 19:17:18 +03:00
## Cluster DNS Add-on
2016-07-09 18:21:35 +03:00
### Create the `skydns` service:
2016-07-09 18:16:09 +03:00
```
kubectl create -f https://raw.githubusercontent.com/kelseyhightower/kubernetes-the-hard-way/master/skydns-svc.yaml
```
2016-07-09 18:21:35 +03:00
#### Verification
```
kubectl --namespace=kube-system get svc
```
```
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kube-dns 10.32.0.10 <none> 53/UDP,53/TCP 1m
```
### Create the `skydns` replication controller:
2016-07-09 18:16:09 +03:00
```
kubectl create -f https://raw.githubusercontent.com/kelseyhightower/kubernetes-the-hard-way/master/skydns-rc.yaml
2016-07-09 18:21:35 +03:00
```
#### Verification
```
kubectl --namespace=kube-system get pods
```
```
NAME READY STATUS RESTARTS AGE
kube-dns-v18-79maa 3/3 Running 0 41s
kube-dns-v18-bcs1f 3/3 Running 0 41s
2016-07-09 18:16:09 +03:00
```