use master election option instead of podmaster
This commit is contained in:
parent
ba4ad51c26
commit
c51ed4bbb7
5 changed files with 6 additions and 53 deletions
|
@ -2,3 +2,5 @@
|
||||||
![Kubespray Logo](http://s9.postimg.org/md5dyjl67/kubespray_logoandkubespray_small.png)
|
![Kubespray Logo](http://s9.postimg.org/md5dyjl67/kubespray_logoandkubespray_small.png)
|
||||||
|
|
||||||
The documentation can be found [THERE](https://docs.kubespray.io)
|
The documentation can be found [THERE](https://docs.kubespray.io)
|
||||||
|
|
||||||
|
[![Build Status](https://travis-ci.org/kubespray/kubespray.svg)](https://travis-ci.org/kubespray/kubespray)
|
||||||
|
|
|
@ -75,17 +75,12 @@
|
||||||
- name: Write kube-controller-manager manifest
|
- name: Write kube-controller-manager manifest
|
||||||
template:
|
template:
|
||||||
src: manifests/kube-controller-manager.manifest.j2
|
src: manifests/kube-controller-manager.manifest.j2
|
||||||
dest: "{{ kube_config_dir }}/kube-controller-manager.manifest"
|
dest: "{{ kube_manifest_dir }}/kube-controller-manager.manifest"
|
||||||
|
|
||||||
- name: Write kube-scheduler manifest
|
- name: Write kube-scheduler manifest
|
||||||
template:
|
template:
|
||||||
src: manifests/kube-scheduler.manifest.j2
|
src: manifests/kube-scheduler.manifest.j2
|
||||||
dest: "{{ kube_config_dir }}/kube-scheduler.manifest"
|
dest: "{{ kube_manifest_dir }}/kube-scheduler.manifest"
|
||||||
|
|
||||||
- name: Write podmaster manifest
|
|
||||||
template:
|
|
||||||
src: manifests/kube-podmaster.manifest.j2
|
|
||||||
dest: "{{ kube_manifest_dir }}/kube-podmaster.manifest"
|
|
||||||
|
|
||||||
- name: restart kubelet
|
- name: restart kubelet
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -12,6 +12,7 @@ spec:
|
||||||
- /hyperkube
|
- /hyperkube
|
||||||
- controller-manager
|
- controller-manager
|
||||||
- --master=http://127.0.0.1:{{kube_apiserver_insecure_port}}
|
- --master=http://127.0.0.1:{{kube_apiserver_insecure_port}}
|
||||||
|
- --leader-elect=true
|
||||||
- --service-account-private-key-file={{ kube_cert_dir }}/apiserver-key.pem
|
- --service-account-private-key-file={{ kube_cert_dir }}/apiserver-key.pem
|
||||||
- --root-ca-file={{ kube_cert_dir }}/ca.pem
|
- --root-ca-file={{ kube_cert_dir }}/ca.pem
|
||||||
- --v={{ kube_log_level | default('2') }}
|
- --v={{ kube_log_level | default('2') }}
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: kube-podmaster
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
hostNetwork: true
|
|
||||||
containers:
|
|
||||||
- name: scheduler-elector
|
|
||||||
image: gcr.io/google_containers/podmaster:1.1
|
|
||||||
command:
|
|
||||||
- /podmaster
|
|
||||||
- --etcd-servers={% for srv in groups['etcd'] %}http://{{ srv }}:2379{% if not loop.last %},{% endif %}{% endfor %}
|
|
||||||
|
|
||||||
- --key=scheduler
|
|
||||||
- --source-file={{ kube_config_dir}}/kube-scheduler.manifest
|
|
||||||
- --dest-file={{ kube_manifest_dir }}/kube-scheduler.manifest
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: {{ kube_config_dir }}
|
|
||||||
name: manifest-src
|
|
||||||
readOnly: true
|
|
||||||
- mountPath: {{ kube_manifest_dir }}
|
|
||||||
name: manifest-dst
|
|
||||||
- name: controller-manager-elector
|
|
||||||
image: gcr.io/google_containers/podmaster:1.1
|
|
||||||
command:
|
|
||||||
- /podmaster
|
|
||||||
- --etcd-servers={% for srv in groups['etcd'] %}http://{{ srv }}:2379{% if not loop.last %},{% endif %}{% endfor %}
|
|
||||||
|
|
||||||
- --key=controller
|
|
||||||
- --source-file={{ kube_config_dir }}/kube-controller-manager.manifest
|
|
||||||
- --dest-file={{ kube_manifest_dir }}/kube-controller-manager.manifest
|
|
||||||
terminationMessagePath: /dev/termination-log
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: {{ kube_config_dir }}
|
|
||||||
name: manifest-src
|
|
||||||
readOnly: true
|
|
||||||
- mountPath: {{ kube_manifest_dir }}
|
|
||||||
name: manifest-dst
|
|
||||||
volumes:
|
|
||||||
- hostPath:
|
|
||||||
path: {{ kube_config_dir }}
|
|
||||||
name: manifest-src
|
|
||||||
- hostPath:
|
|
||||||
path: {{ kube_manifest_dir }}
|
|
||||||
name: manifest-dst
|
|
|
@ -11,6 +11,7 @@ spec:
|
||||||
command:
|
command:
|
||||||
- /hyperkube
|
- /hyperkube
|
||||||
- scheduler
|
- scheduler
|
||||||
|
- --leader-elect=true
|
||||||
- --master=http://127.0.0.1:{{kube_apiserver_insecure_port}}
|
- --master=http://127.0.0.1:{{kube_apiserver_insecure_port}}
|
||||||
- --v={{ kube_log_level | default('2') }}
|
- --v={{ kube_log_level | default('2') }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
|
|
Loading…
Reference in a new issue