question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to enable dns

See original GitHub issue

I’m on Arch. I was able to install snap and the microk8s snap ok. I can enable registry, but when I try to enable dns I get this.

❯ sudo microk8s.enable dns
Enabling DNS
Applying manifest
serviceaccount/coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created
clusterrole.rbac.authorization.k8s.io/coredns created
clusterrolebinding.rbac.authorization.k8s.io/coredns created
Restarting kubelet
systemctl: /snap/microk8s/1247/usr/lib/x86_64-linux-gnu/libp11-kit.so.0: no version information available (required by /usr/lib/systemd/libsystemd-shared-245.so)
systemctl: symbol lookup error: /usr/lib/systemd/libsystemd-shared-245.so: undefined symbol: p11_kit_uri_get_slot_info, version LIBP11_KIT_1.0
Failed to enable dns

It looks like my systemd libs are mismatched with the libp11-kit libs in the container. I have arch’s p11-kit and libp11-kit packages both installed and up to date.

Please run microk8s.inspect and attach the generated tarball to this issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:31 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
ktsakalozoscommented, May 5, 2020

The PR with the fix is merged. The snap on the edge channel should be available within the next few hours. Try it with:

sudo snap install microk8s --classic --channel=edge

The Patch should reach stable with the 1.18.3 release.

Thank you all for helping in fixing this.

6reactions
bmollercommented, May 1, 2020

OK, the problem lies here:

https://github.com/ubuntu/microk8s/blob/master/microk8s-resources/actions/common/utils.sh#L70

When microk8s is invoking sudo, it’s modifying the linker paths to only look in its container. Previously, with versions <= 1.15 the scripts just invoked sudo directly without any wrapper function or environment modification. You can see where it changed the kubelet restart at the end of this file in this commit:

https://github.com/ubuntu/microk8s/blob/36f79886a074167a0972a19cc14b134bef5a1bd8/microk8s-resources/actions/enable.dns.sh

So, the workaround is to simply perform these steps manually:

  1. Copy the microk8s DNS manifest from /var/lib/snapd/snap/microk8s/current/actions/dns.yaml to a temporary location
  2. Edit the manifest, replacing all occurrences of $ARCH with your native architecture (most likely amd64
  3. Apply the manifest with microk8s kubectl or your own kubectl binary with these args: microk8s kubectl --kubeconfig=/var/snap/microk8s/current/credentials/client.config apply -f dns.yaml
  4. Edit the kubelet arguments file located at /var/snap/microk8s/current/args/kubelet, adding these lines:
--cluster-domain=cluster.local
--cluster-dns=10.152.183.10
  1. Restart kubelet via systemd: sudo systemctl restart snap.microk8s.daemon-kubelet.service
  2. Congratulate yourself for doing microk8s’ work for it!

However, you’ll still get microk8s status reporting that DNS is not enabled. I found why, but it’s 3 AM and I’ll open a bug report after some sleep.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to enable dns · Issue #1034 · canonical/microk8s - GitHub
I'm on Arch. I was able to install snap and the microk8s snap ok. I can enable registry, but when I try to...
Read more >
How to the Fix "DNS Server Not Responding" Error - Kinsta®
Typically, DNS errors are caused by problems on the user end, whether that's with a network or internet connection, misconfigured DNS settings, ...
Read more >
How To Fix 'DNS Server Not Responding' Error On Windows 10
Follow the mentioned steps to clear the DNS cache: #1) Click on “Start” and search for Command Prompt and the following window will...
Read more >
Fix DNS errors - Chromebook Help - Google Support
If you see a DNS (Domain Name System) error, try switching to one of Google's public name servers: Make sure your Chromebook is...
Read more >
What Is DNS Failure? Common Causes And Solutions - Forbes
A DNS failure occurs when users are unable to connect to an IP address via a domain name. A message will pop up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found