{"id":22744,"date":"2024-06-09T16:53:06","date_gmt":"2024-06-09T13:53:06","guid":{"rendered":"https:\/\/kifarunix.com\/?p=22744"},"modified":"2024-06-17T11:57:36","modified_gmt":"2024-06-17T08:57:36","slug":"how-to-install-etcdctl-on-kubernetes-cluster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-etcdctl-on-kubernetes-cluster\/","title":{"rendered":"How to Install etcdctl on Kubernetes Cluster"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"597\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/06\/installing-etcdctl.png?v=1717941078\" alt=\"install etcdctl  in a Kubernetes\" class=\"wp-image-22749\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/06\/installing-etcdctl.png?v=1717941078 1072w, https:\/\/kifarunix.com\/wp-content\/uploads\/2024\/06\/installing-etcdctl-768x428.png?v=1717941078 768w\" sizes=\"(max-width: 1072px) 100vw, 1072px\" \/><\/figure>\n\n\n\n<p>Follow through this guide to learn how to easily install etcdctl on Kubernetes cluster. Kubernetes cluster relies on etcd, a distributed key-value store, to store configuration data required to maintain the cluster state. And while the Kubernetes API offers a robust set of tools for administering it, sometimes you might need to directly interact with <strong>etcd<\/strong> to troubleshoot issues, retrieve data, or perform specific configurations. This is where <strong>etcdctl<\/strong> comes in handy.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-etcdctl-on-kubernetes-cluster\">Installing etcdctl on Kubernetes Cluster<\/a><ul><li><a href=\"#why-install-etcdctl\">Why Install etcdctl?<\/a><\/li><li><a href=\"#get-installed-etcd-version-number\">Get Installed etcd Version Number<\/a><\/li><li><a href=\"#install-etcdctl-command-line-tool\">Install etcdctl command line tool<\/a><ul><li><a href=\"#download-etcd-source-tarball\">Download etcd source tarball<\/a><\/li><li><a href=\"#extract-etcdctl-binary\">Extract etcdctl binary<\/a><\/li><li><a href=\"#verify-etcdctl-version-installed\">Verify etcdctl Version Installed<\/a><\/li><\/ul><\/li><li><a href=\"#interacting-with-kubernetes-cluster-with-etcdctl\">Interacting with Kubernetes cluster with etcdctl<\/a><ul><li><a href=\"#check-etcd-cluster-status\">Check etcd Cluster Status<\/a><\/li><li><a href=\"#demystifying-the-status-output\">Demystifying the Status Output<\/a><\/li><li><a href=\"#check-etcd-cluster-health\">Check etcd Cluster Health<\/a><\/li><\/ul><\/li><li><a href=\"#install-etcdutl-command-line-tool\">Install etcdutl command line tool<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-etcdctl-on-kubernetes-cluster\">Installing etcdctl on Kubernetes Cluster<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-install-etcdctl\">Why Install etcdctl?<\/h3>\n\n\n\n<p>You might be asking yourself why you need to install etcdctl command line tool on your cluster, yet the etcd pods already comes pre-packaged with the etcdctl tool.<\/p>\n\n\n\n<p>While that is true, installing <strong>etcdctl<\/strong> on a local Kubernetes control plane, provides flexibility and convenience for managing the cluster&#8217;s configuration, monitoring its health, or troubleshooting issues without having to directly access the Kubernetes pods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"get-installed-etcd-version-number\">Get Installed etcd Version Number<\/h3>\n\n\n\n<p>Ideally, the version of etcdctl should match the version of etcd with which it is intended to interact. Therefore, before you can proceed to install etcdctl tool, you need to get the version of the currently installed etcd.<\/p>\n\n\n\n<p>To get the version of etcd, you would usually run the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>etcd --version<\/code><\/pre>\n\n\n\n<p>However, for the Kubernetes cluster, you need to get the version number from the etcd pod.<\/p>\n\n\n\n<p>List the pods, from control plane;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl get pods -n kube-system -l component=etcd<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>NAME             READY   STATUS    RESTARTS      AGE\netcd-master-01   1\/1     Running   1 (22h ago)   24h\netcd-master-02   1\/1     Running   0             24h\netcd-master-03   1\/1     Running   0             24h\n<\/code><\/pre>\n\n\n\n<p>So, you can get the version of etcd from one of the etcd pod;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl exec etcd-master-01 -n kube-system -- etcd --version<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>etcd Version: 3.5.12\nGit SHA: e7b3bb6cc\nGo Version: go1.20.13\nGo OS\/Arch: linux\/amd64\n<\/code><\/pre>\n\n\n\n<p>From the command output, you can see that we are running etcd version <strong>3.5.12<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-etcdctl-command-line-tool\">Install etcdctl command line tool<\/h3>\n\n\n\n<p>There are different ways of installing etcdctl tool on Linux, right from running it as docker container, as systemd service unit etc. However, we are installing it on a local system just as a binary in this guide as follows.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"download-etcd-source-tarball\">Download etcd source tarball<\/h4>\n\n\n\n<p>Set the version of a running etcd to a variable as shown below. Replace the version number of etcd accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ETCD_VER=v3.5.12<\/code><\/pre>\n\n\n\n<p>Next, download the etcd source code;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/storage.googleapis.com\/etcd\/${ETCD_VER}\/etcd-${ETCD_VER}-linux-amd64.tar.gz -P \/tmp\/<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"extract-etcdctl-binary\">Extract etcdctl binary<\/h4>\n\n\n\n<p>The etcd tarball will contain the etcdctl binary we need. See the command output below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar tf \/tmp\/etcd-${ETCD_VER}-linux-amd64.tar.gz<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>etcd-v3.5.12-linux-amd64\/\netcd-v3.5.12-linux-amd64\/README.md\netcd-v3.5.12-linux-amd64\/READMEv2-etcdctl.md\netcd-v3.5.12-linux-amd64\/etcdutl\n<strong>etcd-v3.5.12-linux-amd64\/etcdctl<\/strong>\netcd-v3.5.12-linux-amd64\/Documentation\/\netcd-v3.5.12-linux-amd64\/Documentation\/README.md\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/v3election.swagger.json\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/rpc.swagger.json\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/v3lock.swagger.json\netcd-v3.5.12-linux-amd64\/README-etcdutl.md\netcd-v3.5.12-linux-amd64\/README-etcdctl.md\netcd-v3.5.12-linux-amd64\/etcd\n<\/code><\/pre>\n\n\n\n<p>We are only interested in <strong>etcdctl<\/strong> binary. Hence, just extract it to the local binary files directory;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tar -xzf \/tmp\/etcd-v3.5.12-linux-amd64.tar.gz -C \/usr\/local\/bin\/ etcd-v3.5.12-linux-amd64\/etcdctl --strip-components=1<\/code><\/pre>\n\n\n\n<p>You should now have the etcdctl binary on your path.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>which etcdctl<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/etcdctl<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"verify-etcdctl-version-installed\">Verify etcdctl Version Installed<\/h4>\n\n\n\n<p>To confirm the version of <strong>etcdctl<\/strong> installed, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdctl version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdctl version: 3.5.12\nAPI version: 3.5<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"interacting-with-kubernetes-cluster-with-etcdctl\">Interacting with Kubernetes cluster with etcdctl<\/h3>\n\n\n\n<p>Once you have the tool installed, you can then use it to interact with the cluster etcd.<\/p>\n\n\n\n<p>For example, am currently logged into one of the cluster control plane where etcd is running.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ss -altnp | grep 2379<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>LISTEN 0      4096   192.168.122.58:2379       0.0.0.0:*          \nLISTEN 0      4096        127.0.0.1:2379       0.0.0.0:* \n<\/code><\/pre>\n\n\n\n<p>So, it is listening on both an IP and a loopback interface.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"check-etcd-cluster-status\">Check etcd Cluster Status<\/h4>\n\n\n\n<p>There are different ways in which you can use <strong>etcdctl<\/strong> to interact with the cluster. In the very basic way, let&#8217;s the status and health of the cluster.<\/p>\n\n\n\n<p>To check etcd status, use the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdctl endpoint status (--endpoints=$ENDPOINTS|--cluster)<\/code><\/pre>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint status \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key\n<\/code><\/pre>\n\n\n\n<p>Without specifying the endpoint, it will try to use loopback address.<\/p>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1:2379, 7f56434149e2cc7f, 3.5.12, 9.9 MB, true, false, 4, 4745, 4745,<\/code><\/pre>\n\n\n\n<p>You can also specify the IP address.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint status \\\n\t--endpoints=https:\/\/192.168.122.58:2379 \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key\n<\/code><\/pre>\n\n\n\n<p>Output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/192.168.122.58:2379, 7f56434149e2cc7f, 3.5.12, 8.0 MB, false, false, 3, 377635, 377635,<\/code><\/pre>\n\n\n\n<p>To check the status of the whole cluster, use <strong>&#8211;cluster<\/strong> option.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint status \\\n\t--endpoints=https:\/\/192.168.122.58:2379 \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key \\\n        --cluster\n<\/code><\/pre>\n\n\n\n<p>Output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>https:\/\/192.168.122.58:2379, 7f56434149e2cc7f, 3.5.12, 8.0 MB, false, false, 3, 377722, 377722, \nhttps:\/\/192.168.122.60:2379, 88c0888f95e69bf2, 3.5.12, 7.9 MB, true, false, 3, 377722, 377722, \nhttps:\/\/192.168.122.59:2379, d98ec9634e856042, 3.5.12, 7.4 MB, false, false, 3, 377722, 377722,\n<\/code><\/pre>\n\n\n\n<p>You can also display the output in different formats (fields, json, protobuf, simple, table) by passing the option <strong>-w|&#8211;write-out<\/strong> option.<\/p>\n\n\n\n<p>For example, to show in table format;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint status \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt\\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key \\\n\t-w table\n<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>+----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n|    ENDPOINT    |        ID        | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |\n+----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n| 127.0.0.1:2379 | 7f56434149e2cc7f |  3.5.12 |  9.9 MB |      true |      false |         4 |       4760 |               4760 |        |\n+----------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n<\/code><\/pre>\n\n\n\n<p>For cluster-wide;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint status \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt\\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key \\\n\t-w table \\\n        --cluster\n<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n|          ENDPOINT           |        ID        | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |\n+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n| https:\/\/192.168.122.58:2379 | 7f56434149e2cc7f |  3.5.12 |  9.9 MB |      true |      false |         4 |       5255 |               5255 |        |\n| https:\/\/192.168.122.59:2379 | bb52cdc64ee8e59b |  3.5.12 |  9.9 MB |     false |      false |         4 |       5255 |               5255 |        |\n| https:\/\/192.168.122.60:2379 | f566c3fe95233961 |  3.5.12 |  9.9 MB |     false |      false |         4 |       5255 |               5255 |        |\n+-----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"demystifying-the-status-output\">Demystifying the Status Output<\/h4>\n\n\n\n<p>What does each field, separated by comma, mean in the status output?<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Endpoint URL<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>https:\/\/192.168.122.58:2379<\/code><\/li>\n\n\n\n<li>&#8230;<\/li>\n\n\n\n<li>These are the addresses of the etcd cluster members.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>ID<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>7f56434149e2cc7f<\/code><\/li>\n\n\n\n<li>&#8230;<\/li>\n\n\n\n<li>These are the unique identifiers of the etcd members.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Version<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>3.5.12<\/code>: This is the version of the etcd server that each member is running.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Database Size<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>8.0 MB<\/code><\/li>\n\n\n\n<li><code>...<\/code><\/li>\n\n\n\n<li>This indicates the size of the etcd database on each member.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Is Leader<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>false<\/code> (for 192.168.122.58 and 192.168.122.59)<\/li>\n\n\n\n<li><code>true<\/code> (for 192.168.122.60)<\/li>\n\n\n\n<li>This indicates whether the member is currently the leader of the etcd cluster. In this case, <code>192.168.122.60<\/code> is the leader.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Is Learner<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>false<\/code> for all members. This field indicates if the member is a learner in the cluster (a non-voting member). All members are not learners here.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Raft Term<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>3<\/code>: This is the current term of the Raft consensus algorithm. All members are on the same term, indicating they are in sync in terms of Raft consensus.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Index<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>377722<\/code>: This is the latest index of the committed entries in the etcd log.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Applied Index<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>377722<\/code> This is the index of the latest entry applied to the state machine.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"check-etcd-cluster-health\">Check etcd Cluster Health<\/h4>\n\n\n\n<p>You can also check the health of the cluster;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdctl endpoint health (--endpoints=$ENDPOINTS|--cluster)<\/code><\/pre>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint health \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key\n<\/code><\/pre>\n\n\n\n<p>Similarly, without specifying the endpoint, it will try to use loopback address.<\/p>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1:2379 is healthy: successfully committed proposal: took = 9.873047ms<\/code><\/pre>\n\n\n\n<p>You can also specify the IP address.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint health \\\n\t--endpoints=https:\/\/192.168.122.58:2379 \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key\n<\/code><\/pre>\n\n\n\n<p>Output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/192.168.122.58:2379 is healthy: successfully committed proposal: took = 9.405038ms<\/code><\/pre>\n\n\n\n<p>To check the status of the whole cluster, use <strong>&#8211;cluster<\/strong> option.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint health \\\n\t--endpoints=https:\/\/192.168.122.58:2379 \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key \\\n        --cluster\n<\/code><\/pre>\n\n\n\n<p>Output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>https:\/\/192.168.122.60:2379 is healthy: successfully committed proposal: took = 12.828208ms\nhttps:\/\/192.168.122.58:2379 is healthy: successfully committed proposal: took = 12.474987ms\nhttps:\/\/192.168.122.59:2379 is healthy: successfully committed proposal: took = 17.145012ms\n<\/code><\/pre>\n\n\n\n<p>In tabular format;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>sudo etcdctl endpoint health \\\n\t--endpoints=https:\/\/192.168.122.58:2379 \\\n\t--cacert=\/etc\/kubernetes\/pki\/etcd\/ca.crt \\\n\t--cert=\/etc\/kubernetes\/pki\/etcd\/server.crt \\\n\t--key=\/etc\/kubernetes\/pki\/etcd\/server.key \\\n        --cluster \\\n        -w table\n<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>+-----------------------------+--------+-------------+-------+\n|          ENDPOINT           | HEALTH |    TOOK     | ERROR |\n+-----------------------------+--------+-------------+-------+\n| https:\/\/192.168.122.58:2379 |   true | 10.108583ms |       |\n| https:\/\/192.168.122.59:2379 |   true | 10.437731ms |       |\n| https:\/\/192.168.122.60:2379 |   true | 10.477674ms |       |\n+-----------------------------+--------+-------------+-------+\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-etcdutl-command-line-tool\">Install etcdutl command line tool<\/h3>\n\n\n\n<p>While you can use <strong>etcdctl<\/strong> command to restore Kubernetes etcd data, the functionality has been deprecated <em>since etcd v3.5.x and is slated for removal from etcd v3.6. It is recommended to utilize&nbsp;<a href=\"https:\/\/github.com\/etcd-io\/etcd\/blob\/main\/etcdutl\/README.md\" target=\"_blank\" rel=\"noreferrer noopener\"><code>etcdutl<\/code><\/a>&nbsp;instead<\/em>.<\/p>\n\n\n\n<p>The <strong>etcdutl<\/strong> is packaged together with <strong>etcdctl<\/strong> in the same source code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar tf \/tmp\/etcd-${ETCD_VER}-linux-amd64.tar.gz<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>etcd-v3.5.12-linux-amd64\/\netcd-v3.5.12-linux-amd64\/README.md\netcd-v3.5.12-linux-amd64\/READMEv2-etcdctl.md\n<strong>etcd-v3.5.12-linux-amd64\/etcdutl<\/strong>\netcd-v3.5.12-linux-amd64\/etcdctl\netcd-v3.5.12-linux-amd64\/Documentation\/\netcd-v3.5.12-linux-amd64\/Documentation\/README.md\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/v3election.swagger.json\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/rpc.swagger.json\netcd-v3.5.12-linux-amd64\/Documentation\/dev-guide\/apispec\/swagger\/v3lock.swagger.json\netcd-v3.5.12-linux-amd64\/README-etcdutl.md\netcd-v3.5.12-linux-amd64\/README-etcdctl.md\netcd-v3.5.12-linux-amd64\/etcd\n<\/code><\/pre>\n\n\n\n<p>Therefore, the installation of etcdutl is as simple as extracting the binary using the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tar -xzf \/tmp\/etcd-v3.5.12-linux-amd64.tar.gz -C \/usr\/local\/bin\/ etcd-v3.5.12-linux-amd64\/etcdutl --strip-components=1<\/code><\/pre>\n\n\n\n<p>You should now have the etcdctl binary on your path.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>which etcdutl<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/etcdutl<\/code><\/pre>\n\n\n\n<p>verify the installed version,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/etcdutl version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdutl version: 3.5.12\nAPI version: 3.5<\/code><\/pre>\n\n\n\n<p><strong>etcdutl<\/strong> help page;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>etcdutl help<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Usage:\n  etcdutl [command]\n\nAvailable Commands:\n  backup      [legacy] offline backup of etcd directory\n  defrag      Defragments the storage of the etcd\n  help        Help about any command\n  snapshot    Manages etcd node snapshots\n  version     Prints the version of etcdutl\n\nFlags:\n  -h, --help               help for etcdutl\n  -w, --write-out string   set the output format (fields, json, protobuf, simple, table) (default \"simple\")\n\nUse \"etcdutl [command] --help\" for more information about a command.\n<\/code><\/pre>\n\n\n\n<p>And that is it!<\/p>\n\n\n\n<p>That closes our guide on installing <strong>etcdctl<\/strong> and <strong>etcdutl<\/strong> on a Kubernetes Cluster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this guide to learn how to easily install etcdctl on Kubernetes cluster. Kubernetes cluster relies on etcd, a distributed key-value store, to store<\/p>\n","protected":false},"author":10,"featured_media":22749,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[1076,121,1668],"tags":[7522,7520,7521],"class_list":["post-22744","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-containers","category-howtos","category-kubernetes","tag-etcdctl-kubernetes","tag-install-etcdctl-kubernetes-cluster","tag-install-etcdctl-ubuntu-24-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22744"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=22744"}],"version-history":[{"count":14,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22744\/revisions"}],"predecessor-version":[{"id":22892,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/22744\/revisions\/22892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/22749"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=22744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=22744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=22744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}