Giter Site home page Giter Site logo

terraform-exoscale-sks's Introduction

terraform-exoscale-sks

A terraform module to create a managed Kubernetes cluster on Exoscale SKS.

This module creates an SKS cluster with one or more node pools. It creates one security group for all instances with the minimum rules recommended in the exoscale documentation. It also creates one anti-affinity group for each node pool. It then automatically retrieves the kubeconfig that allows access to the cluster.

Usage example

module "sks" {
  source  = "camptocamp/sks/exoscale"
  version = "0.3.1"

  name = "test"
  zone = "de-fra-1"

  kubernetes_version = "1.21.3"

  nodepools = {
    "router" = {
      instance_type = "standard.medium"
      size          = 2
    },
    "compute" = {
      instance_type = "standard.small"
      size          = 3
    }
  }
}

terraform-exoscale-sks's People

Contributors

mcanevet avatar ckaenzig avatar raphink avatar hbollon avatar

Stargazers

Valentin Delaye avatar Philip Miglinci avatar Niklas Liechti avatar mdubois avatar Alex Gassner avatar

Watchers

 avatar James Cloos avatar Alexandre Fayolle avatar mdubois avatar Maurer Luc avatar Julien Acroute avatar  avatar  avatar

terraform-exoscale-sks's Issues

Using this module to provision several clusters ?

Thanks a lot for this module, really useful.
This is more a question than an issue: is it planned to provide the foreach or count properties to generate several clusters using this same module ?

Cannot create cluster with 1.20.2

Hello,
running the module with the default 1.20.2 raises an error:

Error: Post "https://api-de-fra-1.exoscale.com/v2.alpha/sks-cluster": invalid request: Invalid Kubernetes version 1.20.2. Available versions are: 1.20.5

There is no problem with 1.20.5 though

module "sks" {
  source  = "camptocamp/sks/exoscale"
  version = "0.3.1"
  kubernetes_version = "1.20.5"

  name = "test"
  zone = "de-fra-1"

  nodepools = {
    "router" = {
      instance_type = "medium"
      size          = 2
    },
    "compute" = {
      instance_type = "small"
      size          = 3
    },
  }
}

Cannot add labels to nodepools

Hi,

when trying to add labels to my nodepools, I get an error:

│ Error: Invalid value for input variable
│ 
│   on main.tf line 10, in module "sks":
│   10:   nodepools = {
│   11:     "longhorn" = {
│   12:       description = "Longhorn Nodes, not to be autoscaled"
│   13:       disk_size = "1000"
│   14:       instance_type = "standard.small"
│   15:       size          = 2
│   16:       labels = {
│   17:         "node.longhorn.io/create-default-disk" = "true"
│   18:       }
│   19:     },
│   20:     "compute" = {
│   21:       instance_type = "standard.medium"
│   22:       size          = 1
│   23:     },
│   24:   }
│ 
│ The given value is not suitable for module.sks.var.nodepools declared at .terraform/modules/sks/variables.tf:16,1-21: all map elements must have the same type.

This is due to the variable definition here, which doesn't work for mixed types:

variable "nodepools" {
  description = "The SKS node pools to create."
  type        = map(any)
}

My terraform code:

module "sks" {
  source  = "camptocamp/sks/exoscale"
  version = "0.3.1"

  name = "default"
  zone = "de-fra-1"
  kubernetes_version = "1.24.1"

  nodepools = {
    "longhorn" = {
      description = "Longhorn Nodes, not to be autoscaled"
      disk_size = "1000"
      instance_type = "standard.small"
      size          = 2
      labels = {
        "node.longhorn.io/create-default-disk" = "true"
      }
    },
    "compute" = {
      instance_type = "standard.medium"
      size          = 1
    },
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.