mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
feat: change kubeadm join cmd feat: change add node func feat: change add node func Signed-off-by: xuesongzuo@yunify.com <xuesongzuo@yunify.com>
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
---
|
|
- hosts:
|
|
- all
|
|
roles:
|
|
- native/root
|
|
- import_playbook: hook/pre_install.yaml
|
|
|
|
# Load default variables and perform prechecks on all hosts
|
|
- hosts:
|
|
- all
|
|
gather_facts: true
|
|
roles:
|
|
- defaults
|
|
- precheck
|
|
|
|
# Download all required software and generate certificates on the localhost
|
|
- hosts:
|
|
- localhost
|
|
gather_facts: true
|
|
roles:
|
|
- certs/init
|
|
- download
|
|
- certs/check
|
|
|
|
# Initialize all nodes and install necessary software packages
|
|
- hosts:
|
|
- etcd
|
|
- k8s_cluster
|
|
- image_registry
|
|
- nfs
|
|
roles:
|
|
- native
|
|
|
|
# Install the etcd cluster
|
|
- hosts:
|
|
- etcd
|
|
gather_facts: true
|
|
roles:
|
|
- etcd
|
|
|
|
- hosts:
|
|
- k8s_cluster
|
|
roles:
|
|
- role: cri
|
|
when: or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
|
|
- role: kubernetes/pre-kubernetes
|
|
when: or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
|
|
- role: kubernetes/init-kubernetes
|
|
when: or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
|
|
- role: kubernetes/join-kubernetes
|
|
when:
|
|
- or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
|
|
- .kubernetes_install_LoadState.stdout | eq "not-found"
|
|
- role: kubernetes/certs
|
|
when:
|
|
- or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
|
|
- .groups.kube_control_plane | default list | has .inventory_hostname
|
|
- .kubernetes.certs.renew
|