I am using Lua code inside the Nginx ingress controller in Minikube to write some logs to a file. I would like this file to be available on the host.
Is there a way to map a volume from the ingress-controller pod to the host? I did not create the Nginx ingress controller pod using a YAML config, but merely enabled the ingress addon in Minikube, so I do not have a YAML that I can add a volume mapping to.
You should be able to kubectl get
whatever is running in your cluster and save it to a file.
kubectl get pod nginx -oyaml > mynginxpod.yaml
Then you could edit the file adding your volume and then applying with:
kubectl apply -f mynginxpod.yaml.
this is just an example.