How can you modify your application to ensure a graceful shutdown during a deployment update in Google Kubernetes Engine, particularly to properly close database connections before termination? | Google Professional Cloud Developer Quiz - LeetQuiz