Creates a number of virtual machines in OpenStack with MicroK8S pre-installed. It uses MetalLB to provide load balancing.
However, as OpenStack only allows a single floating IP to be assigned to an instance, this project re-uses the hosts IP (which limits the ports available to Kubernetes).
Requires local installation of Ansible and Terraform
- Set required environment variables for OpenStack
- Override any variable requiring change (see group_vars/all.yaml for a reference)
- Run
ansible-playbook deploy.yaml
(and supply your variables; see examples below) - Set
KUBECONFIG
to the corresponding generated kubeconfig files and verify thatkubectl get nodes -o wide
works.
ansible-playbook deploy.yaml --extra-vars 'instance_count=5 key_name="Dennis 2017"'
Create a file (e.g., my-vars.yaml
)
instance_count: 5
nodes_name: mk8s
key_name: "Dennis 2017"
project_id: 124048b2da0c44e5aee6eca2d180de30
Run ansible-playbook deploy.yaml --extra-vars '@my-vars.yaml'