Search code examples
kuberneteskube-dns

Instructions to install addons with Kubernetes 1.6 on bare metal machine?


I have setup my kubernetes cluster from scratch following this doc: https://kubernetes.io/docs/getting-started-guides/scratch/

My kubernetes master and worker are working correctly, but I didn't find the instruction to deploy dns addons.


Solution

  • Addons can be deployed through yaml files as well as using the addon manager. I have already installed dashboard, monitoring, DNS manually using the yaml files provided (with small modifications) in this repo.

    Please note addon-manager is pretty special, You should copy all files into a directory then:

    ./kube-addons.sh
    

    Btw I prefer installing addons manually instead of using addon manager.

    DNS addon manual example:

    Take the kubedns-controller.yaml.sed, Replace the $DNS_DOMAIN with cluster.local(you should use the domain specified in your setup here). You can also set it as a variable. Please note there are multiple occurrences in this file.

    Then:

    mv kubedns-controller.yaml.sed kubedns-deployement.yaml
    kubectl create -f kubedns-deployement.yaml