mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
921 B
921 B
Get the environment of processes running in containers
Table of contents
TL;DR
# From a shell inside the container.
cat "/proc/${PID}/environ"
# In Kubernetes.
kubectl exec 'pod-name' -- cat '/proc/1/environ'
# This only works if the onboard `ps` is **not** the one from Busybox.
ps e -p "$PID"
Further readings
Sources
All the references in the further readings section, plus the following: