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

kubernetes
2023-07-03 02:04 (2 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

Please rate this article
Current rating: 5.0 (2)
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive