Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. provider "google" {
  2. project = "it-project-st4"
  3. region = "us-central1"
  4. zone = "us-central1-c"
  5. }
  6.  
  7. resource "google_container_cluster" "primary" {
  8. name = "service-mesh-cluster"
  9. location = "us-central1"
  10.  
  11. # We can't create a cluster with no node pool defined, but we want to only use
  12. # separately managed node pools. So we create the smallest possible default
  13. # node pool and immediately delete it.
  14. remove_default_node_pool = true
  15. initial_node_count = 1
  16.  
  17.  
  18. }
  19.  
  20. resource "google_container_node_pool" "primary_preemptible_nodes" {
  21. name = "service-mesh-node-pool"
  22. location = "us-central1"
  23. cluster = google_container_cluster.primary.name
  24. node_count = 3
  25.  
  26. node_config {
  27. preemptible = true
  28. machine_type = "n1-standard-1"
  29.  
  30. metadata = {
  31. disable-legacy-endpoints = "true"
  32. }
  33.  
  34. oauth_scopes = [
  35. "https://www.googleapis.com/auth/logging.write",
  36. "https://www.googleapis.com/auth/monitoring",
  37. ]
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement