Works on RHEL/Fedora/Amazon Linux, Debian/Ubuntu and Alpine. For installed vs available: apt-cache policy <package> or dnf list --showduplicates <package>.
Every env var the running container sees. Stopped container: docker inspect <container> --format '{{range .Config.Env}}{{println .}}{{end}}'.
docker exec <container> env
What each part does
docker exec <container>run a command inside the running container (name or ID)
envprint every environment variable, KEY=value per line; use printenv <VAR> for just one
Example
$ docker exec api env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=4f2a9c1e7b3d
NODE_ENV=production
DATABASE_HOST=db
My note Values passed with -e or --env-file (including secrets) are readable by anyone with docker access. Distroless images have no env binary: use the inspect form.
Pods with status, restarts, age, pod IP and node. po is the short name for pods; -A for all namespaces, -w to watch.
kubectl get po -n <namespace> -o wide
What each part does
kubectl getlist resources of a type
poshort name for pods (pod and pods work too)
-n <namespace>in this namespace; -A for every namespace
-o wideadd the pod IP, the node and nominated node columns
Example
$ kubectl get po -n shop -o wide
NAME READY STATUS RESTARTS AGE IP NODE
api-7d9f8c6b5d-2xkqp 1/1 Running 0 3h 10.244.1.17 node-a
api-7d9f8c6b5d-9wz4t 1/1 Running 2 3h 10.244.2.9 node-b