skip to main content
Modified allowed Ansible version:
The quay.io docker image comes installed with Ansible 1.12.5, as of the time of this writing. However, the kubespray distribution requires the Ansible version to be between 1.14.0 and 1.16.0. Therefore, you must modify the playbooks/ansible_version.yml as follows:
Change minimal_ansible_version: 2.12.0 to minimal_ansible_version: 2.14.0
Change maximal_ansible_version: 2.13.0 to maximal_ansible_version: 2.16.0
Make sure the file is created with desired IP address:
cat inventory/ice-cluster/hosts.yml
A sample hosts.yml may look like this:
all:
hosts:
node1:
ansible_host: 192.168.1.71
ip: 192.168.1.71
access_ip: 192.168.1.71
node2:
ansible_host: 192.168.1.72
ip: 192.168.1.72
access_ip: 192.168.1.72
node3:
ansible_host: 192.168.1.73
ip: 192.168.1.73
access_ip: 192.168.1.73
children:
kube_control_plane:
hosts:
node1:
node2:
kube_node:
hosts:
node1:
node2:
node3:
etcd:
hosts:
node1:
node2:
node3:
k8s_cluster:
children:
kube_control_plane:
kube_node:
calico_rr:
hosts: {}
To review and adjust the inventory
1. Review the IP address and hostnames carefully!
2. You may change default hostnames/nodenames node1, node2 and node3 to match the desired hostname of each virtual machine, using a text editor.
Note: Once the cluster is created, neither hostname nor IP address can be changed. hosts.yml is white space sensitive. Do not alter any leading white space before each line.
3. Review and adjust cluster-specific configurations.
4. Optionally, review and customize cluster-specific configurations in the following directory:
${HOME}/kube-install/kubespray/inventory/ice-cluster/group_vars/
These files contain the general configuration options:
${HOME}/kube-install/kubespray/inventory/ice-cluster/group_vars/all/all.yml
${HOME}/kube-install/kubespray/inventory/ice-cluster/group_vars/k8s_cluster/k8s-cluster.yml
5. Run ansible-playbook on kubesprayhost to create the Kubernetes cluster.
6. In the Kubespray Docker container's bash shell, create the cluster:
ansible-playbook -i inventory/ice-cluster/hosts.yml \
--private-key=/kubespray/.ssh/id_rsa \
-e kube_version=v1.28.5 \
-vvv \
-b \
cluster.yml
7. Review the output under the 'PLAY RECAP' section. All status should be 'ok'. No red-colored text should be displayed.
A screen shot of a computer AI-generated content may be incorrect.
8. If you need to start all over again, the cluster may be removed by using the reset playbook:
ansible-playbook -i inventory/ice-cluster/hosts.yml \
--private-key=/kubespray/.ssh/id_rsa \
-e kube_version=v1.28.5 \
-vvv \
-b \
reset.yml