Commit 5f828e41 authored by Alan Peng's avatar Alan Peng
Browse files

patch kubelet.conf on master nodes

parent fc4a0b2d
Showing with 20 additions and 0 deletions
+20 -0
#!/bin/bash
TIME_STRING=`date "+%Y-%m-%d-%H-%M-%S"`
cd /etc/kubernetes/
cp -p /etc/kubernetes/kubelet.conf /etc/kubernetes/kubelet.conf.$TIME_STRING
sed -i 's#client-certificate-data:.*$#client-certificate: /var/lib/kubelet/pki/kubelet-client-current.pem#g' kubelet.conf
sed -i 's#client-key-data:.*$#client-key: /var/lib/kubelet/pki/kubelet-client-current.pem#g' kubelet.conf
systemctl restart kubelet
......@@ -300,3 +300,16 @@
shell: |
helm repo add --username={{ registry_user }} --password={{ registry_password }} {{ registry_project }} http://{{ registry_endpoint }}/chartrepo/{{ registry_project }}
when: not registry_https
- name: copy kubelet-conf patch script
copy:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
mode: 0755
with_items:
- { src: 'file/patch-kubelet-conf.sh', dest: '{{ path }}' }
- name: execute patch-kubelet-conf script
shell: ./patch-kubelet-conf.sh
args:
chdir: '{{ path }}'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment