mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
* fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * fix: misspelling Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: user go-template instance pongo2-template Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: not set incorrect Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> * feat: more beautiful progress bar Signed-off-by: joyceliu <joyceliu@yunify.com> --------- Signed-off-by: joyceliu <joyceliu@yunify.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
29 lines
1.3 KiB
YAML
29 lines
1.3 KiB
YAML
---
|
|
# install with static pod: https://kube-vip.io/docs/installation/static/
|
|
- name: Get interface for ipv4
|
|
command: |
|
|
ip route | grep ' {{ .internal_ipv4 }} ' | grep 'proto kernel scope link src' | sed -e \"s/^.*dev.//\" -e \"s/.proto.*//\"| uniq
|
|
register: interface
|
|
|
|
- name: Generate kubevip manifest
|
|
template:
|
|
src: |
|
|
kubevip/kubevip.{{ .kubernetes.kube_vip.mode }}
|
|
dest: /etc/kubernetes/manifests/kubevip.yaml
|
|
|
|
- name: Update kubelet config
|
|
command: |
|
|
sed -i 's#server:.*#server: https://127.0.0.1:{{ .kubernetes.apiserver.port }}#g' /etc/kubernetes/kubelet.conf
|
|
systemctl restart kubelet
|
|
|
|
- name: Update kube-proxy config
|
|
command: |
|
|
set -o pipefail && /usr/local/bin/kubectl --kubeconfig /etc/kubernetes/admin.conf get configmap kube-proxy -n kube-system -o yaml \
|
|
| sed 's#server:.*#server: https://127.0.0.1:{{ .kubernetes.apiserver.port }}#g' \
|
|
| /usr/local/bin/kubectl --kubeconfig /etc/kubernetes/admin.conf replace -f -
|
|
/usr/local/bin/kubectl --kubeconfig /etc/kubernetes/admin.conf delete pod -n kube-system -l k8s-app=kube-proxy --force --grace-period=0
|
|
|
|
- name: Update hosts file
|
|
command: |
|
|
sed -i 's#.* {{ .kubernetes.control_plane_endpoint }}#127.0.0.1 {{ .kubernetes.control_plane_endpoint }}s#g' /etc/hosts
|