Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.16 KB

File metadata and controls

37 lines (26 loc) · 1.16 KB

Ansible collection

Kubespray can be installed as an Ansible collection.

Usage

  1. Set up an inventory with the appropriate host groups and required group vars. See also the documentation on kubespray inventories and the general "Getting started" documentation.

  2. Add Kubespray to your requirements.yml file

    collections:
    - name: https://github.com/kubernetes-sigs/kubespray
      type: git
      version: master # use the appropriate tag or branch for the version you need
  3. Install your collection

    ansible-galaxy install -r requirements.yml
  4. Create a playbook to install your Kubernetes cluster

    - name: Install Kubernetes
      ansible.builtin.import_playbook: kubernetes_sigs.kubespray.cluster
  5. Update INVENTORY and PLAYBOOK so that they point to your inventory file and the playbook you created above, and then install Kubespray

    ansible-playbook -i INVENTORY --become --become-user=root PLAYBOOK