kubernetes-training

Small setup, no centralized DNS server

Centralized DNS server

	# /etc/nsswitch.conf
	#
	# Example configuration of GNU Name Service Switch functionality.
	# If you have the `glibc-doc-reference' and `info' packages installed, try:
	# `info libc "Name Service Switch"' for information about this file.
	
	passwd:         files systemd
	group:          files systemd
	shadow:         files
	gshadow:        files
	
	hosts:          files mdns4_minimal [NOTFOUND=return] dns  <-- l to r order
	networks:       files
	
	protocols:      db files
	services:       db files
	ethers:         db files
	rpc:            db files
	
	netgroup:       nis

Core DNS

We are given a server dedicated as the DNS server, and a set of Ips to configure as entries in the server. There are many DNS server solutions out there, we will focus on a particular one – CoreDNS

Install

Set up

DNS in Kubernetes

Record for service

web-service is name of the service, apps is the namespace, all services are grouped together into a subdomain called svc. Finally all svc and pods are grouped together under cluster.local –> web-service.apps.svc.cluster.local

Record for pod