mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-25 17:12:50 +00:00
52 lines
1.4 KiB
YAML
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
|