Skip to content

cloud-ca/cloudca-rke-cluster

Repository files navigation

Overview

This terraform configuration is used to build a Rancher Kubernetes Engine (RKE) cluster on cloud.ca infrastructure.

Table of Content

Resources

It will create the required infrastructure:

  • one or several k8s master node(s)
  • two or several k8s worker nodes

Requirements

Available Kubernetes Versions

Version of Kubernetes to be used in the RKE cluster can be controlled with kubernetes_version, which depends on the version of terraform-provider-rke being used in which depends on the version of RKE binary beind used in that provider version.

To get the list of available (and the default) version of Kubernetes take a look at release notes of terraform-provider-rke and RKE respectively.

Providers

Name Version
cloudca ~> 1.5
local n/a
rke 0.14.1
template n/a
tls n/a

Inputs

Name Description Type Default Required
api_key cloud.ca API key to use any n/a yes
environment_id The environment ID to create resources in any n/a yes
network_id The network ID to create resources in any n/a yes
kubernetes_version Kubernetes version to install in the cluster string "v1.15.3-rancher1-1" no
master_count Number of master node(s) to create number 1 no
node_prefix Prefix to be used in name of instances, e.g. cca in cca-foo-service01 string "cca" no
node_service Service to be used in name of instances, e.g. service in cca-foo-service01 string "rke" no
node_type Type to be used in name of instances, e.g. foo in cca-foo-service01 string "cluster" no
node_username The username to create in the nodes with SSH access string "rke" no
worker_count Number of worker node(s) to create number 2 no

Outputs

Name Description
master_ips List of private IP of master node(s)
worker_ips List of private IP of worker node(s)

Usage

  1. Clone the repository into an appropriate name:

    git clone https://github.com/cloud-ca/cloudca-rke-cluster.git cloudca-rke-cluster
  2. Create terraform.tfvars containing:

    api_key        = "<cloud_ca_API_KEY>"
    environment_id = "<ENVIRONMENT_ID>"   # to create cluster in
    network_id     = "<NETWORK_ID>"       # to create cluster in
  3. Execute the following command to initialize the repository:

    make init plan

License

MIT License

Copyright (c) 2019 cloud.ca

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

Example Terraform config to create RKE cluster on cloud.ca

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •