V
V
Vadim2021-08-30 16:13:30
Docker
Vadim, 2021-08-30 16:13:30

How to install something in Distroless inage?

set up a cluster using kubedm - trying to make an etcd backup on it using the command

kubectl -n kube-system exec etcd-ip-12-12-10-208 -c etcd -- sh -c "ETCDCTL_API=3 etcdctl --endpoints=https://12.12.10.208:2379 --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key snapshot save /var/lib/etcd/snapshot.db"


everything is going fine, but I wanted to see what is actually contained in the static etcd pod and ... found that the container contains absolutely no commands ... found with great difficulty that the base image for such a container is Distroless:
PRETTY_NAME="Distroless"
NAME="Debian GNU/Linux"
ID="debian" VERSION_ID
="10"

only the cp command is available, not even a cat (cat)), then I had to pervert by copying to the hosted shared_path and look at the os-release file from the host.

There are options to install something in this container for debugging, etc... not apt, not dpkg, not gcc, not cat - nothing in it!?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bankinobi, 2021-08-30
@bankinobi

Hello.
Why put anything? Share cases.
You can also debug from outside via etcdctl --debug with substitution of cluster certificates + etcd cluster has its own metrics and helpchecks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question