Skip to content

pfisterer/edsc-microk8s-playbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a VM in OpenStack with MicroK8S (using Ansible and Terraform)

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).

Usage

Requires local installation of Ansible and Terraform

  1. Set required environment variables for OpenStack
  2. Override any variable requiring change (see group_vars/all.yaml for a reference)
  3. Run ansible-playbook deploy.yaml (and supply your variables; see examples below)
  4. Set KUBECONFIG to the corresponding generated kubeconfig files and verify that kubectl get nodes -o wide works.

Example

Pass variables on the command line

ansible-playbook deploy.yaml --extra-vars 'instance_count=5 key_name="Dennis 2017"'

Using a file with variables

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'

Releases

No releases published

Packages

No packages published

Languages