Kubernetes ========== OpenStack-Helm provides charts that can be deployed on any Kubernetes cluster if it meets the version :doc:`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 deploys a basic single/multi-node Kubernetes cluster, used to prove the functionality of commonly used deployment configurations. The role is compatible with Ubuntu Focal and Ubuntu Jammy distributions. .. note:: The role `deploy-env`_ is not idempotent and assumed to be applied to a clean environment. Clone roles git repositories ---------------------------- Before proceeding with the steps outlined in the following sections, it is imperative that you clone the git repositories containing the required Ansible roles. .. code-block:: bash mkdir ~/osh cd ~/osh git clone https://opendev.org/openstack/openstack-helm-infra.git git clone https://opendev.org/zuul/zuul-jobs.git Install Ansible --------------- .. code-block:: bash pip install ansible Set roles lookup path --------------------- 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 inventory ----------------- The example below assumes that there are four nodes which must be available via SSH using the public key authentication and a ssh user (let say ``ubuntu``) must have passwordless sudo on the nodes. .. code-block:: bash cat > ~/osh/inventory.yaml < ~/osh/deploy-env.yaml <