I reinstalled the DNS plugin because name resolution stopped working in Kubernetes (Microk8s)

kubernetes
2023-07-03 02:04 (3 years ago)
Cluster Hiccups
Play a song themed on this article

While using MicroK8s, external communication from the Pods stopped working.

There was code that communicated externally via SSH, but it resulted in the following error:

ssh: Could not resolve hostname server.example.com: Try again

Other Pods also experienced issues with DNS resolution, either failing completely or being very slow.

Reinstalling the DNS plugin (reconfiguring the DNS server) in MicroK8s resolved the issue.

$ microk8s disable dns
$ microk8s enable dns:1.1.1.1

Supplementary: Debugging DNS in Kubernetes Debugging DNS Resolution | Kubernetes

Categories

Archive