Topics

Creating a Hook that deletes a Pod


wnatasha@...
 

I was wondering if there was example code that demonstrates a hook (job) that deletes a pod during pre-deletion.
I've tried implementing it myself, but it seems like it never "succeeds" and results in a time-out error, so it never deletes the pod.
I'm using an image and the commands from the software to do uninstallation.

Thank you,
Natasha 


Vic Iglesias
 

Hey Natasha!

I think this is similar to what you are trying to do albeit as a post-delete:


On Wed, Jul 18, 2018 at 10:36 AM <wnatasha@...> wrote:
I was wondering if there was example code that demonstrates a hook (job) that deletes a pod during pre-deletion.
I've tried implementing it myself, but it seems like it never "succeeds" and results in a time-out error, so it never deletes the pod.
I'm using an image and the commands from the software to do uninstallation.

Thank you,
Natasha 



--
Vic Iglesias | Cloud Solutions Architect | viglesias@... | 818-259-1534


wnatasha@...
 

Hey Vic!

It seems through this Job, it's deleting all the jobs that was a part of installing and deleting this chart.

Although similar, I'm still not sure what is wrong with my defined Job. It's very similar to the example you provided. I'm trying to find a way to uninstall an existing pod that is already created (manually). So to uninstall this pod (that contains the program) I was hoping to use a job with the same image that was used to install the pod, and use a command like "___ uninstall" which would uninstall the created pod when creating the Helm chart and upon deleting after it successfully does this.

Thank you,
Natasha