From 7a91aaa1bccc99c04a5f566a836cd2c94fb6760e Mon Sep 17 00:00:00 2001 From: Urvashi Mohnani Date: Tue, 2 Jun 2020 14:06:31 -0400 Subject: [PATCH] Set the pod-infra-container-image flag in kubelet to ocp pause image By default, kubelet sets the pod-infra-container-image flag to k8s.gcr.io/pause:3.1. The kubelet does an image status call for this image every few minutes and that is why we were seeing the warning logs in cri-o saying this pause image is not found. Overriding the pod-infra-container-image flag here to ensure the image status calls we get from the kubelet is for the ocp pause image. Signed-off-by: Urvashi Mohnani --- templates/master/01-master-kubelet/_base/units/kubelet.yaml | 1 + templates/worker/01-worker-kubelet/_base/units/kubelet.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/master/01-master-kubelet/_base/units/kubelet.yaml b/templates/master/01-master-kubelet/_base/units/kubelet.yaml index 83d602e443..bf6f1f61cf 100644 --- a/templates/master/01-master-kubelet/_base/units/kubelet.yaml +++ b/templates/master/01-master-kubelet/_base/units/kubelet.yaml @@ -32,6 +32,7 @@ contents: | --volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \ {{cloudConfigFlag . }} \ --register-with-taints=node-role.kubernetes.io/master=:NoSchedule \ + --pod-infra-container-image={{.Images.infraImageKey}} \ --v=${KUBELET_LOG_LEVEL} Restart=always diff --git a/templates/worker/01-worker-kubelet/_base/units/kubelet.yaml b/templates/worker/01-worker-kubelet/_base/units/kubelet.yaml index 4930ceb832..41e2dc5bb2 100644 --- a/templates/worker/01-worker-kubelet/_base/units/kubelet.yaml +++ b/templates/worker/01-worker-kubelet/_base/units/kubelet.yaml @@ -31,6 +31,7 @@ contents: | --volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \ --cloud-provider={{cloudProvider .}} \ {{cloudConfigFlag . }} \ + --pod-infra-container-image={{.Images.infraImageKey}} \ --v=${KUBELET_LOG_LEVEL} Restart=always