Skip to content

Commit 41ccf4c

Browse files
committed
Don't create a RuntimeClassManager without a KubeClient
1 parent 08afeb8 commit 41ccf4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubelet/kubelet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
656656
}
657657
klet.runtimeService = runtimeService
658658

659-
if utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClass) {
659+
if utilfeature.DefaultFeatureGate.Enabled(features.RuntimeClass) && kubeDeps.KubeClient != nil {
660660
klet.runtimeClassManager = runtimeclass.NewManager(kubeDeps.KubeClient)
661661
}
662662

0 commit comments

Comments
 (0)