2 Changes in the deployment.yaml
- Add the volumeMounts section as child of the (application) container key (sibling to image key)
- Add the volumes section as a sibling of the container key
apiVersion: apps/v1
kind: Deployment
metadata:
name: volumes-example-deployment
spec:
replicas: 3
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- name: <containerName>
image: <imageName>
volumeMounts:
- mountPath: /tmp/videobug
name: videobug-log-volume
volumes:
- name: videobug-log-volume
emptyDir: {}- Add ,output=/tmp/videobug right after the token parameter
ENTRYPOINT ["java", "--add-opens=java.base/java.util=ALL-UNNAMED",
"-javaagent:/tmp/videobug-java-agent.jar=i=<packageName>,server=http://<ip>,token=<token>,output=/tmp/videobug",
"-jar", "/target/application.jar"]