Skip to content

Latest commit

 

History

History
87 lines (71 loc) · 3.01 KB

register.mdx

File metadata and controls

87 lines (71 loc) · 3.01 KB
layout page_title description
docs
Commands: volume register
Register volumes with CSI plugins.

Command: volume register

The volume register command registers external storage volumes with Nomad's Container Storage Interface (CSI) support. The volume must exist on the remote storage provider before it can be registered and used by a task.

CSI plugins that implement the Controller interface can be created via the volume create command, which will automatically register the volume as well.

Usage

nomad volume register [options] [file]

The volume register command requires a single argument, specifying the path to a file containing a valid volume specification. This file will be read and the job will be submitted to Nomad for scheduling. If the supplied path is "-", the job file is read from STDIN. Otherwise it is read from the file at the supplied path.

When ACLs are enabled, this command requires a token with the csi-write-volume capability for the volume's namespace.

General Options

@include 'general_options.mdx'

Volume Specification

The volume specification is documented in the Volume Specification page.

Not all fields can be updated after the volume is registered:

  • The capacity_min and capacity_max fields can be updated, and may increase the volume size if the CSI plugin supports it. Expansion may or may not be possible while the volume is in use, again depending on the plugin. Reducing volume capacity is not allowed per the CSI spec.
  • The capability blocks can be added or removed, but only if the capability is not currently in use by a mounted volume.
  • The mount_options block can be updated if the volume is not in use.
  • The secrets block can be updated.
  • The context block can be updated. The values for this field are typically provided by the CSI plugin, and should not be updated unless recommended by the CSI plugin's documentation.