Often our Microservices will require some external data to be mounted into their container environments.
With iofogctl, we can push directories to our Agents so that they can be mounted into Microservice containers as volumes. To do this, we can specify a Volume in YAML like so:
apiVersion: iofog.org/v2
kind: Volume
spec:
name: secret
source: /tmp/
destination: /tmp/secrets/
permissions: 666
agents:
- agent-1
- agent-2
To push the data to our Agents, we run:
iofogctl deploy -f volume.yaml
With the above example, the /tmp/
directory and all of its subdirectories will be pushed to /tmp/secrets/
in agent-1
and agent-2
.
Once the Volume has been deployed, we can deploy Microservices that depend on it. The YAML specification for doing this can be found here.
Volumes can be listed, described, and deleted like all other iofogctl resources.