Skip to content

Instantly share code, notes, and snippets.

@mclavel
Created May 27, 2018 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mclavel/355bfc6855959ad56112bfd544851a61 to your computer and use it in GitHub Desktop.
Save mclavel/355bfc6855959ad56112bfd544851a61 to your computer and use it in GitHub Desktop.
resource "google_container_cluster" "cluster" {
name = "example"
zone = "us-central1-a"
initial_node_count = 1
}
resource "google_container_node_pool" "pool" {
name = "pool"
cluster = "${google_container_cluster.cluster.name}"
zone = "us-central1-a"
node_count = "1"
node_config {
machine_type = "g1-small"
}
}
provider "kubernetes" {
host = "${google_container_cluster.cluster.endpoint}"
username = "${google_container_cluster.cluster.master_auth.0.username}"
password = "${google_container_cluster.cluster.master_auth.0.password}"
client_certificate = "${base64decode(google_container_cluster.cluster.master_auth.0.client_certificate)}"
client_key = "${base64decode(google_container_cluster.cluster.master_auth.0.client_key)}"
cluster_ca_certificate = "${base64decode(google_container_cluster.cluster.master_auth.0.cluster_ca_certificate)}"
}
resource "kubernetes_secret" "secret-info" {
metadata {
name = "very-secret-info"
}
data {
info = "this is secret"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment