mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Switch to kubeadm deployment mode (#3461)
* Switch to kubeadm deployment mode Discuss:https://github.com/kubernetes-incubator/kubespray/issues/3301 * Add non-kubeadm upgrage to kubeadm cluster
This commit is contained in:
@@ -87,9 +87,9 @@
|
||||
|
||||
- name: Update server field in kube-proxy kubeconfig
|
||||
shell: >-
|
||||
{{ bin_dir }}/kubectl get configmap kube-proxy -n kube-system -o yaml
|
||||
{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf get configmap kube-proxy -n kube-system -o yaml
|
||||
| sed 's#server:.*#server:\ {{ kube_apiserver_endpoint }}#g'
|
||||
| {{ bin_dir }}/kubectl replace -f -
|
||||
| {{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf replace -f -
|
||||
delegate_to: "{{groups['kube-master']|first}}"
|
||||
run_once: true
|
||||
when:
|
||||
@@ -110,7 +110,7 @@
|
||||
when: kube_network_plugin in ['calico','canal']
|
||||
|
||||
- name: Restart all kube-proxy pods to ensure that they load the new configmap
|
||||
shell: "{{ bin_dir }}/kubectl delete pod -n kube-system -l k8s-app=kube-proxy"
|
||||
shell: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf delete pod -n kube-system -l k8s-app=kube-proxy"
|
||||
delegate_to: "{{groups['kube-master']|first}}"
|
||||
run_once: true
|
||||
when:
|
||||
|
||||
@@ -18,4 +18,8 @@ nodeRegistration:
|
||||
name: {{ inventory_hostname }}
|
||||
{% if container_manager == 'crio' %}
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
{% elif container_manager == 'rkt' %}
|
||||
criSocket: /var/run/rkt.sock
|
||||
{% else %}
|
||||
criSocket: /var/run/dockershim.sock
|
||||
{% endif %}
|
||||
|
||||
@@ -18,6 +18,8 @@ nodeRegistration:
|
||||
name: {{ inventory_hostname }}
|
||||
{% if container_manager == 'crio' %}
|
||||
criSocket: /var/run/crio/crio.sock
|
||||
{% elif container_manager == 'rkt' %}
|
||||
criSocket: /var/run/rkt.sock
|
||||
{% else %}
|
||||
criSocket: /var/run/dockershim.sock
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user