Reputation: 749
I have a service, which I would like to get data from a database. But because the schematics sometimes can change, I need a way to ensure, that I can migrate it, and quickly have the service's new version up and running, and not first running the startup-probe and the the readiness-probe.
One way I solved this was adding a bit more to the readiness-probe, so it keeps asking "is the database the correct migration?", and then run a Job
which just migrates.
This has a potential issue in that I only ask the readiness-probe every 10 seconds, and I can get just below a 10 seconds time gap where it will not activate (and the old service doesn't die, and potential asks bad requests into the new schematic).
Can I do a type of init-container, or let the Job
trigger an action in kubctl
, that starts the new service directly?
Upvotes: 0
Views: 51