Hello Carol, Welcome to MS Q&A
Sidecar containers in Kubernetes do not automatically inherit environment variables from the main application container, meaning they cannot directly access the environment variables set for the primary container unless explicitly defined in their own configuration; essentially, each container within a pod has its own set of environment variables, even if they share the same network namespace
Please check this for more details
Kindly let me know if have further questions
Pls accept if it helps
Thanks
Deepanshu