diff --git a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/PodTemplateStepExecution.java b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/PodTemplateStepExecution.java index 8a62cb4ec3..ff13a06ee6 100755 --- a/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/PodTemplateStepExecution.java +++ b/src/main/java/org/csanchez/jenkins/plugins/kubernetes/pipeline/PodTemplateStepExecution.java @@ -130,6 +130,7 @@ protected void finished(StepContext context) throws Exception { if (cloud instanceof KubernetesCloud) { KubernetesCloud kubernetesCloud = (KubernetesCloud) cloud; kubernetesCloud.removeTemplate(podTemplate); + kubernetesCloud.connect().pods().withName(podTemplate.getName()).delete(); } } }