LoginSignup
0
0

More than 3 years have passed since last update.

etcd を Mac で使ってみた時のメモ

Last updated at Posted at 2020-05-19

メモ。
k8s のマスターで Key/Value データストアとして利用されている etcd を少し使ってみた時のメモ。

やってみた時のメモ

環境

  • MacOS X Mojave(10.14.6)
  • etcd 3.4.8

インストール

etcd-io /etcd

Go で書かれており、リリースバイナリがあるようなのでこれを使ってみる

release

Mac なので darwin のものをダウンロードする。

$cd /tmp/
$wget https://github.com/etcd-io/etcd/releases/download/v3.4.8/etcd-v3.4.8-darwin-amd64.zip

$unzip etcd-v3.4.8-darwin-amd64.zip

$ls etcd-v3.4.8-darwin-amd64
Documentation       README.md           etcd
README-etcdctl.md   READMEv2-etcdctl.md etcdctl

OK.

etcd の起動

Github の README に従いつつ、etcd を起動してみる。

Running etcd

$/tmp/etcd-v3.4.8-darwin-amd64/etcd

これでフォワグラウンドで etcd が起動され、ログが出る。

etcd への操作(値の put/get)

別途ターミナルを起動し、etcdtcl を使って操作を試す

Running etcd

$/tmp/etcd-v3.4.8-darwin-amd64/etcdctl put mykey "this is awesome"
OK

$/tmp/etcd-v3.4.8-darwin-amd64/etcdctl get mykey
mykey
this is awesome

無事出来た

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0