Deploy Kubernetes ================= OpenStack-Helm provides charts that can be deployed on any Kubernetes cluster if it meets the supported version requirements. However, deploying the Kubernetes cluster itself is beyond the scope of OpenStack-Helm. You can use any Kubernetes deployment tool for this purpose. In this guide, we detail how to set up a Kubernetes cluster using Kubeadm and Ansible. While not production-ready, this cluster is ideal as a starting point for lab or proof-of-concept environments. All OpenStack projects test their code through an infrastructure managed by the CI tool, Zuul, which executes Ansible playbooks on one or more test nodes. Therefore, we employ Ansible roles/playbooks to install required packages, deploy Kubernetes, and then execute tests on it. To establish a test environment, the Ansible role deploy-env_ is employed. This role establishes a basic single/multi-node Kubernetes cluster, ensuring the functionality of commonly used deployment configurations. The role is compatible with Ubuntu Focal and Ubuntu Jammy distributions. Install Ansible --------------- .. code-block:: bash pip install ansible Prepare Ansible roles --------------------- Here is the Ansible `playbook`_ that is used to deploy Kubernetes. The roles used in this playbook are defined in different repositories. So in addition to OpenStack-Helm repositories that we assume have already been cloned to the `~/osh` directory you have to clone yet another one .. code-block:: bash cd ~/osh git clone https://opendev.org/zuul/zuul-jobs.git Now let's set the environment variable ``ANSIBLE_ROLES_PATH`` which specifies where Ansible will lookup roles .. code-block:: bash export ANSIBLE_ROLES_PATH=~/osh/openstack-helm-infra/roles:~/osh/zuul-jobs/roles To avoid setting it every time when you start a new terminal instance you can define this in the Ansible configuration file. Please see the Ansible documentation. Prepare Ansible inventory ------------------------- We assume you have three nodes, usually VMs. Those nodes must be available via SSH using the public key authentication and a ssh user (let say `ubuntu`) must have passwordless sudo on the nodes. Create the Ansible inventory file using the following command .. code-block:: bash cat > ~/osh/inventory.yaml <