kubernetes: dns.type=coreDNS does not honors kubelet.extraArgs.clusterDNS value

What happened: we used cluster configuration yaml file with below config for kubelet along with the dns.type=coreDNS which is also a default value.

kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
clusterDNS:
  - 10.233.0.10

What you expected to happen: Got kube-dns with cluster-ip value assigned din some other service cidr

# kubectl --kubeconfig=/etc/kubernetes/admin.conf get svc -n kube-system -o wide
NAME                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE     SELECTOR
kube-dns             ClusterIP   10.224.0.10      <none>        53/UDP,53/TCP,9153/TCP   3h33m   k8s-app=kube-dns

while it should be in the CIDR 10.233.0.0/12 provided via networking.serviceSubnet or given in KubeletConfiguration above.

How to reproduce it (as minimally and precisely as possible):

  1. create clusterconfiguration along with KubeletConfiguration as shown above and run kubeadm init --config<path/to/config.yaml>

Anything else we need to know?: I amusing v1beta2 for cluster configuration.

Environment: *

  • Kubernetes version (use kubectl version): 1.15.3
  • Cloud provider or hardware configuration: baremetal
  • OS (e.g: cat /etc/os-release): centOS7
  • Kernel (e.g. uname -a): 3.10.0-957.21.3.el7.x86_64
  • Install tools:
  • Network plugin and version (if this is a network-related bug): calico:v3.8.0
  • Others: etcd:v3.3.12

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

OK. thanks @abhiTamrakar

Can this issue reproduce in the local up cluster? If you can share more details about the reproduce step?