0
  1. Imagine I have a pod manifest where its image is in a private registry. How will Kubelet pull the image? Is it using /etc/resolv.conf or the DNS settings defined in CoreDNS in Kubernetes?
  2. Does the configuration of CNI affect DNS resolution in any sense?

2 Answers 2

0
  1. Kubelet uses the DNS settings defined in CoreDNS, not the /etc/resolv.conf file on the node. CoreDNS is the DNS server for the Kubernetes cluster, and it handles DNS resolution for all pods and services within the cluster.
  2. Yes, CNI plugin is responsible for setting up the network interfaces in pods and configuring the network namespace.
0

Before a Pod is instantiated, Kubelet needs to pull the container image, and for this, it relies on the host's DNS settings, typically found in /etc/resolv.conf. Kubelet does not use the DNS settings defined in CoreDNS within the Kubernetes cluster, as CoreDNS handles DNS resolution for services within running Pods, not for the Kubelet's image-pulling process.

The configuration of the Container Network Interface (CNI) doesn't affect DNS resolution for Kubelet's image pulls. The CNI is responsible for Pod networking after the Pod is instantiated, not before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.