mirror of https://github.com/easzlab/kubeasz.git
update to use kube-scheduler-config.yaml
parent
67e33c4eb8
commit
0798b2855a
|
@ -64,6 +64,10 @@
|
|||
- "/etc/kubernetes/kube-scheduler.kubeconfig"
|
||||
tags: upgrade_k8s, restart_master
|
||||
|
||||
- name: 创建 kube-scheduler 配置文件
|
||||
template: src=kube-scheduler-config.yaml.j2 dest=/etc/kubernetes/kube-scheduler-config.yaml
|
||||
tags: restart_master, upgrade_k8s
|
||||
|
||||
- name: 创建 master 服务的 systemd unit 文件
|
||||
template: src={{ item }}.j2 dest=/etc/systemd/system/{{ item }}
|
||||
with_items:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kubescheduler.config.k8s.io/v1beta1
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: "/etc/kubernetes/kube-scheduler.kubeconfig"
|
||||
healthzBindAddress: {{ inventory_hostname }}:10251
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
metricsBindAddress: {{ inventory_hostname }}:10251
|
|
@ -4,9 +4,7 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
|||
|
||||
[Service]
|
||||
ExecStart={{ bin_dir }}/kube-scheduler \
|
||||
--bind-address={{ inventory_hostname }} \
|
||||
--kubeconfig=/etc/kubernetes/kube-scheduler.kubeconfig \
|
||||
--leader-elect=true \
|
||||
--config=/etc/kubernetes/kube-scheduler-config.yaml \
|
||||
--v=2
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
|
Loading…
Reference in New Issue