Recurring warnings in kubelet container logs regarding setting volume ownership

Hi folks,

I’m running a Rancher launched cluster on Centos7.7 with Docker 1.13.1. After updating from Rancher 2.2.5 (Kubernetes 1.11.6) to 2.3.5 (Kubernetes 1.17.2), I’m seeing a lot of the warning in kubelet logs like this…

`W0210 22:55:29.835850   12833 volume_linux.go:45] Setting volume ownership for /var/lib/kubelet/pods/8bfcd32c-bea6-418e-a9cd-a80aae662aab/volumes/kubernetes.io~secret/exporter-kube-state-cluster-monitoring-token-624mh and fsGroup set. If the volume has a lot of files then setting volume ownership could be slow, see https://github.com/kubernetes/kubernetes/issues/69699`

These log entries are spammed at roughly 70 second intervals indefinitely. They’re logged for every configmap or secret volume mounted in pods where fsGroup is set.

Has anyone else experienced this? Any help would be appreciated.

Thanks.

I’m seeing the same thing here, but I’m not even using rancher (just a straight kubeadm init installation, on a baremetal Debian bullseye host).

Thanks for the reply. I’ve since updated a couple of other clusters 1.16.x to 1.17.2 on nodes running RancherOS and seeing the same logs on all of them. Seems like it might just be superfluous logging introduced in 1.17.

I believe this is related to kubernetes when you use fsGroup.

kubernetes v1.18 adds this new ability to control how kubelet handles chowning a volume --> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods