docs: reorganize "getting started" + cleanups old docs

Our README is currently pretty cluttered:
- Part of the README duplicates docs/getting_started/getting-started.md
-> Remove duplicates and extract useful info into the getting-started.md

- General info on Ansible environment troubleshooting
-> remove most of it as it's not specific to Kubespray, move to
docs/ansible/ansible.md
-> split inventory-related stuff of ansible.md into it's own file. This
should host documentation on how to manages Kubespray inventories in the
future.

ansible.md:
- remove the list of "Unused" variables, as:
  1. It's not accurate
  2. What matters is where users should put their variables
This commit is contained in:
Max Gautier
2024-11-26 15:10:24 +01:00
parent 6b14be6624
commit db9852e853
5 changed files with 98 additions and 104 deletions

View File

@@ -1,10 +1,8 @@
# Getting started
## Building your own inventory
## Install ansible
Ansible inventory can be stored in 3 formats: YAML, JSON, or INI-like. There is
an example inventory located
[here](https://github.com/kubernetes-sigs/kubespray/blob/master/inventory/sample/inventory.ini).
Install Ansible according to [Ansible installation guide](/docs/ansible/ansible.md#installing-ansible).
## Building your own inventory
@@ -13,9 +11,7 @@ Ansible inventory can be stored in 3 formats: YAML, JSON, or INI-like. See the
and [Ansible documentation on building your inventory](https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html),
and [details on the inventory structure expected by Kubespray](/docs/ansible/inventory.md).
```ShellSession
<your-favorite-editor> inventory/mycluster/inventory.ini
# Review and change parameters under ``inventory/mycluster/group_vars``
@@ -25,15 +21,13 @@ and [details on the inventory structure expected by Kubespray](/docs/ansible/inv
<your-favorite-editor> inventory/myclsuter/group_vars/kube_node.yml # for worker nodes
```
**IMPORTANT**: Edit my\_inventory/groups\_vars/\*.yaml to override data vars:
## Installing the cluster
```ShellSession
ansible-playbook -i inventory/mycluster/hosts.yml cluster.yml -b -v \
ansible-playbook -i inventory/mycluster/ cluster.yml -b -v \
--private-key=~/.ssh/private_key
```
See more details in the [ansible guide](/docs/ansible/ansible.md).
### 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.