Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1567 from kinvolk/imran/update-k8s-to-1.21.3
Browse files Browse the repository at this point in the history
Update k8s to 1.21.4
  • Loading branch information
ipochi authored Sep 10, 2021
2 parents 0155993 + 2934db7 commit c45346f
Show file tree
Hide file tree
Showing 26 changed files with 59 additions and 139 deletions.
2 changes: 1 addition & 1 deletion assets/charts/control-plane/kube-apiserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.4
appVersion: v1.21.1
appVersion: v1.21.4
2 changes: 1 addition & 1 deletion assets/charts/control-plane/kube-apiserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apiserver:
aggregationCaCert:
aggregationClientCert:
aggregationClientKey:
image: k8s.gcr.io/kube-apiserver:v1.21.1
image: k8s.gcr.io/kube-apiserver:v1.21.4
cloudProvider:
etcdServers:
aggregationFlags:
Expand Down
2 changes: 1 addition & 1 deletion assets/charts/control-plane/kubelet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.4
appVersion: v1.21.1
appVersion: v1.21.4

This file was deleted.

65 changes: 3 additions & 62 deletions assets/charts/control-plane/kubelet/container-image/README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,6 @@
# Lokomotive Kubelet Image

This image is built on top of the Typhoon Kubelet image. This image includes a wrapper script that runs `isciadm` in the host namespace. This ensures that all the `isciadm` libraries are loaded from the host.
To build a new Kubelet image for Lokomotive create PR against the `kinvolk-master` branch in the repository
https://github.com/kinvolk/kubelet and follow the instructions in the
[README](https://github.com/kinvolk/kubelet/blob/kinvolk-master/README.md#build-image)

We also use `sed` and `bash` of the image to run the `ca-syncer` init container.

## Updating Image Tag

In this directory run the following command to update the Kubernetes version:

```bash
export NEW_VERSION=
```

```bash
export CURRENT_VERSION=$(grep ^FROM Dockerfile | cut -d":" -f2)
sed -i "s|$CURRENT_VERSION|$NEW_VERSION|g" Dockerfile
```

## Building Image

```bash
export IMAGE_URL=quay.io/kinvolk/kubelet
```

### x86

```bash
export ARCH=amd64

docker build -t $IMAGE_URL:$NEW_VERSION-$ARCH . && docker push $IMAGE_URL:$NEW_VERSION-$ARCH
```

### ARM

```bash
export ARCH=arm64

docker build -t $IMAGE_URL:$NEW_VERSION-$ARCH . && docker push $IMAGE_URL:$NEW_VERSION-$ARCH
```

### Combined image tag

Now make sure you have `"experimental": "enabled"` in your
`~/.docker/config.json` (surrounded by `{` and `}` if the file is otherwise
empty).

When all images are built on the respective architectures and pushed they can
be combined through a manifest to build a multiarch image:

```bash
docker manifest create $IMAGE_URL:$NEW_VERSION \
--amend $IMAGE_URL:$NEW_VERSION-amd64 \
--amend $IMAGE_URL:$NEW_VERSION-arm64

docker manifest annotate $IMAGE_URL:$NEW_VERSION \
$IMAGE_URL:$NEW_VERSION-amd64 --arch=amd64 --os=linux

docker manifest annotate $IMAGE_URL:$NEW_VERSION \
$IMAGE_URL:$NEW_VERSION-arm64 --arch=arm64 --os=linux

docker manifest push $IMAGE_URL:$NEW_VERSION
```

> **NOTE**: Above commands can be run from any machine.
2 changes: 0 additions & 2 deletions assets/charts/control-plane/kubelet/container-image/iscsiadm

This file was deleted.

2 changes: 1 addition & 1 deletion assets/charts/control-plane/kubelet/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: quay.io/kinvolk/kubelet:v1.21.1
image: quay.io/kinvolk/kubelet:v1.21.4
clusterDNS: 10.0.0.10
clusterDomain: cluster.local
enableTLSBootstrap: true
Expand Down
2 changes: 1 addition & 1 deletion assets/charts/control-plane/kubernetes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.4
appVersion: v1.21.1
appVersion: v1.21.4
6 changes: 3 additions & 3 deletions assets/charts/control-plane/kubernetes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ controllerManager:
serviceAccountKey:
caCert:
caKey:
image: k8s.gcr.io/kube-controller-manager:v1.21.1
image: k8s.gcr.io/kube-controller-manager:v1.21.4
cloudProvider:
serviceCIDR: 10.0.0.0/24
podCIDR: 10.2.0.0/16
controlPlaneReplicas: 1
trustedCertsDir: /usr/share/ca-certificates
kubeProxy:
image: k8s.gcr.io/kube-proxy:v1.21.1
image: k8s.gcr.io/kube-proxy:v1.21.4
podCIDR: 10.2.0.0/16
trustedCertsDir: /usr/share/ca-certificates
conntrackMaxPerCore: 32768
kubeScheduler:
image: k8s.gcr.io/kube-scheduler:v1.21.1
image: k8s.gcr.io/kube-scheduler:v1.21.4
controlPlaneReplicas: 1
kubeConfigInCluster:
server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
NODE_LABELS="node.kubernetes.io/master,node.kubernetes.io/controller=true"
NODE_TAINTS="node-role.kubernetes.io/master=:NoSchedule"
- path: /etc/kubernetes/etcd.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
NODE_LABELS="${join(",", [for k, v in node_labels : "${k}=${v}"])}"
NODE_TAINTS="${join(",", [for k, v in taints : "${k}=${v}"])}"
- path: /etc/sysctl.d/max-user-watches.conf
Expand Down Expand Up @@ -160,7 +160,7 @@ storage:
-v /etc/kubernetes:/etc/kubernetes:ro \
-v /var/lib/kubelet:/var/lib/kubelet:ro \
--entrypoint=/usr/local/bin/kubectl \
quay.io/kinvolk/kubelet:v1.21.1 \
quay.io/kinvolk/kubelet:v1.21.4 \
%{~ if enable_tls_bootstrap ~}
--kubeconfig=/var/lib/kubelet/kubeconfig delete node $(hostname)
%{~ else ~}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/master,node.kubernetes.io/controller=true"
NODE_TAINTS="node-role.kubernetes.io/master=:NoSchedule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/node"
- path: /etc/sysctl.d/max-user-watches.conf
Expand All @@ -126,7 +126,7 @@ storage:
--volume config,kind=host,source=/etc/kubernetes \
--mount volume=config,target=/etc/kubernetes \
--insecure-options=image \
docker://quay.io/kinvolk/kubelet:v1.21.1 \
docker://quay.io/kinvolk/kubelet:v1.21.4 \
--net=host \
--dns=host \
-- \
Expand Down
10 changes: 5 additions & 5 deletions assets/terraform-modules/bootkube/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ variable "container_images" {
calico_cni = "quay.io/kinvolk/calico-cni:v3.19.1"
calico_controllers = "quay.io/kinvolk/calico-kube-controllers:v3.19.1"
flexvol_driver_image = "quay.io/kinvolk/calico-pod2daemon-flexvol:v3.19.1"
kubelet_image = "quay.io/kinvolk/kubelet:v1.21.1"
kubelet_image = "quay.io/kinvolk/kubelet:v1.21.4"
coredns = "quay.io/kinvolk/coredns:1.8.0"
pod_checkpointer = "quay.io/kinvolk/checkpoint:43ec4b414e44f202e07bf43e57d2b5ffbcfd4415"
kube_apiserver = "k8s.gcr.io/kube-apiserver:v1.21.1"
kube_controller_manager = "k8s.gcr.io/kube-controller-manager:v1.21.1"
kube_scheduler = "k8s.gcr.io/kube-scheduler:v1.21.1"
kube_proxy = "k8s.gcr.io/kube-proxy:v1.21.1"
kube_apiserver = "k8s.gcr.io/kube-apiserver:v1.21.4"
kube_controller_manager = "k8s.gcr.io/kube-controller-manager:v1.21.4"
kube_scheduler = "k8s.gcr.io/kube-scheduler:v1.21.4"
kube_proxy = "k8s.gcr.io/kube-proxy:v1.21.4"
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/terraform-modules/controller/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ variable "kubelet_image_name" {
variable "kubelet_image_tag" {
type = string
description = "Tag for kubelet Docker image."
default = "v1.21.1"
default = "v1.21.4"
}

variable "set_standard_hostname" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1-${os_arch}
KUBELET_IMAGE_TAG=v1.21.4-${os_arch}
NODE_LABELS="node.kubernetes.io/master,node.kubernetes.io/controller=true"
NODE_TAINTS="node-role.kubernetes.io/master=:NoSchedule"
- path: /etc/kubernetes/etcd.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1-${os_arch}
KUBELET_IMAGE_TAG=v1.21.4-${os_arch}
NODE_LABELS="${join(",", [for k, v in node_labels : "${k}=${v}"])}"
NODE_TAINTS="${join(",", [for k, v in taints : "${k}=${v}"])}"
- path: /etc/sysctl.d/max-user-watches.conf
Expand All @@ -315,7 +315,7 @@ storage:
-v /etc/kubernetes:/etc/kubernetes:ro \
-v /var/lib/kubelet:/var/lib/kubelet:ro \
--entrypoint=/usr/local/bin/kubectl \
quay.io/kinvolk/kubelet:v1.21.1-${os_arch} \
quay.io/kinvolk/kubelet:v1.21.4-${os_arch} \
%{~ if enable_tls_bootstrap ~}
--kubeconfig=/var/lib/kubelet/kubeconfig delete node $(hostname)
%{~ else ~}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/master,node.kubernetes.io/controller=true"
NODE_TAINTS="node-role.kubernetes.io/master=:NoSchedule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/node"
- path: /etc/sysctl.d/max-user-watches.conf
Expand All @@ -120,7 +120,7 @@ storage:
--volume config,kind=host,source=/etc/kubernetes \
--mount volume=config,target=/etc/kubernetes \
--insecure-options=image \
docker://quay.io/kinvolk/kubelet:v1.21.1 \
docker://quay.io/kinvolk/kubelet:v1.21.4 \
--net=host \
--dns=host \
-- \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/master,node.kubernetes.io/controller=true"
NODE_TAINTS="node-role.kubernetes.io/master=:NoSchedule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ storage:
contents:
inline: |
KUBELET_IMAGE_URL=docker://quay.io/kinvolk/kubelet
KUBELET_IMAGE_TAG=v1.21.1
KUBELET_IMAGE_TAG=v1.21.4
KUBELET_IMAGE_ARGS="--exec=/usr/local/bin/kubelet"
NODE_LABELS="node.kubernetes.io/node"
- path: /etc/sysctl.d/max-user-watches.conf
Expand Down Expand Up @@ -148,7 +148,7 @@ storage:
--volume config,kind=host,source=/etc/kubernetes \
--mount volume=config,target=/etc/kubernetes \
--insecure-options=image \
docker://quay.io/kinvolk/kubelet:v1.21.1 \
docker://quay.io/kinvolk/kubelet:v1.21.4 \
--net=host \
--dns=host \
-- \
Expand Down
2 changes: 1 addition & 1 deletion assets/terraform-modules/node/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "kubelet_image_name" {
variable "kubelet_image_tag" {
type = string
description = "Tag for kubelet Docker image."
default = "v1.21.1"
default = "v1.21.4"
}

variable "kubelet_taints" {
Expand Down
2 changes: 1 addition & 1 deletion assets/terraform-modules/worker/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "kubelet_image_name" {
variable "kubelet_image_tag" {
type = string
description = "Tag for kubelet Docker image."
default = "v1.21.1"
default = "v1.21.4"
}

variable "kubelet_taints" {
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/troubleshoot-openebs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fix.
#### Step 1.1: Update the image

```bash
kubectl -n kube-system set image ds kubelet kubelet=quay.io/kinvolk/kubelet:v1.21.1
kubectl -n kube-system set image ds kubelet kubelet=quay.io/kinvolk/kubelet:v1.21.4
```

#### Step 1.2: Remove the iSCSI mount
Expand Down Expand Up @@ -85,7 +85,7 @@ sed -i '/iscsiadm/d' /etc/systemd/system/kubelet.service
- Run the following commands to update the kubelet version:

```bash
export latest_kubelet_version=v1.21.1
export latest_kubelet_version=v1.21.4
sed -i "s|.*KUBELET_IMAGE_TAG.*|KUBELET_IMAGE_TAG=${latest_kubelet_version}|g" /etc/kubernetes/kubelet.env
```

Expand Down
Loading

0 comments on commit c45346f

Please sign in to comment.