Kubectl OpenEBS Plugin
#
OverviewThe Kubectl OpenEBS Plugin is a plugin that allows you to interact with OpenEBS storages through a unified interface. This unified plugin is especially beneficial if you have installed a cluster using the OpenEBS Helm chart. The supported storages include:
- Local PV HostPath
- Local PV LVM
- Local PV ZFS
- Replicated PV Mayastor
This plugin integrates the current kubectl-mayastor
functionality for Replicated PV Mayastor specific commands while introducing newly developed functionality for other storages, inspired by the existing kubectl-openebs
plugin. The previous kubectl-openebs
supported only Local PV storages whereas now it extends its capabilities to include Replicated PV Mayastor commands. Also, the plugin supports multiple output formats, such as YAML and JSON.
By using this plugin, you get a simplified and consistent interface to manage multiple storages, with improved output formats, flexible namespace configurations, and robust command options tailored to meet diverse storage needs.
#
Features#
Unified Plugin for All StoragesThe plugin consolidates functionality for all OpenEBS storages under a single interface. You can manage Local PV Hostpath, Local PV LVM, Local PV ZFS, and Replicated PV Mayastor resources without switching between multiple tools or plugins.
#
Namespace AssumptionThe kubectl-mayastor
plugin previously assumed the namespace to be mayastor
if unspecified. Now, if the namespace is not explicitly defined, the plugin reads it from the kubeconfig context's namespace (It is set to default
by default). The kubeconfig path is configurable using --kubeconfig
or the KUBECONFIG
env. Namespace can be set explicitly using the --namespace
option.
To set the namespace in the current context, use:
note
Changing the context namespace will also affect how other Kubernetes kubectl
plugins fetch resources if not explicitly set.
For example, if OpenEBS is installed on namespace "storage" then we can set the ns
on current context using:
#
Command OverviewThis section provides a detailed breakdown of the primary kubectl-openebs
commands. This plugin serves as the central CLI for managing OpenEBS storage resources.
Command
Sample Output
#
Storage-Specific Commands#
Local PV HostPathThe Local PV Hostpath command supports resource retrieval for Hostpath storage volumes.
Command
Sample Output
#
Local PV LVMThe Local PV LVM command supports operations like retrieving information about volumes, volume groups, and node-specific resources.
Command
Sample Output
#
Local PV ZFSThe Local PV ZFS command provides options for managing ZFS volumes and pools.
Command
Sample Output
#
Replicated PV MayastorThe Replicated PV Mayastor command enables you to perform advanced operations on Replicated PV Mayastor resources, such as scaling, resource management, and upgrades.
Command
Expected Output
Command
Sample Output