Skip to content
/ cli Public

Longhorn CLI is a headless way for preflighting, operating and troubleshooting Longhorn cluster.

License

Notifications You must be signed in to change notification settings

longhorn/cli

Repository files navigation

Longhorn Commandline Interface (longhornctl)

This repository contains the source code for longhornctl, a CLI (command-line interface) designed to simplify Longhorn manual operations.

What Can You Do With longhornctl?

  • Install and verify prelight requirements.
  • Execute one-time Longhorn operations.
  • Gain inside into your Longhorn system.

Usage

For detailed usage information and examples, please refer to the document run longhornctl --help.

You can obtain longhornctl either through downloading a prebuilt binary or by building it from source.

Prebuilt Binary

  1. Remove any previous longhornctl installation.

    rm -rf /usr/local/bin/longhornctl
    
  2. Download the command-line tool release suitable for your operating system and machine architecture from the GitHub release page.

    curl -L https://github.com/longhorn/cli/releases/download/${LonghornVersion}/longhornctl-${OS}-${ARCH} -o longhornctl
    chmod +x longhornctl
    mv ./longhornctl /usr/local/bin/longhornctl
    
  3. Verify that you've installed

    longhornctl version
    

Build From Source

  1. Clone repository
    git clone https://github.com/longhorn/cli.git
  2. Build the longhornctl binary
    cd cli
    make

    Note: This process will generate two binaries:

    • longhornctl: A command-line interface for remote Longhorn operations, designed to be run outside the Kubernetes cluster. It executes longhornctl-local for operations within the cluster.
    • longhornctl-local: A command-line interface to be used within a DaemonSet pod inside the Kubernetes cluster, handling in-cluster and host operations.

About

Longhorn CLI is a headless way for preflighting, operating and troubleshooting Longhorn cluster.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages