Skip to content

Instantly share code, notes, and snippets.

@artpar
Last active June 22, 2022 06:06
Show Gist options
  • Select an option

  • Save artpar/c8ce56e5dcaa1c747176c527cdb8a329 to your computer and use it in GitHub Desktop.

Select an option

Save artpar/c8ce56e5dcaa1c747176c527cdb8a329 to your computer and use it in GitHub Desktop.
Videobug kubernetes deployment instructions

Mount emptyDir volume in deployment yaml

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: {}

Docker entrypoint with output=/tmp/videobug

  • 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"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment