I am currently trying to find out if this is a bug but I had cloned a working Kubernetes project (with one deploy step) in Octopus Deploy and then changed the step to use the names of a different pod. However, afterwards when deploying either project, it would deploy and then delete the previous deployment, whichever of the two projects that happened to be.

 I always thought K8S identified deployments by name but the names are dynamically generated by Octopus in this case so that didn't (obviously) explain why these projects thought they were the same thing. I wondered if Octopus is keeping track of the history and explicitly deleting deployments?

The only clue currently is that the Octopus Step Id annotation was the same for both projects, even though all the other names, labels, annotations etc. were not.

What I did was delete the cloned step and re-created it manually by copying back in the new projects config. Once I had done this, the Step Id was different but more importantly, deploying the projects did not cause the other one to be deleted!