Update Google Cloud Kubernetes from v1.7.7 to v1.8.1
This commit is contained in:
parent
f86c00288f
commit
8b78c65483
|
@ -1,6 +1,6 @@
|
||||||
# Google Cloud
|
# 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.
|
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"
|
zone = "us-central1-c"
|
||||||
dns_zone = "example.com"
|
dns_zone = "example.com"
|
||||||
dns_zone_name = "example-zone"
|
dns_zone_name = "example-zone"
|
||||||
os_image = "coreos-stable-1465-6-0-v20170817"
|
os_image = "coreos-stable-1520-6-0-v20171012"
|
||||||
|
|
||||||
cluster_name = "yavin"
|
cluster_name = "yavin"
|
||||||
controller_count = 1
|
controller_count = 1
|
||||||
|
@ -120,7 +120,7 @@ Get or update Terraform modules.
|
||||||
$ terraform get # downloads missing modules
|
$ terraform get # downloads missing modules
|
||||||
$ terraform get --update # updates all modules
|
$ terraform get --update # updates all modules
|
||||||
Get: git::https://github.com/poseidon/typhoon (update)
|
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.
|
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
|
$ KUBECONFIG=/home/user/.secrets/clusters/yavin/auth/kubeconfig
|
||||||
$ kubectl get nodes
|
$ kubectl get nodes
|
||||||
NAME STATUS AGE VERSION
|
NAME STATUS AGE VERSION
|
||||||
yavin-controller-1682.c.example-com.internal Ready 6m 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.7.7+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.7.7+coreos.0
|
yavin-worker-mzdm.c.example-com.internal Ready 5m v1.8.1+coreos.0
|
||||||
```
|
```
|
||||||
|
|
||||||
List the pods.
|
List the pods.
|
||||||
|
|
|
@ -11,7 +11,7 @@ Typhoon distributes upstream Kubernetes, architectural conventions, and cluster
|
||||||
|
|
||||||
## Features
|
## 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
|
* 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/)
|
* 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/)
|
* Ready for Ingress, Dashboards, Metrics, and other optional [addons](https://typhoon.psdn.io/addons/overview/)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Self-hosted Kubernetes assets (kubeconfig, manifests)
|
# Self-hosted Kubernetes assets (kubeconfig, manifests)
|
||||||
module "bootkube" {
|
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}"
|
cluster_name = "${var.cluster_name}"
|
||||||
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]
|
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]
|
||||||
|
|
|
@ -34,7 +34,8 @@ systemd:
|
||||||
--volume opt-cni-bin,kind=host,source=/opt/cni/bin \
|
--volume opt-cni-bin,kind=host,source=/opt/cni/bin \
|
||||||
--mount volume=opt-cni-bin,target=/opt/cni/bin \
|
--mount volume=opt-cni-bin,target=/opt/cni/bin \
|
||||||
--volume var-log,kind=host,source=/var/log \
|
--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 /opt/cni/bin
|
||||||
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
|
||||||
ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d
|
||||||
|
@ -105,7 +106,7 @@ storage:
|
||||||
contents:
|
contents:
|
||||||
inline: |
|
inline: |
|
||||||
KUBELET_IMAGE_URL=quay.io/coreos/hyperkube
|
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
|
- path: /etc/sysctl.d/max-user-watches.conf
|
||||||
filesystem: root
|
filesystem: root
|
||||||
contents:
|
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/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
|
[ -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_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}"
|
BOOTKUBE_ASSETS="$${BOOTKUBE_ASSETS:-/opt/bootkube/assets}"
|
||||||
exec /usr/bin/rkt run \
|
exec /usr/bin/rkt run \
|
||||||
--trust-keys-from-https \
|
--trust-keys-from-https \
|
||||||
|
|
|
@ -34,7 +34,8 @@ systemd:
|
||||||
--volume opt-cni-bin,kind=host,source=/opt/cni/bin \
|
--volume opt-cni-bin,kind=host,source=/opt/cni/bin \
|
||||||
--mount volume=opt-cni-bin,target=/opt/cni/bin \
|
--mount volume=opt-cni-bin,target=/opt/cni/bin \
|
||||||
--volume var-log,kind=host,source=/var/log \
|
--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 /opt/cni/bin
|
||||||
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests
|
||||||
ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d
|
ExecStartPre=/bin/mkdir -p /etc/kubernetes/cni/net.d
|
||||||
|
@ -103,7 +104,7 @@ storage:
|
||||||
contents:
|
contents:
|
||||||
inline: |
|
inline: |
|
||||||
KUBELET_IMAGE_URL=quay.io/coreos/hyperkube
|
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
|
- path: /etc/sysctl.d/max-user-watches.conf
|
||||||
filesystem: root
|
filesystem: root
|
||||||
contents:
|
contents:
|
||||||
|
@ -120,7 +121,7 @@ storage:
|
||||||
--trust-keys-from-https \
|
--trust-keys-from-https \
|
||||||
--volume config,kind=host,source=/etc/kubernetes \
|
--volume config,kind=host,source=/etc/kubernetes \
|
||||||
--mount volume=config,target=/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 \
|
--net=host \
|
||||||
--dns=host \
|
--dns=host \
|
||||||
--exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
--exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
||||||
|
|
Loading…
Reference in New Issue