Installing the Operator SDK CLI

The Operator SDK provides a command-line interface (CLI) tool that Operator developers can use to build, test, and deploy an Operator. You can install the Operator SDK CLI on your workstation so that you are prepared to start authoring your own Operators.

See Developing Operators for full documentation on the Operator SDK.

OKD 4.7 supports Operator SDK v1.3.0.

Installing the Operator SDK CLI

You can install the OpenShift SDK CLI tool on Linux.

Prerequisites

Procedure

  1. Navigate to the OpenShift mirror site.

  2. From the 4.7.23 directory, download the latest version of the tarball for Linux.

  3. Unpack the archive:

    1. $ tar xvf operator-sdk-v1.3.0-ocp-linux-x86_64.tar.gz
  4. Make the file executable:

    1. $ chmod +x operator-sdk
  5. Move the extracted operator-sdk binary to a directory that is on your PATH.

    To check your PATH:

    1. $ echo $PATH
    1. $ sudo mv ./operator-sdk /usr/local/bin/operator-sdk

Verification

  • After you install the Operator SDK CLI, verify that it is available:

    1. $ operator-sdk version

    Example output

    1. operator-sdk version: "v1.3.0-ocp", ...