SUSE Support

Here When You Need Us

Pod level DNS resolution failed after modifying the node's dns servers on /etc/resolv.conf

This document (000021861) is provided subject to the disclaimer at the end of this document.

Environment

RKE2


Situation

The newly created pods are unable to communicate with core-dns after updating the node's DNS server details in /etc/resolv.conf. The new pods fail to resolve DNS. 

Resolution

Flush the dns cache in Linux node to ensure, the system or the application stop using stale dns resolution that was cached before the changes. 

The following steps need to be executed. 

Restart the rke2-server service if it is a control plane+worker node 

systemctl restart rke2-server.service

Restart the rke2-agent service if the node is only a worker 

systemctl restart rke2-agent.service

To flush the dns cache, different commands can be used, depends on the Linux distro. 

If using nscd

service nscd restart or systemctl restart nscd 

If using dnsmaq

systemctl restart dnsmaq 

If using systemd-resolvd

systemd-resolve --flush-caches

 

 

Cause

On Linux, some dns services like systemd-resolved, nscd, dnsmaq etc. caches dns queries in memory and may not immediately pick up changes to /etc/resolv.conf unless restarted or flushed. If a dns query was previously resolved and cached, the system might continue using old IP address even after updating the /etc/resolv.conf 

Status

Top Issue

Additional Information

To flush the dns cache, different commands can be used, depends on the Linux distro, and the dns flushing many not be necessary for all the Linux distributions. 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021861
  • Creation Date: 05-Jun-2025
  • Modified Date:30-Jul-2025
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.