kubekey/builtin/core/playbooks/add_nodes.yaml
liujian 3885b443ac
fix: change builtin/core architectures (#2718)
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
2025-08-22 21:59:40 +08:00

52 lines
1.4 KiB
YAML

---
- 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
# 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/init-kubernetes
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/join-kubernetes
when: or (.add_nodes | default list | empty) (.add_nodes | default list | has .inventory_hostname)
- 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