Skip to content

Commit 82cf07f

Browse files
committed
Optimize envfile documentation
Optimize envfile docs
1 parent 722327f commit 82cf07f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

content/en/docs/tasks/inject-data-application/define-environment-variable-via-file.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ When `optional` field is set to false, the specified `key` in `fileKeyRef` must
3434
The volume will only be mounted to the container that writes to the file
3535
(`initContainer`), while the consumer container that consumes the environment variable will not have the volume mounted.
3636

37+
The env file format adheres to the [kubernetes env file standard](/docs/tasks/inject-data-application/define-environment-variable-via-file/#env-file-syntax).
38+
3739
During container initialization, the kubelet retrieves environment variables
3840
from specified files in the `emptyDir` volume and exposes them to the container.
3941

@@ -73,9 +75,13 @@ The output shows the values of selected environment variables:
7375
DB_ADDRESS=address
7476
```
7577

76-
## `.env` File Syntax
78+
## Env File Syntax {#env-file-syntax}
79+
80+
The format of Kubernetes env files originates from `.env` files.
81+
82+
In a shell environment, `.env` files are typically loaded using the `source .env` command.
7783

78-
The following syntax rules apply to environment files:
84+
For Kubernetes, the defined env file format adheres to stricter syntax rules:
7985

8086
* Blank Lines: Blank lines are ignored.
8187

0 commit comments

Comments
 (0)