diff --git a/pkg/kubelet/dockershim/docker_container.go b/pkg/kubelet/dockershim/docker_container.go index 054600a267..af69796cd0 100644 --- a/pkg/kubelet/dockershim/docker_container.go +++ b/pkg/kubelet/dockershim/docker_container.go @@ -177,7 +177,10 @@ func (ds *dockerService) CreateContainer(_ context.Context, r *runtimeapi.Create containerID := createResp.ID if cleanupInfo != nil { - // save it for when the container starts or gets removed + // we don't perform the clean up just yet at that could destroy information + // needed for the container to start (e.g. Windows credentials stored in + // registry keys); instead, we'll clean up after the container successfully + // starts or gets removed ds.containerCleanupInfos[containerID] = cleanupInfo } return &runtimeapi.CreateContainerResponse{ContainerId: containerID}, nil