Rollback when timeout

I’m looking for how to rollback a k8s deploy when timeout happen. I’m using Jenkins for CICD. I want to prevent deploy with typos or something like that in resource configs. If there’s a way to verify all the configs (templates and charts) before the deploy step please tell me.

Have you taken a look at Kubeval?

You can run validation against the K8s configs by running the command kubeval --strict myfile.yaml. It’s pretty snazzy :slight_smile:

Another option can be using kubectl’s dry-run mode (–dry-run, --server-dry-run).

Thanks @tomasz.prus, with the flag --dry-run kubernetes or helm validate my templates for me.