{"repo":"torgeirl/kubernetes-playbooks","free":true,"listed":false,"github":"https://github.com/torgeirl/kubernetes-playbooks","clone":"git clone https://github.com/torgeirl/kubernetes-playbooks.git","description":"Ansible playbooks for setting up a Kubernetes cluster","language":"HCL","stars":110,"topics":["ansible","ansible-playbook","kubernetes","k8s"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"kubernetes-playbooks ============= Ansible playbooks that creates a Kubernetes 1.36 cluster of Openstack instances running Ubuntu 26.04 LTS. Prerequisites Ansible and Python3 installed on the local machine ( # yum install ansible ). An OpenStack security group for SSH and ICMP access named SSH and ICMP . Terraform and OpenStack CLI tools installed on the local machine. Create a keystone rc file $ cp keystone rc.sh.example keystone rc.sh $ chmod 0600 keystone rc.sh The keystone rc.sh file will contain your API password so be careful with where you store it, and make sure it's private. Once it is, add your API password for OpenStack. You can also modify the worker count, network version, etc. Then load the file to the shell environment on the local computer: $ source keystone rc.sh Add a public key for the cluster to the API user SSH key pairs are tied to users, and the dashboard and API user are technically different. The SSH public key therefore has to be added to the API user explicitly: $ openstack keypair create --public-key /path/to/keyfile.pub k8s-nodes Build the cluster using Terraform Change directory to tf-project and initialize Terraform: $ cd tf-project $ terraform init Then verify, plan and apply with Terraform: $ terraform validate $ terraform plan $ terraform apply Change directory back to the main directory: $ cd .. Create an inventory file for Ansible After creating the cluster on OpenStack, Terraform created a ansible inventory file in the tf-project directory","default_branch":null,"files":null,"tree":[],"storefront":"/r/torgeirl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/torgeirl/kubernetes-playbooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}