I am new to containerization. I have a Golang application deployed in a Kubernetes cluster inside an Ubuntu VM. I can access the application log using k logs -f <pod-name>
command. However, I want to externalize it in a persistent manner. Say, log directory will be there in parallel to the Kubernetes deployment YAML file(for the ease of access) and inside it the log file will keep getting appended even if the pod gets restarted. Also, new log file is required to be created after a certain time interval, for example, on a daily basis.
How could I achieve this?