Some of our services in our K8s (EKS) envirnment use config files to drive functionality so we don't have to redeploy the whole image each time. Using kubectl cp
command allows us to copy new config files to the pod. So the command kubectl cp settings.json myapi-76dc75f47c-lkvdm:/app/settings.json
copies the new settings.json
file to the pod.
For fun I deleted the pod and k8s recreated it successfully with the old settings.json
file. Anyone know a way of keeping the new settings.json
file if the pod gets destroyed? Is there a way to update the deployment without redeploying the image?
Thanks, Tim