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?

1 Like

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

1 Like

Thank you!

1 Like

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.

Regards,
Mokit

2 Likes