Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Restart pod automatically on configmap changes

In GKE is there an automated way to restart pod if the changes in configmap are applied. That way I dont have to restart the pod everytime config is changed/updated?

Solved Solved
1 3 602
1 ACCEPTED SOLUTION

You should try for reloader app thats built by stakater in github. That will definitely help what you are looking for.

View solution in original post

3 REPLIES 3

You should try for reloader app thats built by stakater in github. That will definitely help what you are looking for.

Thank you!

Hi, @indlvdog.

This problem is quite well-known among Kubernetes users but I'm not sure why Kubernetes hasn't added this as a built-in feature yet. You can solve it using Kubernetes annotation objects.

When you change the values in a ConfigMap, the hash value of the file will also change. If the hash changes, the deployment object will be updated as well.

Screenshot 2025-01-31 at 12.37.01 AM.png

Regards,
Mokit

Top Labels in this Space