Update setup-etcd.md

Signed-off-by: Mark Fussell <markfussell@gmail.com>
This commit is contained in:
Mark Fussell 2023-03-29 14:05:22 -07:00 committed by GitHub
parent 9f3501c477
commit f1966514e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -57,6 +57,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
{{% codetab %}}
You can run Etcd locally using Docker Compose:
```
version: '2'
services:
@ -66,12 +67,17 @@ services:
- "12379:2379"
command: etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379```
```
Save the docker-compose.yml file and run the following command to start the Etcd server:
Save the `docker-compose.yml` file and run the following command to start the Etcd server:
`docker-compose up -d`
```
docker-compose up -d
```
This starts the Etcd server in the background using the expose the default Etcd port of `2379`. You can then interact with the server using the `etcdctl` command-line client on `localhost:12379`. For example
This starts the Etcd server in the background and expose the default Etcd port of `2379`. You can then interact with the server using the `etcdctl` command-line client on `localhost:12379`. For example:
```
etcdctl --endpoints=localhost:2379 put mykey myvalue
```
{{% /codetab %}}