Skip to content

Commit

Permalink
WIP on Kubernetes with gridscale_paas resource
Browse files Browse the repository at this point in the history
  • Loading branch information
bkircher committed Jan 25, 2021
1 parent 0be0d79 commit 36895f8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions managed-k8s/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yaml
19 changes: 19 additions & 0 deletions managed-k8s/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Kubernetes Example

This example shows how you can spin up a Kubernetes cluster with Terraform using the `"gridscale_paas"` resource.

Before you run Terraform, you need to set the `GRIDSCALE_TOKEN` and `GRIDSCALE_UUID` environment variables to their appropriate values. Take a look at the `.envrc` file for all variables.

## Example

In this example we will provision a cluster with:

- three worker nodes (max.)

whereas each worker node has

- 2 cores
- 4 GB of RAM
- and 30 GB of storage

Provisioning time varies of course but we can expect to take around 10 minutes to spin up the cluster.
25 changes: 25 additions & 0 deletions managed-k8s/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,29 @@ resource "gridscale_paas" "cluster" {
timeouts {
create = "20m"
}
parameter {
param = "k8s_worker_node_count"
type = "int"
value = "3"
}
parameter {
param = "k8s_worker_node_cores"
type = "int"
value = "2"
}
parameter {
param = "k8s_worker_node_ram"
type = "int"
value = "4"
}
parameter {
param = "k8s_worker_node_storage"
type = "int"
value = "30"
}
parameter {
param = "k8s_worker_node_storage_type"
type = "string"
value = "storage"
}
}

0 comments on commit 36895f8

Please sign in to comment.