update versions
parent
529a944468
commit
209a9197e1
|
@ -54,7 +54,7 @@ cfssl version
|
||||||
|
|
||||||
```
|
```
|
||||||
Version: 1.6.4
|
Version: 1.6.4
|
||||||
Runtime: go1.18
|
Runtime: go1.20.3
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -65,7 +65,7 @@ cfssljson --version
|
||||||
|
|
||||||
```
|
```
|
||||||
Version: 1.6.4
|
Version: 1.6.4
|
||||||
Runtime: go1.18
|
Runtime: go1.20.3
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install kubectl
|
## Install kubectl
|
||||||
|
@ -76,7 +76,7 @@ The `kubectl` command line utility is used to interact with the Kubernetes API S
|
||||||
|
|
||||||
```
|
```
|
||||||
curl --location --remote-name --time-cond kubectl \
|
curl --location --remote-name --time-cond kubectl \
|
||||||
"https://dl.k8s.io/release/v1.27.4/bin/darwin/${ARCH}/kubectl"
|
"https://dl.k8s.io/release/v1.29.1/bin/darwin/${ARCH}/kubectl"
|
||||||
|
|
||||||
chmod +x kubectl
|
chmod +x kubectl
|
||||||
|
|
||||||
|
@ -87,24 +87,24 @@ sudo mv kubectl /usr/local/bin/
|
||||||
|
|
||||||
```
|
```
|
||||||
curl --location --remote-name --time-cond kubectl \
|
curl --location --remote-name --time-cond kubectl \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kubectl
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kubectl
|
||||||
|
|
||||||
sudo install --mode 0755 kubectl /usr/local/bin/
|
sudo install --mode 0755 kubectl /usr/local/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
|
|
||||||
Verify `kubectl` version 1.27.4 or higher is installed:
|
Verify `kubectl` version 1.29.1 or higher is installed:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl version --client --short
|
kubectl version --client
|
||||||
```
|
```
|
||||||
|
|
||||||
> output
|
> output
|
||||||
|
|
||||||
```
|
```
|
||||||
Client Version: v1.27.4
|
Client Version: v1.29.1
|
||||||
Kustomize Version: v5.0.1
|
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
|
||||||
```
|
```
|
||||||
|
|
||||||
Next: [Provisioning Compute Resources](./03-compute-resources.md)
|
Next: [Provisioning Compute Resources](./03-compute-resources.md)
|
||||||
|
|
|
@ -21,16 +21,16 @@ gcloud compute ssh controller-0
|
||||||
Download the official etcd release binaries from the [etcd](https://github.com/etcd-io/etcd) GitHub project:
|
Download the official etcd release binaries from the [etcd](https://github.com/etcd-io/etcd) GitHub project:
|
||||||
|
|
||||||
```
|
```
|
||||||
curl --location --remote-name --time-cond etcd-v3.5.9-linux-amd64.tar.gz \
|
curl --location --remote-name --time-cond etcd-v3.5.12-linux-amd64.tar.gz \
|
||||||
https://github.com/etcd-io/etcd/releases/download/v3.5.9/etcd-v3.5.9-linux-amd64.tar.gz
|
https://github.com/etcd-io/etcd/releases/download/v3.5.12/etcd-v3.5.12-linux-amd64.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract and install the `etcd` server and the `etcdctl` command line utility:
|
Extract and install the `etcd` server and the `etcdctl` command line utility:
|
||||||
|
|
||||||
```
|
```
|
||||||
tar --extract --file etcd-v3.5.9-linux-amd64.tar.gz --verbose
|
tar --extract --file etcd-v3.5.12-linux-amd64.tar.gz --verbose
|
||||||
|
|
||||||
sudo cp etcd-v3.5.9-linux-amd64/etcd* /usr/local/bin/
|
sudo cp etcd-v3.5.12-linux-amd64/etcd* /usr/local/bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configure the etcd Server
|
### Configure the etcd Server
|
||||||
|
|
|
@ -29,13 +29,13 @@ Download the official Kubernetes release binaries:
|
||||||
```
|
```
|
||||||
curl --location \
|
curl --location \
|
||||||
--remote-name --time-cond kube-apiserver \
|
--remote-name --time-cond kube-apiserver \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kube-apiserver \
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kube-apiserver \
|
||||||
--remote-name --time-cond kube-controller-manager \
|
--remote-name --time-cond kube-controller-manager \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kube-controller-manager \
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kube-controller-manager \
|
||||||
--remote-name --time-cond kube-scheduler \
|
--remote-name --time-cond kube-scheduler \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kube-scheduler \
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kube-scheduler \
|
||||||
--remote-name --time-cond kubectl \
|
--remote-name --time-cond kubectl \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kubectl
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kubectl
|
||||||
```
|
```
|
||||||
|
|
||||||
Install the Kubernetes binaries:
|
Install the Kubernetes binaries:
|
||||||
|
@ -394,12 +394,12 @@ curl --cacert ca.pem "https://${KUBERNETES_PUBLIC_ADDRESS}:6443/version"
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"major": "1",
|
"major": "1",
|
||||||
"minor": "27",
|
"minor": "29",
|
||||||
"gitVersion": "v1.27.4",
|
"gitVersion": "v1.29.1",
|
||||||
"gitCommit": "fa3d7990104d7c1f16943a67f11b154b71f6a132",
|
"gitCommit": "bc401b91f2782410b3fb3f9acf43a995c4de90d2",
|
||||||
"gitTreeState": "clean",
|
"gitTreeState": "clean",
|
||||||
"buildDate": "2023-07-19T12:14:49Z",
|
"buildDate": "2024-01-17T15:41:12Z",
|
||||||
"goVersion": "go1.20.6",
|
"goVersion": "go1.21.6",
|
||||||
"compiler": "gc",
|
"compiler": "gc",
|
||||||
"platform": "linux/amd64"
|
"platform": "linux/amd64"
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,22 +48,22 @@ sudo swapoff --all
|
||||||
|
|
||||||
```
|
```
|
||||||
curl --location \
|
curl --location \
|
||||||
--remote-name --time-cond containerd-1.7.3-linux-amd64.tar.gz \
|
--remote-name --time-cond containerd-1.7.13-linux-amd64.tar.gz \
|
||||||
https://github.com/containerd/containerd/releases/download/v1.7.3/containerd-1.7.3-linux-amd64.tar.gz \
|
https://github.com/containerd/containerd/releases/download/v1.7.13/containerd-1.7.13-linux-amd64.tar.gz \
|
||||||
--remote-name --time-cond containerd.service \
|
--remote-name --time-cond containerd.service \
|
||||||
https://raw.githubusercontent.com/containerd/containerd/v1.7.3/containerd.service \
|
https://raw.githubusercontent.com/containerd/containerd/v1.7.13/containerd.service \
|
||||||
--output runc --time-cond runc \
|
--output runc --time-cond runc \
|
||||||
https://github.com/opencontainers/runc/releases/download/v1.1.8/runc.amd64 \
|
https://github.com/opencontainers/runc/releases/download/v1.1.12/runc.amd64 \
|
||||||
--remote-name --time-cond cni-plugins-linux-amd64-v1.3.0.tgz \
|
--remote-name --time-cond cni-plugins-linux-amd64-v1.4.0.tgz \
|
||||||
https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz \
|
https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz \
|
||||||
--remote-name --time-cond crictl-v1.27.1-linux-amd64.tar.gz \
|
--remote-name --time-cond crictl-v1.29.0-linux-amd64.tar.gz \
|
||||||
https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.27.1/crictl-v1.27.1-linux-amd64.tar.gz \
|
https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.29.0/crictl-v1.29.0-linux-amd64.tar.gz \
|
||||||
--remote-name --time-cond kube-proxy \
|
--remote-name --time-cond kube-proxy \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kube-proxy \
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kube-proxy \
|
||||||
--remote-name --time-cond kubectl \
|
--remote-name --time-cond kubectl \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kubectl \
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kubectl \
|
||||||
--remote-name --time-cond kubelet \
|
--remote-name --time-cond kubelet \
|
||||||
https://dl.k8s.io/release/v1.27.4/bin/linux/amd64/kubelet
|
https://dl.k8s.io/release/v1.29.1/bin/linux/amd64/kubelet
|
||||||
```
|
```
|
||||||
|
|
||||||
Create the installation directories:
|
Create the installation directories:
|
||||||
|
@ -82,7 +82,7 @@ Install the worker binaries:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo tar --directory /usr/local/ --extract \
|
sudo tar --directory /usr/local/ --extract \
|
||||||
--file containerd-1.7.3-linux-amd64.tar.gz --gunzip --verbose
|
--file containerd-1.7.13-linux-amd64.tar.gz --gunzip --verbose
|
||||||
|
|
||||||
sudo mkdir --parents /usr/local/lib/systemd/system
|
sudo mkdir --parents /usr/local/lib/systemd/system
|
||||||
|
|
||||||
|
@ -90,10 +90,10 @@ sudo cp containerd.service /usr/local/lib/systemd/system/
|
||||||
|
|
||||||
sudo install --mode 0755 runc /usr/local/sbin/
|
sudo install --mode 0755 runc /usr/local/sbin/
|
||||||
|
|
||||||
tar --extract --file crictl-v1.27.1-linux-amd64.tar.gz --gunzip --verbose
|
tar --extract --file crictl-v1.29.0-linux-amd64.tar.gz --gunzip --verbose
|
||||||
|
|
||||||
sudo tar --directory /opt/cni/bin/ --extract \
|
sudo tar --directory /opt/cni/bin/ --extract \
|
||||||
--file cni-plugins-linux-amd64-v1.3.0.tgz --gunzip --verbose
|
--file cni-plugins-linux-amd64-v1.4.0.tgz --gunzip --verbose
|
||||||
|
|
||||||
sudo install --mode 0755 crictl kube-proxy kubectl kubelet /usr/local/bin/
|
sudo install --mode 0755 crictl kube-proxy kubectl kubelet /usr/local/bin/
|
||||||
```
|
```
|
||||||
|
@ -277,9 +277,9 @@ gcloud compute ssh controller-0 \
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME STATUS ROLES AGE VERSION
|
NAME STATUS ROLES AGE VERSION
|
||||||
worker-0 Ready <none> 37s v1.27.4
|
worker-0 Ready <none> 37s v1.29.1
|
||||||
worker-1 Ready <none> 37s v1.27.4
|
worker-1 Ready <none> 37s v1.29.1
|
||||||
worker-2 Ready <none> 37s v1.27.4
|
worker-2 Ready <none> 37s v1.29.1
|
||||||
```
|
```
|
||||||
|
|
||||||
Next: [Configuring kubectl for Remote Access](./10-configuring-kubectl.md)
|
Next: [Configuring kubectl for Remote Access](./10-configuring-kubectl.md)
|
||||||
|
|
|
@ -41,9 +41,9 @@ kubectl version --short
|
||||||
> output
|
> output
|
||||||
|
|
||||||
```
|
```
|
||||||
Client Version: v1.27.4
|
Client Version: v1.29.1
|
||||||
Kustomize Version: v5.0.1
|
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
|
||||||
Server Version: v1.27.4
|
Server Version: v1.29.1
|
||||||
```
|
```
|
||||||
|
|
||||||
List the nodes in the remote Kubernetes cluster:
|
List the nodes in the remote Kubernetes cluster:
|
||||||
|
@ -56,9 +56,9 @@ kubectl get nodes
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME STATUS ROLES AGE VERSION
|
NAME STATUS ROLES AGE VERSION
|
||||||
worker-0 Ready <none> 5m38s v1.27.4
|
worker-0 Ready <none> 5m38s v1.29.1
|
||||||
worker-1 Ready <none> 5m38s v1.27.4
|
worker-1 Ready <none> 5m38s v1.29.1
|
||||||
worker-2 Ready <none> 5m38s v1.27.4
|
worker-2 Ready <none> 5m38s v1.29.1
|
||||||
```
|
```
|
||||||
|
|
||||||
Next: [Provisioning Pod Network Routes](./11-pod-network-routes.md)
|
Next: [Provisioning Pod Network Routes](./11-pod-network-routes.md)
|
||||||
|
|
|
@ -7,7 +7,7 @@ In this lab you will deploy the [DNS add-on](https://kubernetes.io/docs/concepts
|
||||||
Deploy the `coredns` cluster add-on:
|
Deploy the `coredns` cluster add-on:
|
||||||
|
|
||||||
```
|
```
|
||||||
kubectl apply --filename ./manifests/coredns-1.10.1.yaml
|
kubectl apply --filename ./manifests/coredns-1.11.1.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
> output
|
> output
|
||||||
|
|
|
@ -1,187 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: coredns
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
kubernetes.io/bootstrapping: rbac-defaults
|
|
||||||
name: system:coredns
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- endpoints
|
|
||||||
- services
|
|
||||||
- pods
|
|
||||||
- namespaces
|
|
||||||
verbs:
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- discovery.k8s.io
|
|
||||||
resources:
|
|
||||||
- endpointslices
|
|
||||||
verbs:
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
rbac.authorization.kubernetes.io/autoupdate: "true"
|
|
||||||
labels:
|
|
||||||
kubernetes.io/bootstrapping: rbac-defaults
|
|
||||||
name: system:coredns
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: system:coredns
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: coredns
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: coredns
|
|
||||||
namespace: kube-system
|
|
||||||
data:
|
|
||||||
Corefile: |-
|
|
||||||
.:53 {
|
|
||||||
errors
|
|
||||||
health {
|
|
||||||
lameduck 5s
|
|
||||||
}
|
|
||||||
ready
|
|
||||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
|
||||||
pods insecure
|
|
||||||
fallthrough in-addr.arpa ip6.arpa
|
|
||||||
ttl 30
|
|
||||||
}
|
|
||||||
prometheus 0.0.0.0:9153
|
|
||||||
forward . /etc/resolv.conf
|
|
||||||
cache 30
|
|
||||||
loop
|
|
||||||
reload
|
|
||||||
loadbalance
|
|
||||||
}
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
prometheus.io/port: "9153"
|
|
||||||
prometheus.io/scrape: "true"
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
kubernetes.io/cluster-service: "true"
|
|
||||||
kubernetes.io/name: "CoreDNS"
|
|
||||||
name: kube-dns
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
clusterIP: 10.32.0.10
|
|
||||||
ports:
|
|
||||||
- name: dns-udp
|
|
||||||
port: 53
|
|
||||||
protocol: UDP
|
|
||||||
- name: dns-tcp
|
|
||||||
port: 53
|
|
||||||
protocol: TCP
|
|
||||||
- name: metrics
|
|
||||||
port: 9153
|
|
||||||
protocol: TCP
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
kubernetes.io/name: "CoreDNS"
|
|
||||||
name: coredns
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
replicas: 2
|
|
||||||
strategy:
|
|
||||||
type: RollingUpdate
|
|
||||||
rollingUpdate:
|
|
||||||
maxUnavailable: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- args: [ "-conf", "/etc/coredns/Corefile" ]
|
|
||||||
image: coredns/coredns:1.10.1
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: 8080
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 60
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 5
|
|
||||||
name: coredns
|
|
||||||
ports:
|
|
||||||
- containerPort: 53
|
|
||||||
name: dns-udp
|
|
||||||
protocol: UDP
|
|
||||||
- containerPort: 53
|
|
||||||
name: dns-tcp
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 9153
|
|
||||||
name: metrics
|
|
||||||
protocol: TCP
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /ready
|
|
||||||
port: 8181
|
|
||||||
scheme: HTTP
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
securityContext:
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
capabilities:
|
|
||||||
add:
|
|
||||||
- NET_BIND_SERVICE
|
|
||||||
drop:
|
|
||||||
- all
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
volumeMounts:
|
|
||||||
- name: config-volume
|
|
||||||
mountPath: /etc/coredns
|
|
||||||
readOnly: true
|
|
||||||
dnsPolicy: Default
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/os: linux
|
|
||||||
priorityClassName: system-cluster-critical
|
|
||||||
serviceAccountName: coredns
|
|
||||||
tolerations:
|
|
||||||
- key: "CriticalAddonsOnly"
|
|
||||||
operator: "Exists"
|
|
||||||
volumes:
|
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: coredns
|
|
||||||
items:
|
|
||||||
- key: Corefile
|
|
||||||
path: Corefile
|
|
Loading…
Reference in New Issue