diff --git a/dask_kubernetes/operator/controller/controller.py b/dask_kubernetes/operator/controller/controller.py index f4ab48509..94d9b8833 100644 --- a/dask_kubernetes/operator/controller/controller.py +++ b/dask_kubernetes/operator/controller/controller.py @@ -618,7 +618,10 @@ async def daskworkergroup_replica_update( ), "Deployment cannot have more than 1 replica pod" worker_pod = kube_pods[0] - if worker_pod.status.phase.lower() == "pending": + if ( + worker_pod.status.phase not in ["Running", "ContainerCreating"] + and not await worker.ready() + ): await worker.delete() deleted_workers.append(worker_pod.name)