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

kubernetes
2023-07-03 11:04 (1 years ago) ytyng

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

Current rating: 5
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Archive

2025
2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
2014
2013
2012
2011