carvel-dev / kapp

kapp is a simple deployment tool focused on the concept of "Kubernetes application" — a set of resources with the same label
https://carvel.dev/kapp
Apache License 2.0
907 stars 108 forks source link

Deployment not progressing #1020

Open antwacky opened 1 day ago

antwacky commented 1 day ago

I'm just wondering what the expected next step is when a deployment fails with the 'deployment not progressing' error.

I get this error when a deployment pod is continually crashing from a previous Kapp deployment and needs a change to bring it back to life.

I expected that once I ran a new Kapp deployment (with an updated config map for the pod, that should resolve the issue) that Kapp would update the config map, and the deployment would then restart.

As it is, Kapp exits immediately complaining that the deployment is not progressing.

What is the recommended approach in this situation?

praveenrewar commented 1 day ago

Hey @antwacky! Could you share the deploy output that you are seeing? And could you share what you mean when you say "an updated config map for the pod", how was this change applied?

antwacky commented 1 day ago

Hi, thanks for the reply. I get the below error:

kapp: Error: waiting on reconcile deployment/app-service (apps/v1) namespace: my-apps:
  Finished unsuccessfully (Deployment is not progressing: ProgressDeadlineExceeded (message: ReplicaSet "app-service-58586c5c4b" has timed out progressing.))

The deployment mentioned in the output is in CrashLoopBackOff because the ConfigMap from which it reads it's configuration is incorrect.

I then update the applications ConfigMap manifest, and run the kapp deploy again and get the same error straight away.

I expected kapp to update the ConfigMap inline with the changes, then the deployment to restart.

Hope that makes sense!

praveenrewar commented 1 day ago

Could you share how the ConfigMap is being referenced by the Deployment? You might be looking for versioned resources, once you add a versioned annotation to the ConfigMap, whenever it is updated, it will also updated the Deployment and you will see kapp updating the Deployment after updating the ConfigMap.