7

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.

combinatorial
  • 9,132
  • 4
  • 40
  • 58
Xi Long Zheng
  • 73
  • 1
  • 4

1 Answers1

5

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
Farhad Farahi
  • 35,528
  • 7
  • 73
  • 70
  • Thanks for your quick response! I am on https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/addon-manager but didn't find yaml file for addon-manager... Also the dns repo https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns has .base .in .sed file, how to create the yaml with those files? – Xi Long Zheng Feb 18 '17 at 12:44
  • I didn't have an account on gcloud so I guess that the reason below command failed. But I already have the docker image built ready on my machine, how to deploy this image into kubernetes? I am looking for the yaml file to do a kubectl create -f so I could have it ready. gcloud docker -- push gcr.io/google-containers/kube-addon-manager-s390x:v6.4-alpha.1 make: gcloud: Command not found Makefile:49: recipe for target 'push' failed – Xi Long Zheng Feb 18 '17 at 12:56
  • I tried to use the manual example, which seemed to be successful, but I'm not able to replicate any of the examples shown at the bottom of the documentation (under quick diagnosis): https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#check-if-the-dns-pod-is-running – Matt Corby Nov 16 '17 at 18:29
  • If I wanted to use the addon-manager should I copy the entire dns directory to the addon-manager directory and run kube-addons.sh? – Matt Corby Nov 16 '17 at 18:31
  • @FarhadFarahi in that .sed file what should be $DNS_SERVER_IP, there is this line clusterIP: $DNS_SERVER_IP – smk Oct 24 '18 at 14:21