run kubedns as system:serviceaccount:kube-system:kube-dns; but dns does NOT work

This commit is contained in:
jwfang 2017-06-16 18:54:18 +08:00
parent 765a5ce1ab
commit acbdfb08ce
3 changed files with 7 additions and 0 deletions

View file

@ -13,6 +13,7 @@
src: "{{item.file}}" src: "{{item.file}}"
dest: "{{kube_config_dir}}/{{item.file}}" dest: "{{kube_config_dir}}/{{item.file}}"
with_items: with_items:
- {name: kube-dns, file: kubedns-serviceaccount.yml, type: serviceaccount}
- {name: kubedns, file: kubedns-deploy.yml, type: deployment} - {name: kubedns, file: kubedns-deploy.yml, type: deployment}
- {name: kubedns, file: kubedns-svc.yml, type: svc} - {name: kubedns, file: kubedns-svc.yml, type: svc}
- {name: kubedns-autoscaler, file: kubedns-autoscaler.yml, type: deployment} - {name: kubedns-autoscaler, file: kubedns-autoscaler.yml, type: deployment}

View file

@ -114,3 +114,4 @@ spec:
- containerPort: 8080 - containerPort: 8080
protocol: TCP protocol: TCP
dnsPolicy: Default # Don't use cluster DNS. dnsPolicy: Default # Don't use cluster DNS.
serviceAccountName: kube-dns

View file

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-dns
namespace: {{ system_namespace }}