This is a cache of https://docs.okd.io/4.15/cli_reference/osdk/cli-osdk-install.html. It is a snapshot of the page at 2024-11-19T20:22:57.313+0000.
Installing the Operator SDK <strong>cli</strong> - Operator SDK | <strong>cli</strong> tools | OKD 4.15
×

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.

Operator authors with cluster administrator access to a Kubernetes-based cluster, such as OKD, can use the Operator SDK cli to develop their own Operators based on Go, Ansible, Java, or Helm. Kubebuilder is embedded into the Operator SDK as the scaffolding solution for Go-based Operators, which means existing Kubebuilder projects can be used as is with the Operator SDK and continue to work. See Developing Operators for full documentation on the Operator SDK.

OKD 4.15 supports Operator SDK 1.31.0.

Installing the Operator SDK cli on Linux

You can install the OpenShift SDK cli tool on Linux.

Prerequisites
Procedure
  1. Navigate to the OpenShift mirror site.

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

  3. Unpack the archive:

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

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

    To check your PATH:

    $ echo $PATH
    $ sudo mv ./operator-sdk /usr/local/bin/operator-sdk
Verification
  • After you install the Operator SDK cli, verify that it is available:

    $ operator-sdk version
    Example output
    operator-sdk version: "v1.31.0-ocp", ...

Installing the Operator SDK cli on macOS

You can install the OpenShift SDK cli tool on macOS.

Prerequisites
Procedure
  1. For the amd64 and arm64 architectures, navigate to the OpenShift mirror site for the amd64 architecture and OpenShift mirror site for the arm64 architecture respectively.

  2. From the latest 4.15 directory, download the latest version of the tarball for macOS.

  3. Unpack the Operator SDK archive for amd64 architecture by running the following command:

    $ tar xvf operator-sdk-v1.31.0-ocp-darwin-x86_64.tar.gz
  4. Unpack the Operator SDK archive for arm64 architecture by running the following command:

    $ tar xvf operator-sdk-v1.31.0-ocp-darwin-aarch64.tar.gz
  5. Make the file executable by running the following command:

    $ chmod +x operator-sdk
  6. Move the extracted operator-sdk binary to a directory that is on your PATH by running the following command:

    Check your PATH by running the following command:

    $ echo $PATH
    $ sudo mv ./operator-sdk /usr/local/bin/operator-sdk
Verification
  • After you install the Operator SDK cli, verify that it is available by running the following command::

    $ operator-sdk version
    Example output
    operator-sdk version: "v1.31.0-ocp", ...