This is a cache of https://docs.openshift.com/dedicated/operators/operator_sdk/osdk-installing-cli.html. It is a snapshot of the page at 2024-11-23T05:20:38.642+0000.
Installing the Operator SDK <strong>cli</strong> - Developing Operators | Operators | OpenShift Dedicated
×

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.

The Red Hat-supported version of the Operator SDK cli tool, including the related scaffolding and testing tools for Operator projects, is deprecated and is planned to be removed in a future release of OpenShift Dedicated. Red Hat will provide bug fixes and support for this feature during the current release lifecycle, but this feature will no longer receive enhancements and will be removed from future OpenShift Dedicated releases.

The Red Hat-supported version of the Operator SDK is not recommended for creating new Operator projects. Operator authors with existing Operator projects can use the version of the Operator SDK cli tool released with OpenShift Dedicated to maintain their projects and create Operator releases targeting newer versions of OpenShift Dedicated.

The following related base images for Operator projects are not deprecated. The runtime functionality and configuration APIs for these base images are still supported for bug fixes and for addressing CVEs.

  • The base image for Ansible-based Operator projects

  • The base image for Helm-based Operator projects

For information about the unsupported, community-maintained, version of the Operator SDK, see Operator SDK (Operator Framework).

Operator authors with dedicated-admin access to OpenShift Dedicated 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.

OpenShift Dedicated supports Operator SDK 1.36.1.

Installing the Operator SDK cli on Linux

You can install the OpenShift SDK cli tool on Linux.

Prerequisites
  • Go v1.19+

  • docker v17.03+, podman v1.9.3+, or buildah v1.7+

Procedure
  1. Navigate to the OpenShift mirror site.

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

  3. Unpack the archive:

    $ tar xvf operator-sdk-v1.36.1-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.36.1-ocp", ...

Installing the Operator SDK cli on macOS

You can install the OpenShift SDK cli tool on macOS.

Prerequisites
  • Go v1.19+

  • docker v17.03+, podman v1.9.3+, or buildah v1.7+

Procedure
  1. For the amd64 architecture, navigate to the OpenShift mirror site for the amd64 architecture.

  2. From the latest 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.36.1-ocp-darwin-x86_64.tar.gz
  4. Make the file executable by running the following command:

    $ chmod +x operator-sdk
  5. 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.36.1-ocp", ...