Kubernetes 1.3 HA Walkthrough – SkyDNS

Table of Contents

You can find all of the config files on the GitHub page.

Overview

Kubernetes uses a DNS server based off of SkyDNS to . You can read more about it here.

You probably want to perform the actions below on the same machine where you installed kubectl.

Create the SkyDNS Kubernetes service

Download the service definition file

curl -O https://raw.githubusercontent.com/kelseyhightower/kubernetes-the-hard-way/master/skydns-svc.yaml

Edit skydns-svc.yaml and change clusterIP to 172.16.0.10 or anything else that is in your etcd IP pool. Mine is 172.16.0.0/16. I believe this IP needs to be in your certificate as a SAN entry. Before I did this the SkyDNS containers would fail and the Kubernetes controller node reported certificate errors from the skydns containers.

skydns-svc.yaml

apiVersion: v1
 kind: Service
 metadata:
   name: kube-dns
   namespace: kube-system
   labels:
     k8s-app: kube-dns
     kubernetes.io/cluster-service: "true"
     kubernetes.io/name: "KubeDNS"
 spec:
   selector:
     k8s-app: kube-dns
 clusterIP:172.16.0.10
 ports:
   - name: dns
     port: 53
     protocol: UDP
   - name: dns-tcp
     port: 53
     protocol: TCP

Create the service

kubectl create -f skydns-svc.yaml

Which should result in:

service “kube-dns” created

Create the skydns deployment

kubectl create -f https://raw.githubusercontent.com/kelseyhightower/kubernetes-the-hard-way/master/deployments/kubedns.yaml

deployment “kube-dns-v19” created

kubectl –namespace=kube-system get pods

NAME                           READY     STATUS    RESTARTS   AGE
kube-dns-v19-965658604-p2js8   3/3       Running   0          22h
kube-dns-v19-965658604-ru5ac   3/3       Running   0          22h

 

 

 

 

 

 

 

 

 

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s