Now we will provision our DNS server, which will be provided by Core DNS, an open source DNS server based on plugins. Let's set this up using the following command:
johndoe@management-vm$ kubectl create -f https://raw.githubusercontent.com/dsalamancaMS/CoreDNSforKube/master/coredns.yaml
Check the DNS pods with the following command:
johndoe@management-vm$ kubectl get pods -n kube-system
With the DNS server pods created, we have successfully finished the installation of our Kubernetes cluster. If you want, you can create the following deployment to test the cluster one more time:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
Now that we have seen the steps needed to create a cluster from scratch, I want to talk a little bit about managed Kubernetes solutions.