From 47171c55bdf2178f3df275312573610868bb87e7 Mon Sep 17 00:00:00 2001 From: Luca Violanti Date: Thu, 21 May 2020 08:59:37 +0100 Subject: [PATCH 1/3] Use new Kubernetes API for creating deployments See https://github.com/kubernetes/kubernetes/pull/87077 Fixes https://github.com/GoogleCloudPlatform/gke-logging-sinks-demo/issues/39 --- terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index 2ef0bbe..e75c17f 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -88,7 +88,7 @@ resource "google_container_cluster" "primary" { } provisioner "local-exec" { - command = "kubectl --namespace default run hello-server --image gcr.io/google-samples/hello-app:1.0 --port 8080" + command = "kubectl --namespace default create deployment hello-server --image gcr.io/google-samples/hello-app:1.0 --port 8080" } provisioner "local-exec" { From f7f14a7e03c17f73606ea95cdcbadc1d1be164a1 Mon Sep 17 00:00:00 2001 From: Luca Violanti Date: Thu, 21 May 2020 10:23:33 +0100 Subject: [PATCH 2/3] Remove port flag --- terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index e75c17f..43acfc9 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -88,7 +88,7 @@ resource "google_container_cluster" "primary" { } provisioner "local-exec" { - command = "kubectl --namespace default create deployment hello-server --image gcr.io/google-samples/hello-app:1.0 --port 8080" + command = "kubectl --namespace default create deployment hello-server --image gcr.io/google-samples/hello-app:1.0" } provisioner "local-exec" { From 224a61ac7e9d0cdded5c7647f49a8a37deccf921 Mon Sep 17 00:00:00 2001 From: Luca Violanti Date: Thu, 21 May 2020 10:27:27 +0100 Subject: [PATCH 3/3] Add port flag when exposing deployment --- terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index 43acfc9..be81a1c 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -92,7 +92,7 @@ resource "google_container_cluster" "primary" { } provisioner "local-exec" { - command = "kubectl --namespace default expose deployment hello-server --type \"LoadBalancer\" " + command = "kubectl --namespace default expose deployment hello-server --type \"LoadBalancer\" --port=8080" } }