{"id":49751,"date":"2020-03-26T16:48:22","date_gmt":"2020-03-26T13:48:22","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=49751"},"modified":"2023-09-07T14:18:37","modified_gmt":"2023-09-07T11:18:37","slug":"how-to-install-operator-sdk-cli-on-linux-macos","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/how-to-install-operator-sdk-cli-on-linux-macos\/","title":{"rendered":"How To Install Operator SDK CLI on Linux \/ macOS"},"content":{"rendered":"\n<p>The <a href=\"https:\/\/sdk.operatorframework.io\/docs\" target=\"_blank\" rel=\"noreferrer noopener\">Operator Framework<\/a> is an open source toolkit designed for management of Kubernetes native applications (<em>Operators)<\/em>, in an effective, automated, and scalable way. Operators take advantage of Kubernetes&#8217; 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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"336\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/03\/kubernetes-operator-framework.png\" alt=\"\" class=\"wp-image-49780\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/03\/kubernetes-operator-framework.png 819w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/03\/kubernetes-operator-framework-300x123.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/03\/kubernetes-operator-framework-768x315.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2020\/03\/kubernetes-operator-framework-696x286.png 696w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Install Operator SDK CLI on Linux \/ macOS<\/h2>\n\n\n\n<p>You should start by downloading the latest available release of the application. We&#8217;re using the curl command line to query latest release directly from Github API.<\/p>\n\n\n\n<p><strong>Download the release binary on Linux:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)\nexport OS=$(uname | awk '{print tolower($0)}')\nVER=$(curl --silent \"https:\/\/api.github.com\/repos\/operator-framework\/operator-sdk\/releases\/latest\" | grep '\"tag_name\"' | sed -E 's\/.*\"(&#91;^\"]+)\".*\/\\1\/')\nexport OPERATOR_SDK_DL_URL=https:\/\/github.com\/operator-framework\/operator-sdk\/releases\/download\/$VER\ncurl -LO ${OPERATOR_SDK_DL_URL}\/operator-sdk_${OS}_${ARCH}\nchmod +x operator-sdk_${OS}_${ARCH} &amp;&amp; sudo mv operator-sdk_${OS}_${ARCH} \/usr\/local\/bin\/operator-sdk<\/code><\/pre>\n\n\n\n<p><strong>Download the release binary on macOS:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"\nbrew install operator-sdk<\/code><\/pre>\n\n\n\n<p>Verify that the CLI tool was installed correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">operator-sdk version<\/mark>\noperator-sdk version: \"v1.31.0\", commit: \"e67da35ef4fff3e471a208904b2a142b27ae32b1\", kubernetes version: \"1.26.0\", go version: \"go1.19.11\", GOOS: \"linux\", GOARCH: \"amd64\"<\/code><\/pre>\n\n\n\n<p>Check other CLI installation guides:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/computingforgeeks.com\/manage-multiple-kubernetes-clusters-with-kubectl-kubectx\/\" target=\"_blank\" rel=\"noreferrer noopener\">Easily Manage Multiple Kubernetes Clusters with kubectl &amp; kubectx<\/a><\/li>\n\n\n\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/computingforgeeks.com\/connect-to-bluetooth-device-from-linux-terminal\/\" target=\"_blank\" rel=\"noreferrer noopener\">How To Connect To Bluetooth Device from Linux Terminal<\/a><\/li>\n\n\n\n<li><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/computingforgeeks.com\/connect-to-vpn-server-with-cisco-anyconnect-from-linux-terminal\/\" target=\"_blank\" rel=\"noreferrer noopener\">Connect To VPN Server with Cisco AnyConnect from Linux Terminal<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217; 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 &#8230; <a title=\"How To Install Operator SDK CLI on Linux \/ macOS\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/how-to-install-operator-sdk-cli-on-linux-macos\/\" aria-label=\"Read more about How To Install Operator SDK CLI on Linux \/ macOS\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":49780,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299,316,317,50,6745],"tags":[21660,21661],"class_list":["post-49751","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-containers","category-kubernetes","category-linux-tutorials","category-openshift","tag-operator","tag-sdk"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/49751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=49751"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/49751\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/49780"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=49751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=49751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=49751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}