Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cluster-dns IP setup by kubeadm #6472

Merged

Commits on Feb 5, 2020

  1. Use cluster-dns IP setup by kubeadm

    Removed hardcoded `cluster-dns` IP 10.96.0.10, this allows kubelet to use `clusterDNS` configured by kubeadm in `/var/lib/kubelet/config.yaml`
    
    Tested by starting minikube with `--service-cluster-ip-range=100.64.0.0/13` and verifying DNS resolution works.
    
    /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
    ```
    [Unit]
    Wants=docker.socket
    
    [Service]
    ExecStart=
    ExecStart=/var/lib/minikube/binaries/v1.17.0/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver='cgroupfs' --client-ca-file=/v
    ar/lib/minikube/certs/ca.crt --cluster-domain=cluster.local --config=/var/lib/kubelet/config.yaml --container-runtime=docker --fail-swap-on=false --hostname-override=minikube --kubeconfig=/e
    tc/kubernetes/kubelet.conf --node-ip=192.168.64.7 --pod-manifest-path=/etc/kubernetes/manifests
    
    [Install]
    ```
    
    DNS resolution test
    ```
    kubectl run -i --tty --rm busybox --image=busybox --restart=Never -- sh
    If you don't see a command prompt, try pressing enter.
    / # nslookup kubernetes.io
    Server:		100.64.0.10
    Address:	100.64.0.10:53
    
    Non-authoritative answer:
    Name:	kubernetes.io
    Address: 147.75.40.148
    ```
    
    Fixes: kubernetes#5727
    
    fix lint errors
    vijaykatam committed Feb 5, 2020
    Configuration menu
    Copy the full SHA
    cf8e247 View commit details
    Browse the repository at this point in the history