UPSTREAM: 77947: Fix panic logspam when running kubelet in standalone mode.
@@ -656,7 +656,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
}
klet.runtimeService = runtimeService
- if utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClass) {
+ if utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClass) && kubeDeps.KubeClient != nil {
klet.runtimeClassManager = runtimeclass.NewManager(kubeDeps.KubeClient)
}
