From 8b78c654833cfbe4cd4429c6d049ae5c43d43b03 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Fri, 20 Oct 2017 01:00:08 -0700 Subject: [PATCH] Update Google Cloud Kubernetes from v1.7.7 to v1.8.1 --- docs/google-cloud.md | 12 ++++++------ google-cloud/container-linux/kubernetes/README.md | 2 +- google-cloud/container-linux/kubernetes/bootkube.tf | 2 +- .../kubernetes/controllers/cl/controller.yaml.tmpl | 7 ++++--- .../kubernetes/workers/cl/worker.yaml.tmpl | 7 ++++--- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/google-cloud.md b/docs/google-cloud.md index dd00337b..8b3ca3fd 100644 --- a/docs/google-cloud.md +++ b/docs/google-cloud.md @@ -1,6 +1,6 @@ # Google Cloud -In this tutorial, we'll create a Kubernetes v1.7.7 cluster on Google Compute Engine (not GKE). +In this tutorial, we'll create a Kubernetes v1.8.1 cluster on Google Compute Engine (not GKE). We'll declare a Kubernetes cluster in Terraform using the Typhoon Terraform module. On apply, a network, firewall rules, managed instance groups of Kubernetes controllers and workers, network load balancers for controllers and workers, and health checks will be created. @@ -80,7 +80,7 @@ module "google-cloud-yavin" { zone = "us-central1-c" dns_zone = "example.com" dns_zone_name = "example-zone" - os_image = "coreos-stable-1465-6-0-v20170817" + os_image = "coreos-stable-1520-6-0-v20171012" cluster_name = "yavin" controller_count = 1 @@ -120,7 +120,7 @@ Get or update Terraform modules. $ terraform get # downloads missing modules $ terraform get --update # updates all modules Get: git::https://github.com/poseidon/typhoon (update) -Get: git::https://github.com/poseidon/bootkube-terraform.git?ref=v0.7.0 (update) +Get: git::https://github.com/poseidon/bootkube-terraform.git?ref=v0.8.0 (update) ``` Plan the resources to be created. @@ -154,9 +154,9 @@ In 5-10 minutes, the Kubernetes cluster will be ready. $ KUBECONFIG=/home/user/.secrets/clusters/yavin/auth/kubeconfig $ kubectl get nodes NAME STATUS AGE VERSION -yavin-controller-1682.c.example-com.internal Ready 6m v1.7.7+coreos.0 -yavin-worker-jrbf.c.example-com.internal Ready 5m v1.7.7+coreos.0 -yavin-worker-mzdm.c.example-com.internal Ready 5m v1.7.7+coreos.0 +yavin-controller-1682.c.example-com.internal Ready 6m v1.8.1+coreos.0 +yavin-worker-jrbf.c.example-com.internal Ready 5m v1.8.1+coreos.0 +yavin-worker-mzdm.c.example-com.internal Ready 5m v1.8.1+coreos.0 ``` List the pods. diff --git a/google-cloud/container-linux/kubernetes/README.md b/google-cloud/container-linux/kubernetes/README.md index 9e7b8a9c..491b69db 100644 --- a/google-cloud/container-linux/kubernetes/README.md +++ b/google-cloud/container-linux/kubernetes/README.md @@ -11,7 +11,7 @@ Typhoon distributes upstream Kubernetes, architectural conventions, and cluster ## Features -* Kubernetes v1.7.7 (upstream, via [kubernetes-incubator/bootkube](https://github.com/kubernetes-incubator/bootkube)) +* Kubernetes v1.8.1 (upstream, via [kubernetes-incubator/bootkube](https://github.com/kubernetes-incubator/bootkube)) * Single or multi-master, workloads isolated on workers, [Calico](https://www.projectcalico.org/) or [flannel](https://github.com/coreos/flannel) networking * On-cluster etcd with TLS, [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/)-enabled, [network policy](https://kubernetes.io/docs/concepts/services-networking/network-policies/) * Ready for Ingress, Dashboards, Metrics, and other optional [addons](https://typhoon.psdn.io/addons/overview/) diff --git a/google-cloud/container-linux/kubernetes/bootkube.tf b/google-cloud/container-linux/kubernetes/bootkube.tf index 5b376f57..d204fa43 100644 --- a/google-cloud/container-linux/kubernetes/bootkube.tf +++ b/google-cloud/container-linux/kubernetes/bootkube.tf @@ -1,6 +1,6 @@ # Self-hosted Kubernetes assets (kubeconfig, manifests) module "bootkube" { - source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=v0.7.0" + source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=v0.8.0" cluster_name = "${var.cluster_name}" api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"] diff --git a/google-cloud/container-linux/kubernetes/controllers/cl/controller.yaml.tmpl b/google-cloud/container-linux/kubernetes/controllers/cl/controller.yaml.tmpl index c9a8bd2b..60f55024 100644 --- a/google-cloud/container-linux/kubernetes/controllers/cl/controller.yaml.tmpl +++ b/google-cloud/container-linux/kubernetes/controllers/cl/controller.yaml.tmpl @@ -34,7 +34,8 @@ systemd: --volume opt-cni-bin,kind=host,source=/opt/cni/bin \ --mount volume=opt-cni-bin,target=/opt/cni/bin \ --volume var-log,kind=host,source=/var/log \ - --mount volume=var-log,target=/var/log" + --mount volume=var-log,target=/var/log \ + --hosts-entry=host" ExecStartPre=/bin/mkdir -p /opt/cni/bin ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d @@ -105,7 +106,7 @@ storage: contents: inline: | KUBELET_IMAGE_URL=quay.io/coreos/hyperkube - KUBELET_IMAGE_TAG=v1.7.7_coreos.0 + KUBELET_IMAGE_TAG=v1.8.1_coreos.0 - path: /etc/sysctl.d/max-user-watches.conf filesystem: root contents: @@ -128,7 +129,7 @@ storage: [ -d /opt/bootkube/assets/experimental/manifests ] && mv /opt/bootkube/assets/experimental/manifests/* /opt/bootkube/assets/manifests && rm -r /opt/bootkube/assets/experimental/manifests [ -d /opt/bootkube/assets/experimental/bootstrap-manifests ] && mv /opt/bootkube/assets/experimental/bootstrap-manifests/* /opt/bootkube/assets/bootstrap-manifests && rm -r /opt/bootkube/assets/experimental/bootstrap-manifests BOOTKUBE_ACI="$${BOOTKUBE_ACI:-quay.io/coreos/bootkube}" - BOOTKUBE_VERSION="$${BOOTKUBE_VERSION:-v0.7.0}" + BOOTKUBE_VERSION="$${BOOTKUBE_VERSION:-v0.8.0}" BOOTKUBE_ASSETS="$${BOOTKUBE_ASSETS:-/opt/bootkube/assets}" exec /usr/bin/rkt run \ --trust-keys-from-https \ diff --git a/google-cloud/container-linux/kubernetes/workers/cl/worker.yaml.tmpl b/google-cloud/container-linux/kubernetes/workers/cl/worker.yaml.tmpl index 11e6b73c..6f6050fe 100644 --- a/google-cloud/container-linux/kubernetes/workers/cl/worker.yaml.tmpl +++ b/google-cloud/container-linux/kubernetes/workers/cl/worker.yaml.tmpl @@ -34,7 +34,8 @@ systemd: --volume opt-cni-bin,kind=host,source=/opt/cni/bin \ --mount volume=opt-cni-bin,target=/opt/cni/bin \ --volume var-log,kind=host,source=/var/log \ - --mount volume=var-log,target=/var/log" + --mount volume=var-log,target=/var/log \ + --hosts-entry=host" ExecStartPre=/bin/mkdir -p /opt/cni/bin ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d @@ -103,7 +104,7 @@ storage: contents: inline: | KUBELET_IMAGE_URL=quay.io/coreos/hyperkube - KUBELET_IMAGE_TAG=v1.7.7_coreos.0 + KUBELET_IMAGE_TAG=v1.8.1_coreos.0 - path: /etc/sysctl.d/max-user-watches.conf filesystem: root contents: @@ -120,7 +121,7 @@ storage: --trust-keys-from-https \ --volume config,kind=host,source=/etc/kubernetes \ --mount volume=config,target=/etc/kubernetes \ - quay.io/coreos/hyperkube:v1.7.7_coreos.0 \ + quay.io/coreos/hyperkube:v1.8.1_coreos.0 \ --net=host \ --dns=host \ --exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)