Skaffold dev with slow starting deployments

497 views
Skip to first unread message

Tais P. Hansen

unread,
Oct 23, 2020, 5:10:11 AM10/23/20
to skaffold-users
Hi,

Is there a way to get "skaffold dev" not to quit immediately on a deployment exit due to slow starting deployments?

I have a simple setup with a deployment of the service being developed and a deployment with a backend store. The service won't start as long as it can't connect to the backend store service which takes a few seconds to start. Kubernetes normally just restarts the pod until it connects and runs but skaffold tears everything down on the first exit, making it impossible to use "skaffold dev" without having to add connection retry logic to the service itself.

- Tais

edh

unread,
Oct 23, 2020, 10:22:41 AM10/23/20
to skaffold-users
Hello.

I think you are looking for the config statusCheckDeadlineSeconds: https://skaffold.dev/docs/workflows/ci-cd/

Brian de Alwis

unread,
Oct 23, 2020, 9:33:13 PM10/23/20
to edh, skaffold-users
Another approach is to use an initContainer that waits until it is able to connect to your backend store service (example), or consults the Kubernetes API server and waits until the backend store service has associated pods (link).

Brian.

-- 
You received this message because you are subscribed to the Google Groups "skaffold-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skaffold-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skaffold-users/3015dd26-7591-48f9-a4ee-e8e1394ce4e1n%40googlegroups.com.

Tais P. Hansen

unread,
Oct 27, 2020, 5:46:00 AM10/27/20
to skaffold-users
Thank you for the suggestions.

I am already using statusCheckDeadlineSeconds and it doesn't make skaffold wait if a container exits.

Using an init container may be a viable workaround but I was trying to avoid having to create such workarounds just because of the behaviour of a development tool in the first place. I was hoping for some setting or parameter I had overlooked somewhere.

Running skaffold dev --cleanup=false on the first run followed by the regular skaffold dev usually gets it running.

Brian de Alwis

unread,
Oct 27, 2020, 9:14:14 AM10/27/20
to Tais P. Hansen, skaffold-users
Reply all
Reply to author
Forward
0 new messages