Upgrades Kubernetes to v1.16.2 and all other components explicitly or implicitly (e.g. nginx image).
The clusterrole/clusterrolebinding are changed to rbac.authorization.k8s.io/v1pull/499/head
parent
5c462220b7
commit
0957c20663
|
@ -19,11 +19,11 @@ The target audience for this tutorial is someone planning to support a productio
|
|||
|
||||
Kubernetes The Hard Way guides you through bootstrapping a highly available Kubernetes cluster with end-to-end encryption between components and RBAC authentication.
|
||||
|
||||
* [kubernetes](https://github.com/kubernetes/kubernetes) 1.15.3
|
||||
* [containerd](https://github.com/containerd/containerd) 1.2.9
|
||||
* [coredns](https://github.com/coredns/coredns) v1.6.3
|
||||
* [kubernetes](https://github.com/kubernetes/kubernetes) 1.16.2
|
||||
* [containerd](https://github.com/containerd/containerd) 1.3.0
|
||||
* [coredns](https://github.com/coredns/coredns) v1.6.4
|
||||
* [cni](https://github.com/containernetworking/cni) v0.7.1
|
||||
* [etcd](https://github.com/coreos/etcd) v3.4.0
|
||||
* [etcd](https://github.com/coreos/etcd) v3.4.3
|
||||
|
||||
## Labs
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ spec:
|
|||
beta.kubernetes.io/os: linux
|
||||
containers:
|
||||
- name: coredns
|
||||
image: coredns/coredns:1.6.2
|
||||
image: coredns/coredns:1.6.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
@ -78,7 +78,7 @@ The `kubectl` command line utility is used to interact with the Kubernetes API S
|
|||
### OS X
|
||||
|
||||
```
|
||||
curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/darwin/amd64/kubectl
|
||||
curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/darwin/amd64/kubectl
|
||||
```
|
||||
|
||||
```
|
||||
|
@ -92,7 +92,7 @@ sudo mv kubectl /usr/local/bin/
|
|||
### Linux
|
||||
|
||||
```
|
||||
wget https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubectl
|
||||
wget https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kubectl
|
||||
```
|
||||
|
||||
```
|
||||
|
@ -105,7 +105,7 @@ sudo mv kubectl /usr/local/bin/
|
|||
|
||||
### Verification
|
||||
|
||||
Verify `kubectl` version 1.15.3 or higher is installed:
|
||||
Verify `kubectl` version 1.16.2 or higher is installed:
|
||||
|
||||
```
|
||||
kubectl version --client
|
||||
|
@ -114,7 +114,7 @@ kubectl version --client
|
|||
> output
|
||||
|
||||
```
|
||||
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
|
||||
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
|
||||
```
|
||||
|
||||
Next: [Provisioning Compute Resources](03-compute-resources.md)
|
||||
|
|
|
@ -22,15 +22,15 @@ Download the official etcd release binaries from the [etcd](https://github.com/e
|
|||
|
||||
```
|
||||
wget -q --show-progress --https-only --timestamping \
|
||||
"https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz"
|
||||
"https://github.com/etcd-io/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-amd64.tar.gz"
|
||||
```
|
||||
|
||||
Extract and install the `etcd` server and the `etcdctl` command line utility:
|
||||
|
||||
```
|
||||
{
|
||||
tar -xvf etcd-v3.4.0-linux-amd64.tar.gz
|
||||
sudo mv etcd-v3.4.0-linux-amd64/etcd* /usr/local/bin/
|
||||
tar -xvf etcd-v3.4.3-linux-amd64.tar.gz
|
||||
sudo mv etcd-v3.4.3-linux-amd64/etcd* /usr/local/bin/
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ Download the official Kubernetes release binaries:
|
|||
|
||||
```
|
||||
wget -q --show-progress --https-only --timestamping \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kube-apiserver" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kube-controller-manager" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kube-scheduler" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubectl"
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kube-apiserver" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kube-controller-manager" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kube-scheduler" \
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kubectl"
|
||||
```
|
||||
|
||||
Install the Kubernetes binaries:
|
||||
|
@ -126,7 +126,7 @@ Documentation=https://github.com/kubernetes/kubernetes
|
|||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/kube-controller-manager \\
|
||||
--address=0.0.0.0 \\
|
||||
--bind-address=0.0.0.0 \\
|
||||
--cluster-cidr=10.200.0.0/16 \\
|
||||
--cluster-name=kubernetes \\
|
||||
--cluster-signing-cert-file=/var/lib/kubernetes/ca.pem \\
|
||||
|
@ -294,7 +294,7 @@ Create the `system:kube-apiserver-to-kubelet` [ClusterRole](https://kubernetes.i
|
|||
|
||||
```
|
||||
cat <<EOF | kubectl apply --kubeconfig admin.kubeconfig -f -
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
annotations:
|
||||
|
@ -322,7 +322,7 @@ Bind the `system:kube-apiserver-to-kubelet` ClusterRole to the `kubernetes` user
|
|||
|
||||
```
|
||||
cat <<EOF | kubectl apply --kubeconfig admin.kubeconfig -f -
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: system:kube-apiserver
|
||||
|
@ -402,12 +402,12 @@ curl --cacert ca.pem https://${KUBERNETES_PUBLIC_ADDRESS}:6443/version
|
|||
```
|
||||
{
|
||||
"major": "1",
|
||||
"minor": "15",
|
||||
"gitVersion": "v1.15.3",
|
||||
"gitCommit": "2d3c76f9091b6bec110a5e63777c332469e0cba2",
|
||||
"minor": "16",
|
||||
"gitVersion": "v1.16.2",
|
||||
"gitCommit": "c97fe5036ef3df2967d086711e6c0c405941e14b",
|
||||
"gitTreeState": "clean",
|
||||
"buildDate": "2019-08-19T11:05:50Z",
|
||||
"goVersion": "go1.12.9",
|
||||
"buildDate": "2019-10-15T19:09:08Z",
|
||||
"goVersion": "go1.12.10",
|
||||
"compiler": "gc",
|
||||
"platform": "linux/amd64"
|
||||
}
|
||||
|
|
|
@ -49,13 +49,13 @@ sudo swapoff -a
|
|||
|
||||
```
|
||||
wget -q --show-progress --https-only --timestamping \
|
||||
https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.15.0/crictl-v1.15.0-linux-amd64.tar.gz \
|
||||
https://github.com/opencontainers/runc/releases/download/v1.0.0-rc8/runc.amd64 \
|
||||
https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.16.1/crictl-v1.16.1-linux-amd64.tar.gz \
|
||||
https://github.com/opencontainers/runc/releases/download/v1.0.0-rc9/runc.amd64 \
|
||||
https://github.com/containernetworking/plugins/releases/download/v0.8.2/cni-plugins-linux-amd64-v0.8.2.tgz \
|
||||
https://github.com/containerd/containerd/releases/download/v1.2.9/containerd-1.2.9.linux-amd64.tar.gz \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubectl \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kube-proxy \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubelet
|
||||
https://github.com/containerd/containerd/releases/download/v1.3.0/containerd-1.3.0.linux-amd64.tar.gz \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kubectl \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kube-proxy \
|
||||
https://storage.googleapis.com/kubernetes-release/release/v1.16.2/bin/linux/amd64/kubelet
|
||||
```
|
||||
|
||||
Create the installation directories:
|
||||
|
@ -75,8 +75,8 @@ Install the worker binaries:
|
|||
```
|
||||
{
|
||||
mkdir containerd
|
||||
tar -xvf crictl-v1.15.0-linux-amd64.tar.gz
|
||||
tar -xvf containerd-1.2.9.linux-amd64.tar.gz -C containerd
|
||||
tar -xvf crictl-v1.16.1-linux-amd64.tar.gz
|
||||
tar -xvf containerd-1.3.0.linux-amd64.tar.gz -C containerd
|
||||
sudo tar -xvf cni-plugins-linux-amd64-v0.8.2.tgz -C /opt/cni/bin/
|
||||
sudo mv runc.amd64 runc
|
||||
chmod +x crictl kubectl kube-proxy kubelet runc
|
||||
|
@ -305,9 +305,9 @@ gcloud compute ssh controller-0 \
|
|||
|
||||
```
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
worker-0 Ready <none> 15s v1.15.3
|
||||
worker-1 Ready <none> 15s v1.15.3
|
||||
worker-2 Ready <none> 15s v1.15.3
|
||||
worker-0 Ready <none> 15s v1.16.2
|
||||
worker-1 Ready <none> 15s v1.16.2
|
||||
worker-2 Ready <none> 15s v1.16.2
|
||||
```
|
||||
|
||||
Next: [Configuring kubectl for Remote Access](10-configuring-kubectl.md)
|
||||
|
|
|
@ -62,9 +62,9 @@ kubectl get nodes
|
|||
|
||||
```
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
worker-0 Ready <none> 2m9s v1.15.3
|
||||
worker-1 Ready <none> 2m9s v1.15.3
|
||||
worker-2 Ready <none> 2m9s v1.15.3
|
||||
worker-0 Ready <none> 2m9s v1.16.2
|
||||
worker-1 Ready <none> 2m9s v1.16.2
|
||||
worker-2 Ready <none> 2m9s v1.16.2
|
||||
```
|
||||
|
||||
Next: [Provisioning Pod Network Routes](11-pod-network-routes.md)
|
||||
|
|
|
@ -103,7 +103,7 @@ curl --head http://127.0.0.1:8080
|
|||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx/1.17.3
|
||||
Server: nginx/1.17.5
|
||||
Date: Sat, 14 Sep 2019 21:10:11 GMT
|
||||
Content-Type: text/html
|
||||
Content-Length: 612
|
||||
|
@ -151,7 +151,7 @@ kubectl exec -ti $POD_NAME -- nginx -v
|
|||
> output
|
||||
|
||||
```
|
||||
nginx version: nginx/1.17.3
|
||||
nginx version: nginx/1.17.5
|
||||
```
|
||||
|
||||
## Services
|
||||
|
@ -198,7 +198,7 @@ curl -I http://${EXTERNAL_IP}:${NODE_PORT}
|
|||
|
||||
```
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx/1.17.3
|
||||
Server: nginx/1.17.5
|
||||
Date: Sat, 14 Sep 2019 21:12:35 GMT
|
||||
Content-Type: text/html
|
||||
Content-Length: 612
|
||||
|
|
Loading…
Reference in New Issue