Added documenetation about using etcdctl with k3s

Signed-off-by: dereknola <derek.nola@suse.com>
This commit is contained in:
dereknola
2021-09-23 11:33:06 -07:00
parent 6f82321f15
commit a657e5399d
+19
View File
@@ -11,6 +11,7 @@ This section contains advanced information describing the different ways you can
- [Certificate rotation](#certificate-rotation)
- [Auto-deploying manifests](#auto-deploying-manifests)
- [Using Docker as the container runtime](#using-docker-as-the-container-runtime)
- [Using etcdctl](#using-etcdctl)
- [Configuring containerd](#configuring-containerd)
- [Secrets Encryption Config (Experimental)](#secrets-encryption-config-experimental)
- [Running K3s with Rootless mode (Experimental)](#running-k3s-with-rootless-mode-experimental)
@@ -117,6 +118,24 @@ rancher/metrics-server v0.3.6 9dd718864ce61 39.9MB
rancher/pause 3.1 da86e6ba6ca19 742kB
```
# Using etcdctl
etcdctl provides a CLI for etcd.
If you would like to use etcdctl after install K3s with embedded etcd, install etcdctl using the [official documentation:](https://etcd.io/docs/latest/install/)
```
$ VERSION="v3.5.0"
$ curl -L https://github.com/etcd-io/etcd/releases/download/${VERSION}/etcd-${VERSION}-linux-amd64.tar.gz --output etcdctl-${VERSION}-linux-amd64.tar.gz
$ sudo tar -zxvf etcdctl-${VERSION}-linux-amd64.tar.gz -C /usr/local/bin
```
Then start using etcdctl commands with the appropiate k3s flags:
```
$ sudo etcdctl --cacert=/var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert=/var/lib/rancher/k3s/server/tls/etcd/client.crt --key=/var/lib/rancher/k3s/server/tls/etcd/client.key version
```
# Configuring containerd
K3s will generate config.toml for containerd in `/var/lib/rancher/k3s/agent/etc/containerd/config.toml`.