Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 2.14 KB

File metadata and controls

59 lines (48 loc) · 2.14 KB

ETCD for Beginners

In this section, we will take a quick look at introduction to ETCD for beginners.

  • What is ETCD?
  • What is a Key-Value Store?
  • How to get started quickly with ETCD?
  • How to operate ETCD?

What is a ETCD?

 - ETCD is a distributed reliable key-value store that is simple, secure & Fast.

What is a Key-Value Store

  • Traditionally, databases have been in tabular format, you must have heared about SQL or Relational databases. They store data in rows and columns

    relational-dbs

  • A Key-Value Store stores information in a Key and Value format.

    key-value

Install ETCD

  • Its easy to install and get started with ETCD.

    • Download the relevant binary for your operating system from github releases page (https://github.com/etcd-io/etcd/releases)

      For Example: To download ETCD V3.3.11, run the below curl command
        
      $ https://github.com/etcd-io/etcd/releases/download/v3.3.11/etcd-v3.3.11-linux-amd64.tar.gz
      
    • Extract it.

      $ tar xvzf etcd-v3.3.11-linux-amd64.tar.gz 
      
    • Run the ETCD Service

      $ ./etcd
      
    • When you start ETCD it will by default listens on port 2379

    • The default client that comes with ETCD is the etcdct client. You can use it to store and retrieve key-value pairs.

      Syntax: To Store a Key-Value pair
      $ ./etcdctl set key1 value1
      
      Syntax: To retrieve the stored data
      $ ./etcdctl get key1
      
      Syntax: To view more commands. Run etcdctl without any arguments
      $ ./etcdctl
      

      etcdctl

    K8s Reference Docs: