Skip to content

Commit

Permalink
Add small K8 cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed May 6, 2021
1 parent 32d9902 commit 1f6866b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions slurm-gcp/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CLASS-HCP-GCP

## Kubernetes Cluster

List and get cluster credentials for kubectl
```
gcloud container clusters list
gcloud container clusters get-credentials class-container-cluster
```
21 changes: 21 additions & 0 deletions slurm-gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,24 @@ module "slurm_cluster_compute" {
zone = var.zone
}

resource "google_container_cluster" "class" {
name = "class-container-cluster"
count = 1
initial_node_count = 3
location = var.zone
network = var.network_name
subnetwork = var.subnetwork_name

release_channel {
channel = "RAPID"
}

node_config {
preemptible = true
machine_type = "e2-small"
metadata = {
disable-legacy-endpoints = true
}
}
}

0 comments on commit 1f6866b

Please sign in to comment.