Is there any other way to update the config map for deployment without having to restart the pod?

+1 vote
How do i update the config map without restarting the kubernetes pod?
Jul 19 in Kubernetes by Namik
• 1,210 points
157 views

1 answer to this question.

0 votes
  • Well, you need to have some way of triggering the reload. 

  • Either do a check every minute or have a reload endpoint for an API or project the configmap as a volume, could use inotify to be aware of the change. 

  • It depends on how the configmap is consumed by the container. If env vars, then no. If a volumeMount, then the file is updated in the container ready to be consumed by the service but it needs to reload the file.

  • The container does not restart. if the configmap is mounted as a volume it is updated dynamically. if it is an environment variable it stays as the old value until the container is restarted.volume mount the configmap into the pod, the projected file is updated periodically. NOT realtime. then have the app recognise if the config on disk has changed and reload.

answered Jul 19 by Sirajul
• 40,980 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

is there any way we can run kubectl command without sudo acess in KOPS kubernetes?

Yes, you can use kubectl on kops ...READ MORE

answered Aug 28 in Kubernetes by Adarsh
86 views
0 votes
2 answers

Is there a way to start a cron job manually

You can create a simple job based ...READ MORE

answered Sep 18, 2018 in Kubernetes by Nilesh
• 6,920 points
675 views
0 votes
1 answer

How to determine what is the status of a deployment ?

You could use kubectl get deployment <deployment>.  If ...READ MORE

answered Jul 12 in Kubernetes by Sirajul
• 40,980 points
43 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
3,390 views
+3 votes
1 answer
0 votes
1 answer

Is there a way to make a pod to automatically come up when the host restarts?

Yes using replication controller but it may ...READ MORE

answered Jul 19 in Kubernetes by Sirajul
• 40,980 points
39 views
0 votes
1 answer