diff --git a/roles/ex-lb/tasks/main.yml b/roles/ex-lb/tasks/main.yml index 1d3baaa..e4683c8 100644 --- a/roles/ex-lb/tasks/main.yml +++ b/roles/ex-lb/tasks/main.yml @@ -78,3 +78,18 @@ retries: 3 delay: 3 tags: restart_lb + +- name: 检查 ex-lb 的 kube-apiserver 是否正常 + uri: + url: "https://{{ EX_APISERVER_VIP }}:{{ EX_APISERVER_PORT }}" + validate_certs: no + client_cert: "{{ cluster_dir }}/ssl/admin.pem" + client_key: "{{ cluster_dir }}/ssl/admin-key.pem" + register: result + until: result.status == 200 + retries: 2 + delay: 5 + run_once: true + connection: local + +# - debug: var="result" \ No newline at end of file