-
kacchodu authored
getting-started.md 6.55 KiB
Getting started
Install ansible
Install Ansible according to Ansible installation guide.
Building your own inventory
Ansible inventory can be stored in 3 formats: YAML, JSON, or INI-like. See the example inventory and Ansible documentation on building your inventory, and details on the inventory structure expected by Kubespray.
<your-favorite-editor> inventory/mycluster/inventory.ini
# Review and change parameters under ``inventory/mycluster/group_vars``
<your-favorite-editor> inventory/mycluster/group_vars/all.yml # for every node, including etcd
<your-favorite-editor> inventory/mycluster/group_vars/k8s_cluster.yml # for every node in the cluster (not etcd when it's separate)
<your-favorite-editor> inventory/mycluster/group_vars/kube_control_plane.yml # for the control plane
<your-favorite-editor> inventory/myclsuter/group_vars/kube_node.yml # for worker nodes
Installing the cluster
ansible-playbook -i inventory/mycluster/ cluster.yml -b -v \
--private-key=~/.ssh/private_key
Adding nodes
You may want to add worker, control plane or etcd nodes to your existing cluster. This can be done by re-running the cluster.yml
playbook, or you can target the bare minimum needed to get kubelet installed on the worker and talking to your control planes. This is especially helpful when doing something like autoscaling your clusters.