Skip to content

Instantly share code, notes, and snippets.

@jdef
Created September 28, 2016 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdef/63b0747a9a6c4763fc4a6f01ccf491a4 to your computer and use it in GitHub Desktop.
Save jdef/63b0747a9a6c4763fc4a6f01ccf491a4 to your computer and use it in GitHub Desktop.
ephemeral volume for marathon v2 pods, example
{
"id": "/with-ephemeral-vol",
"scaling": { "kind": "fixed", "instances": 1 },
"containers": [
{
"name": "ct1",
"resources": {
"cpus": 0.1,
"mem": 32
},
"exec": { "command": { "shell": "while true; do echo the current time is $(date) > ./jdef-v1/clock; sleep 1; done" } },
"volumeMounts": [
{
"name": "v1",
"mountPath": "jdef-v1"
}
]
},
{
"name": "ct2",
"resources": {
"cpus": 0.1,
"mem": 32
},
"exec": { "command": { "shell": "while true; do cat ./etc/clock; sleep 1; done" } },
"volumeMounts": [
{
"name": "v1",
"mountPath": "etc"
}
]
}
],
"networks": [
{ "mode": "host" }
],
"volumes": [
{ "name": "v1" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment