Skip to content

Terraform module to deploy Rancher Kubernetes Engine on OpenStack.

License

Notifications You must be signed in to change notification settings

mcapuccini/terraform-openstack-rke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenStack Rancher Kubernetes Engine Module

Build Status Terraform Registry

Terraform module to deploy Kubernetes with RKE on OpenStack.

Table of contents

Prerequisites

On your workstation you need to:

In your OpenStack project you need:

  • An Ubuntu 16.04 image
  • At least one available floating IP

Configuration

Start by creating a directory, locating into it and by creating the main Terraform configuration file:

mkdir deployment
cd deployment
touch main.tf

In main.tf paste and fill in the following configuration:

module "rke" {
  source  = "mcapuccini/rke/openstack"
  ssh_key_pub="" # Local path to public SSH key
  ssh_key="" # Local path to SSH key
  external_network_id="" # External network ID
  floating_ip_pool="" # Name of the floating IP pool (often same as the external network name)
  image_name="" # Name of an image to boot the nodes from (OS should be Ubuntu 16.04)
  master_flavor_name="" # Master node flavor name
  master_count=1 # Number of masters to deploy (should be an odd number)
  service_flavor_name="" # Service node flavor name (service nodes are general purpose)
  service_count=2 # Number of service nodes to deploy
  edge_flavor_name="" # Edge node flavor name (edge nodes run ingress controller and balance the API)
  edge_count=1 # Number of edge nodes to deploy (should be at least 1)
}

Init the Terraform directory by running:

terraform init

Deploy

To deploy please run:

terraform apply

Once the deployment is done, you can configure kubectl and check the nodes:

KUBECONFIG="$PWD/kube_config_cluster.yml"
kubectl get nodes

Scale

To scale the cluster you can increase and decrease the number of workers in main.tf and rerun terraform apply.

Destroy

You can delete the cluster by running:

terraform destroy

About

Terraform module to deploy Rancher Kubernetes Engine on OpenStack.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages