Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions pages/platform/volumes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,14 @@ If you try to detach a volume while the instance is running, the platform will q
The detach operation will trigger when the instance goes into `stopped`.
:::

Now start another instance and, like before, mount the same volume:
Now start another instance:

<CodeTabs syncKey="cli">

```bash title="unikraft"
unikraft run --metro fra \
-m 512M \
-p 443:8080/http+tls \
-v my-volume:/mnt \
--image <my-org>/httpserver-python312-flask30:latest
```

Expand All @@ -351,7 +350,6 @@ kraft cloud instance create \
--start \
-M 512Mi \
-p 443:8080 \
--volume my-volume:/mnt \
<my-org>/httpserver-python312-flask30:latest
```

Expand All @@ -375,10 +373,6 @@ This should output something like:
 name: winter-field-v6m37jgs
 domains:
 - fqdn: winter-field-v6m37jgs.fra.unikraft.app
volumes:
- name: my-volume
 uuid: 4d5576f7-315a-4eab-98b8-6c18fec076e0
 at: /mnt
networks:
- uuid: 935ba4ef-39c2-07e7-d2ae-8cd3c9aae07c
 private-ip: 10.0.6.5
Expand All @@ -404,6 +398,24 @@ This should output something like:

</CodeTabs>

Attach the volume to the new instance:

<CodeTabs syncKey="cli">

```bash title="unikraft"
unikraft volumes attach my-volume \
--to httpserver-python312-flask30-0s9c7 \
--at /mnt
```

```bash title="kraft"
kraft cloud volume attach my-volume \
--to httpserver-python312-flask30-0s9c7 \
--at /mnt
```

</CodeTabs>

Run one final `curl` to this new address.
You should see the previous contents plus a new entry at the bottom:

Expand All @@ -426,12 +438,16 @@ To clean up, first detach the volume from all instances and then remove it:
unikraft instances stop httpserver-python312-flask30-0s9c7
unikraft volumes detach my-volume --from httpserver-python312-flask30-0s9c7
unikraft volumes delete my-volume
unikraft instances delete httpserver-python312-flask30-0s9c7
unikraft instances delete httpserver-python312-flask30-bxwxm
```

```bash title="kraft"
kraft cloud instance stop httpserver-python312-flask30-0s9c7
kraft cloud volume detach my-volume --from httpserver-python312-flask30-0s9c7
kraft cloud volume remove my-volume
kraft cloud instance remove httpserver-python312-flask30-bxwxm
kraft cloud instance remove httpserver-python312-flask30-0s9c7
```

</CodeTabs>
Expand Down
Loading