CSI driver for mounting a volume provided by the driver inside a pod.
- Decide the name for your CSI driver. It should be a standard/sanitized name that doesn't contain dangerous characters.
- Create a gRPC server which listens on a specific port.
- Start implementing the methods defined in CSI spec, initial implementation can just be an empty function definition.
- You may verify whether you have added required implementations as expected using
csc
tool. More details on how to test using csc can be found in csc.md. - NodeGetInfo() and GetPluginInfo() functions need to be have valid implementations for the driver to get registered.
- The parameter values can be passed in from config or hard-coded (not recommended).
- GetPluginInfo() configures the driver name and version.
- NodeGetInfo() returns the node ID in response.
- Register the Node and Identity components using csi library like
csi.RegisterIdentityServer(serverOptions, driverOptions)
. - Logic for mount and unmount volume operations goes in NodePublishVolume() and NodeUnpublishVolume() functions.
- Docs for Configuring and Deploying your application explains how to setup and get your app running.
- After the deployment completes, you may verify if your driver is functional by following verification docs
- Setup gRPC server
- Expose Controller, Node and Identity Service RPCs
- Identity Service implemented
- Node Service implemented
-
NodePublishVolume
implemented- Volume corresponding to the
volume_id
published(mounted) at specifiedtarget_path
- Volume corresponding to the
-
NodeUnpublishVolume
implemented- This RPC is a reverse operation of
NodePublishVolume
.
- This RPC is a reverse operation of
-
NodeGetCapabilities
implemented
-
make build TAG="your-tag"
make push TAG="your-tag"
make load TAG="your-tag"
make run TAG="your-tag"
make deploy-kind TAG="your-tag"
make remove-kind TAG="your-tag"
- Developing CSI driver.
- Design proposal
- Sample CSI driver.
- Blog on how to write CSI plugin.