- Have minikube running
Log in to the Minikube VM and become root:
minikube ssh
sudo su - root
Set the corefile pattern:
echo "/cores/core.%p" > /proc/sys/kernel/core_pattern
Create the directory:
mkdir /cores
Like so, this only focues on the important parts:
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
volumes:
- name: cores
hostPath:
path: /cores
containers:
- name: my-container
volumeMounts:
- mountPath: /cores
name: cores
Logged in to the Minikube VM as root (see above):
chmod a+r /cores/*
Connect to the Minikube VM via SFTP:
sftp -i $(minikube ssh-key) docker@$(minikube ip)
In the SFTP shell:
cd /cores
ls # list cores
get core.1 # or some other core file