New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl replaced configmap built from directory does not show new content in a container #25418
Comments
Hi, I'm working on this one |
Hi, @sbezverk I didn't manage to reproduce bug following the steps you described on 1.2.4. Could you please provide more details for reproduction or confirm it was a confusion due to delayed update? So what I did: ConfigMap formed from dir: # ls -la ../config-dir/
# cat ../config-dir/file1
# cat ../config-dir/file2
# kubectl create configmap test-config --from-file=../config-dir/
# kubectl get configmap/test-config -o yaml > ../test-config.yaml# cat test-config.yaml
# cat podConfigmap.yaml
# kubectl create -f podConfigmap.yaml
Ok, now let's change configMap and replace it:# cat test-config.yaml
# kubectl replace -f test-config.yaml
After replacement it will take some time kubelet to update files in mount path (~1 min):# kubectl exec dapi-test-pod -- ls -la /etc/config/
#kubectl exec dapi-test-pod -- cat /etc/config/file1
#kubectl exec dapi-test-pod -- cat /etc/config/file3Hi i'm file3 |
@vefimova I will redo this test and let you know the result, hopefully it was just a mistake on my side. Thank you. |
Can K8S provide an option for updating or not updating the configuration in the container while it's running? If we update configmap, but do not want to spread the configuration to all conatainers. K8S can provide an option when create app. |
Hi, I can't reproduce the bug as well. I did however come here by googling the issue, simply for the reason that updating the file in the container takes a few seconds after the config map has been updated. So just leaving this here in case someone ends up here as well! |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Running kubernetes 1.2.4. I build configmap from directory, where I store files required by the application using this command:
kubectl --server=http://10.57.120.10:8080 create configmap keystone-config --from-file=config/
in some cases I need to add file to the set of config files. So get yaml version of configmap, change it manually and then use kubectl replace to update it.
kubectl --server=http://10.57.120.10:8080 get configmap keystone-config -o yaml > keystone-config.yaml
change keystone-config.yaml following this file format
kubectl --server=http://10.57.120.10:8080 replace -f keystone-config.yaml
When I check the container I do not see any changes at the point where this configmap is mounted, but if I restart container then I see a new file which I manually added.
Please let me know if it is a bug or this way of changing configmap is not supported.
Thank you
Serguei
The text was updated successfully, but these errors were encountered: