Kubectl Plugin
The Mayastor kubectl plugin can be used to view and manage Replicated PV Mayastor resources such as nodes, pools and volumes. It is also used for operations such as scaling the replica count of volumes.
#
Install kubectl pluginThe Mayastor kubectl plugin is available for the Linux platform. The binary for the plugin can be found here.
Add the downloaded Mayastor kubectl plugin under $PATH.
To verify the installation, execute:
Command
Expected Output
#
Use kubectl plugin to Retrieve DataSample command to use kubectl plugin:
You can use the plugin with the following options:
#
Get Replicated PV Mayastor VolumesCommand
Expected Output
#
Get Replicated PV Mayastor PoolsCommand
Expected Output
#
Get Replicated PV Mayastor NodesCommand
Expected Output
note
All the above resource information can be retrieved for a particular resource using its ID. The command to do so is as follows:
#
Scale the Replica Count of a VolumeCommand
Expected Output
#
Retrieve Resource in any of the Output Formats (Table, JSON, or YAML)Table is the default output format.
Command
Expected Output
#
Retrieve Replica Topology for Specific VolumesCommand
Expected Output
warning
The plugin requires access to the Mayastor REST server
for execution. It gets the master node IP from the kube-config file. In case of any failure, the REST endpoint can be specified using the ‘–rest’ flag.
#
List Available Volume SnapshotsCommand
Expected Output
#
Limitations of kubectl plugin- The plugin currently does not have authentication support.
- The plugin can operate only over HTTP.