Skip to content

Commit f812c08

Browse files
authored
Merge pull request #45439 from pranav-pandey0804/envVar
Fix misleading advice about sharing of environment variables
2 parents 25ce93d + 98e5b08 commit f812c08

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

content/en/docs/concepts/workloads/pods/sidecar-containers.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ throughout the lifecycle of the pod and can be started and stopped independently
101101
main container. Unlike [init containers](/docs/concepts/workloads/pods/init-containers/),
102102
sidecar containers support [probes](/docs/concepts/workloads/pods/pod-lifecycle/#types-of-probe) to control their lifecycle.
103103

104-
These containers can interact directly with the main application containers, sharing
105-
the same network namespace, filesystem, and environment variables. They work closely
106-
together to provide additional functionality.
104+
Sidecar containers can interact directly with the main application containers, because
105+
like init containers they always share the same network, and can optionally also share
106+
volumes (filesystems).
107+
108+
Init containers stop before the main containers start up, so init containers cannot
109+
exchange messages with the app container in a Pod. Any data passing is one-way
110+
(for example, an init container can put information inside an `emptyDir` volume).
107111

108112
## Resource sharing within containers
109113

0 commit comments

Comments
 (0)