Kubectl OpenEBS Plugin
Overview#
The 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.
Install Kubectl Plugin#
- The OpenEBS kubectl plugin is available for the Linux platform. You can download the binary from the OpenEBS Releases.
- After downloading, add the binary to your system’s $PATH.
To verify the installation, run:
Command
Sample Output
Features#
Unified Plugin for All Storages#
The 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 Assumption#
The 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 Overview#
This 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 HostPath#
The Local PV Hostpath command supports resource retrieval for Hostpath storage volumes.
Command
Sample Output
Local PV LVM#
The Local PV LVM command supports operations like retrieving information about volumes, volume groups, and node-specific resources.
Command
Sample Output
Local PV ZFS#
The Local PV ZFS command provides options for managing ZFS volumes and pools.
Command
Sample Output
Replicated PV Mayastor#
The 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