diff --git a/dask_kubernetes/core.py b/dask_kubernetes/core.py
index <HASH>..<HASH> 100644
--- a/dask_kubernetes/core.py
+++ b/dask_kubernetes/core.py
@@ -87,8 +87,8 @@ class Pod(ProcessInterface):
                     raise e
 
     async def close(self, **kwargs):
-        name, namespace = self._pod.metadata.name, self.namespace
         if self._pod:
+            name, namespace = self._pod.metadata.name, self.namespace
             try:
                 await self.core_api.delete_namespaced_pod(name, namespace)
             except ApiException as e:
ensure Pod.close() succeeds when pod has already been removed (#<I>)