mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
feat: update kubeadm-config file (#2850)
feat: update kubeadm-config file Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
This commit is contained in:
parent
2aa8cf140b
commit
423d9f1b33
|
|
@ -29,7 +29,7 @@
|
||||||
- name: InitKubernetes | Kubernetes Already Installed
|
- name: InitKubernetes | Kubernetes Already Installed
|
||||||
when: .kubernetes_install_LoadState.stdout | eq "load"
|
when: .kubernetes_install_LoadState.stdout | eq "load"
|
||||||
command: |
|
command: |
|
||||||
if [ ! -f /etc/kubernetes/kubeadm-config.yaml ]; then
|
if ! grep -q 'ClusterConfiguration' /etc/kubernetes/kubeadm-config.yaml 2>/dev/null; then
|
||||||
kubectl get cm kubeadm-config -n kube-system -o=jsonpath='{.data.ClusterConfiguration}' > /etc/kubernetes/kubeadm-config.yaml
|
kubectl get cm kubeadm-config -n kube-system -o=jsonpath='{.data.ClusterConfiguration}' > /etc/kubernetes/kubeadm-config.yaml
|
||||||
fi
|
fi
|
||||||
- name: InitKubernetes | Fetch kubeconfig to local workspace
|
- name: InitKubernetes | Fetch kubeconfig to local workspace
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue