'Looking for a way to copy files to all AKS pods instead of just the driver
I have 4 files in resources folder of my project. I want them copied to every pod in Kubernetes.
I can read them as stream and write it to pod local location from my code, but that copies only to driver not to other pods.
How I found out?
I bashed into driver and found these files copied, I bashed into one of the pods and found no files.
(FYI: I bundle it as a JAR and then as an image and run it on AKS (Azure Kubernetes service) so I want a way to copy these 4 files onto some location on every pod)
Solution 1:[1]
Thank you David Maze for your suggestion,Posting this as an solution to help other community members.
I have 4 files in resources folder of my project. I want them copied to every pod in Kubernetes.
That is not the good way to copy the file in running pod. Pods get deleted and recreated sometime, So you will lost entire data encluding file also. So better option is copy the file in Dockerfile or Pod yml file and create a pod using file and also use replication controller in file that will automatically recreate another pod if failure in any pod and also make sure to pods are always available.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | RahulKumarShaw-MT |
