A project stores task templates to be executed, consisting of a series of YAML files. For easy understanding and quick adoption, KubeKey's task orchestration follows the conventions of Ansible.
project/
βββ playbooks/ # Optional: store playbook files
β βββ playbook1.yaml
β βββ playbook2.yaml
βββ playbook1.yaml # Or place playbooks directly in the project root
βββ playbook2.yaml
βββ roles/
βββ roleName1/
βββ roleName2/
- playbooks: Execution entry point, storing playbooks. A playbook can define multiple tasks or roles, which run in the defined order during execution.
- roles: Collection of roles. A role is a group of tasks.
Projects can be stored in builtin, local, or Git.
Builtin projects are located in the builtin directory and are integrated into the KubeKey command.
kk precheckExecutes playbooks/precheck.yaml in the builtin directory.
kk run demo.yamlExecutes demo.yaml in the current directory.
kk run playbooks/demo.yaml \
--project-addr="$(GIT_URL)" \
--project-branch="$(GIT_BRANCH)"Executes playbooks/demo.yaml on the specified Git URL and branch.