Installing, Configuring 3 Node Kubernetes(master) Cluster on CentOS 7.5 – Adding / Configuring CoreDNS – Part 5

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Installing, configuring 3 node Kubernetes(master) cluster on CentOS 7.5 – Adding CoreDNS as part of the Kubernetes cluster

In Part 4 I described how to install and configure the kubernetes manifest and kubelet service, below we are going to add the newly addition CoreDNS to your Kubernetes cluster.

This is Part 5 – Adding CoreDNS as part of the Kubernetes cluster.

Adding configuring CoreDNS

Lets begin by downloading the latest CoreDNS version.

Note: to get the latest release click here.

After extracting the gz file, you will find a deployment directory.
In the deployment we are mostly interested in the kubernetes
in the kubernetes directory you will find a deployment script and a yaml file.

You can use the deployment script somthink like the the below, or modify the yaml file your self and just run kubectl to deploy the config.

Below is the coredns.yaml I have successfully used.

Just run the below to apply and configure, this will launch 2 instances of CoreDNS.

Below is the kubectl output of my cluster after adding CoreDNS.

To test DNS working you can do something like the below.
To see full dns logs run the below.
Note: logs are turned on for everything, you might wont to change that once configured.

Next, lets start a pod called dnstools from infoblox, you do so by running the below.
Note: Infoblox has create a very good small image ready with all dns testing tools you might need.

Congratulations, you now have a working Kubernetes CoreDNS configured.

CoreDNS has great list of documents at the CoreDNS website, as well as a list available Plugins to extend feature functionality.

In Part 6 will continue Adding / Configuring Kubernetes worker nodes (coming soon).

You might also like – Other related articles to Docker and Kubernetes / micro-service.

Like what you’re reading? please provide feedback, any feedback is appreciated.

Leave a Reply

Notify of