kruise icon indicating copy to clipboard operation
kruise copied to clipboard

[BUG] kruise-daemon should use ClusterFirstWithHostNet for the DNS Policy

Open chasain opened this issue 1 year ago • 4 comments

What happened: kruise-daemon isn't able to resolve internal DNS entries, i.e. a locally host docker proxy

What you expected to happen: kruise-daemon should be able to resolve service.namespace.svc.cluster.local entries

How to reproduce it (as minimally and precisely as possible): host a docker proxy in a cluster and use an ImagePull job to try to pull images through it, DNS lookup will fail

Anything else we need to know?: This is caused by not defining a dnsPolicy and the default ClusterFirst getting assigned, but since it's created with hostNetwork: true this has the effect of setting DNS to the node's DNS. It has to be changed manually to use the Cluster DNS, more info at https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy

Environment:

  • Kruise version: 1.5.0
  • Kubernetes version (use kubectl version): 1.23.17+k3s1
  • Install details (e.g. helm install args):
  manager:
    replicas: 1
  installation:
    createNamespace: false
  daemon:
    socketLocation: /var/run/k3s
  • Others:

chasain avatar Nov 06 '23 20:11 chasain

@chasain Can you submit pr for this issue in repo https://github.com/openkruise/charts/tree/master/versions/kruise/1.5.1 ?

zmberg avatar Nov 16 '23 02:11 zmberg

can i work on this issue? @zmberg

amghazanfari avatar Nov 20 '23 17:11 amghazanfari

/assign @amghazanfari

zmberg avatar Nov 23 '23 03:11 zmberg

Hi @zmberg Let me try it

opencmit2 avatar Jan 04 '24 02:01 opencmit2

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 09 '24 02:07 stale[bot]