You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

The Operator Framework is an open source toolkit designed for management of Kubernetes native applications (Operators), in an effective, automated, and scalable way. Operators take advantage of Kubernetes’ extensibility to deliver the automation advantages of cloud services like provisioning, scaling, and backup and restore, while being able to run anywhere that Kubernetes can run.

The Operator SDK has a CLI tool to be used by Developers and Cluster Administrators in creating, building, and deploying new Operator projects. This guide will show you how you can easily install the latest release of Operator SDK CLI on your workstation so you are prepared to start building your own Operators.

kubernetes operator framework

Install Operator SDK CLI on Linux / macOS

You should start by downloading the latest available release of the application. We’re using the curl command line to query latest release directly from Github API.

Download the release binary on Linux:

curl -s | grep browser_download_url | grep x86_64-linux-gnu | cut -d '"' -f 4 | wget -i -

Download the release binary on macOS:

curl -s | grep browser_download_url | grep x86_64-apple-darwin | cut -d '"' -f 4 | wget -i -

Once the file is downloaded, verify the downloaded release binary with provided ASC file.

--- Linux --- 
$ gpg --verify operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu.asc

--- macOS ---
$ gpg --verify operator-sdk-*-x86_64-apple-darwin.asc

If you do not have the maintainer’s public key on your machine, an error like below will be shown:

gpg: directory '/var/home/jkmutai/.gnupg' created
gpg: keybox '/var/home/jkmutai/.gnupg/pubring.kbx' created
gpg: assuming signed data in 'operator-sdk-v0.16.0-x86_64-apple-darwin'
gpg: Signature made Tue 17 Mar 2020 09:47:38 PM EAT
gpg:                using RSA key 7CC439CD21EE1031C3831C6590354A3F09FCE996
gpg: Can't check signature: No public key

Use the following command to download the key, replacing “<key_id>” with the RSA key string provided in the previous output.

$ gpg --recv-key "<key_id>"

For me this will be:

$ gpg --recv-key 7CC439CD21EE1031C3831C6590354A3F09FCE996
gpg: /var/home/jkmutai/.gnupg/trustdb.gpg: trustdb created
gpg: key 90354A3F09FCE996: public key "Varsha Prasad Narsing (RedHat office purpose) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Now you should be able to verify the binary.

$ gpg --verify operator-sdk-*-x86_64-apple-darwin.asc
gpg: assuming signed data in 'operator-sdk-v0.16.0-x86_64-apple-darwin'
gpg: Signature made Tue 17 Mar 2020 09:47:38 PM EAT
gpg:                using RSA key 7CC439CD21EE1031C3831C6590354A3F09FCE996
gpg: Good signature from "Varsha Prasad Narsing (RedHat office purpose) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7CC4 39CD 21EE 1031 C383  1C65 9035 4A3F 09FC E996

Move the binary files to /usr/local/bin directory:

--- Linux ---
sudo mv operator-sdk-*-x86_64-linux-gnu /usr/local/bin/operator-sdk
rm -rf operator-sdk*

--- macOS ---
sudo mv operator-sdk-*-x86_64-apple-darwin /usr/local/bin/operator-sdk
rm -rf operator-sdk*

Verify that the CLI tool was installed correctly:

$ operator-sdk version
operator-sdk version: "v0.16.0-dirty", commit: "55f1446c5f472e7d8e308dcdf36d0d7fc44fc4fd", go version: "go1.13.8 linux/amd64"

Check other CLI installation guides:

Easily Manage Multiple Kubernetes Clusters with kubectl & kubectx

How To Connect To Bluetooth Device from Linux Terminal

Connect To VPN Server with Cisco AnyConnect from Linux Terminal

As an appreciation for the content we put out,
we would be thrilled if you support us!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here