diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 8db4ab4b459..968df18e431 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -131,6 +131,12 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) { return defaultFirstID, defaultLen, nil } + // We NEED to check for the user because getsubids can be configured to gather the response + // with a remote call and we can't distinguish between the remote endpoint not being reachable + // and the remote endpoint is reachable but no entry is present for the user. + // So we check for the kubelet user first, if it exist and getsubids is present, we expect + // to get _some_ configuration. If the user exist and getsubids doesn't give us any + // configuration, then we consider the remote down and fail to start the kubelet. _, err := user.Lookup(kubeletUser) if err != nil { var unknownUserErr user.UnknownUserError