This environment is set up for learning how to work with etcd — a distributed, reliable key-value store for the most critical data of a distributed system, used by Kubernetes and many other cloud-native applications.
💡 This is a single-node playground for etcd. To explore clustering capabilities, try the multi-node playground.
etcd
: The distributed key-value store daemon.etcdctl
: The official command-line client for etcd.etcdutl
: Utility for etcd database operations and maintenance.# Check etcd status
etcdctl version
etcdctl endpoint health
# Put and get values
etcdctl put mykey "Hello World"
etcdctl get mykey
# List all keys
etcdctl get --prefix ""
# Put multiple keys with a common prefix
etcdctl put /app/config/db-host "localhost"
etcdctl put /app/config/db-port "5432"
# Get all keys with prefix
etcdctl get --prefix /app/config/
# Watch a specific key
etcdctl watch mykey
# Watch all keys with prefix
etcdctl watch --prefix /app/
There are multiple ways to configure etcd.
Make sure to always restart the service after making changes:
sudo systemctl restart etcd
Configure environment variables in /etc/default/etcd
:
sudoedit /etc/default/etcd
Uncomment the following line in /etc/default/etcd
:
ETCD_CONFIG_FILE=/etc/etcd/config.yaml
Then edit the configuration file:
sudoedit /etc/etcd/config.yaml
Use systemd override for advanced configuration:
sudo systemctl edit etcd
Example override configuration:
[Service]
ExecStart=
ExecStart=/usr/bin/etcd --data-dir=/var/lib/etcd --listen-client-urls=http://0.0.0.0:2379
The empty ExecStart=
is important, otherwise systemd will attempt to run two instances of etcd.
After editing, reload and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart etcd
etcdctl --help
Happy learning! 🚀
This environment is set up for learning how to work with etcd — a distributed, reliable key-value store for the most critical data of a distributed system, used by Kubernetes and many other cloud-native applications.
💡 This is a single-node playground for etcd. To explore clustering capabilities, try the multi-node playground.
etcd
: The distributed key-value store daemon.etcdctl
: The official command-line client for etcd.etcdutl
: Utility for etcd database operations and maintenance.# Check etcd status
etcdctl version
etcdctl endpoint health
# Put and get values
etcdctl put mykey "Hello World"
etcdctl get mykey
# List all keys
etcdctl get --prefix ""
# Put multiple keys with a common prefix
etcdctl put /app/config/db-host "localhost"
etcdctl put /app/config/db-port "5432"
# Get all keys with prefix
etcdctl get --prefix /app/config/
# Watch a specific key
etcdctl watch mykey
# Watch all keys with prefix
etcdctl watch --prefix /app/
There are multiple ways to configure etcd.
Make sure to always restart the service after making changes:
sudo systemctl restart etcd
Configure environment variables in /etc/default/etcd
:
sudoedit /etc/default/etcd
Uncomment the following line in /etc/default/etcd
:
ETCD_CONFIG_FILE=/etc/etcd/config.yaml
Then edit the configuration file:
sudoedit /etc/etcd/config.yaml
Use systemd override for advanced configuration:
sudo systemctl edit etcd
Example override configuration:
[Service]
ExecStart=
ExecStart=/usr/bin/etcd --data-dir=/var/lib/etcd --listen-client-urls=http://0.0.0.0:2379
The empty ExecStart=
is important, otherwise systemd will attempt to run two instances of etcd.
After editing, reload and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart etcd
etcdctl --help
Happy learning! 🚀
Pro Tip: Install iximiuz Labs CLI to start playgrounds and SSH into them from your favorite local terminal:
curl -sf https://labs.iximiuz.com/cli/install.sh | sh