---
slug: "microk8s-re-install-dns-plugin"
title: "I reinstalled the DNS plugin because name resolution stopped working in Kubernetes (Microk8s)"
description: "When `docker run -it` over an `ssh` connection errors `the input device is not a TTY`, drop `-t` or invoke ssh with `-t` to allocate a TTY."
url: "https://www.ytyng.com/en/blog/microk8s-re-install-dns-plugin"
publish_date: "2023-07-03T02:04:10Z"
created: "2023-07-03T02:04:10Z"
updated: "2026-05-11T13:21:35.077Z"
categories: ["kubernetes"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20250705/cffc6155a1744533bbd35bb8ea4b934b.png.webp?width=768"
has_video: true
has_music: true
video_urls: ["https://media.ytyng.net/ytyng-blog/286/featured-video-1.mp4", "https://media.ytyng.net/ytyng-blog/286/featured-video-2.mp4", "https://media.ytyng.net/ytyng-blog/286/featured-video-3.mp4"]
music_urls: ["https://media.ytyng.net/ytyng-blog/286/featured-music-286-3.mp3", "https://media.ytyng.net/ytyng-blog/286/featured-music-286-4.mp3"]
lang: "en"
---

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

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.

```shell
$ microk8s disable dns
$ microk8s enable dns:1.1.1.1
```

Supplementary: Debugging DNS in Kubernetes
[Debugging DNS Resolution | Kubernetes](https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/)
