Move to Injecting section: Environment Variables. (#3801)

This commit is contained in:
Steve Perry
2017-05-15 14:54:25 -07:00
committed by GitHub
parent 9cca278d3b
commit 187d97f8ed
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -14,7 +14,6 @@ toc:
- docs/tasks/configure-pod-container/configure-volume-storage.md
- docs/tasks/configure-pod-container/configure-persistent-volume-storage.md
- docs/tasks/configure-pod-container/projected-volume.md
- docs/tasks/configure-pod-container/environment-variable-expose-pod-information.md
- docs/tasks/configure-pod-container/configure-service-account.md
- docs/tasks/configure-pod-container/pull-image-private-registry.md
- docs/tasks/configure-pod-container/configure-liveness-readiness-probes.md
@@ -28,6 +27,7 @@ toc:
section:
- docs/tasks/inject-data-application/define-command-argument-container.md
- docs/tasks/inject-data-application/define-environment-variable-container.md
- docs/tasks/inject-data-application/environment-variable-expose-pod-information.md
- docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md
- docs/tasks/inject-data-application/distribute-credentials-secure.md
- docs/tasks/inject-data-application/podpreset.md
@@ -3,6 +3,8 @@ title: Exposing Pod Information to Containers Through Environment Variables
redirect_from:
- "/docs/user-guide/environment-guide/"
- "/docs/user-guide/environment-guide/index.html"
- "/docs/tasks/configure-pod-container/environment-variable-expose-pod-information/"
- "/docs/tasks/configure-pod-container/environment-variable-expose-pod-information.html"
---
{% capture overview %}
@@ -45,7 +47,7 @@ Together, these two ways of exposing Pod and Container fields are called the
In this exercise, you create a Pod that has one Container. Here is the
configuration file for the Pod:
{% include code.html language="yaml" file="dapi-envars-pod.yaml" ghlink="/docs/tasks/configure-pod-container/dapi-envars-pod.yaml" %}
{% include code.html language="yaml" file="dapi-envars-pod.yaml" ghlink="/docs/tasks/inject-data-application/dapi-envars-pod.yaml" %}
In the configuration file, you can see five environment variables. The `env`
field is an array of
@@ -60,7 +62,7 @@ Container in the Pod.
Create the Pod:
```shell
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/dapi-envars-pod.yaml
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-envars-pod.yaml
```
Verify that the Container in the Pod is running:
@@ -122,7 +124,7 @@ variables. In this next exercise, you use Container fields as the values for
environment variables. Here is the configuration file for a Pod that has one
container:
{% include code.html language="yaml" file="dapi-envars-container.yaml" ghlink="/docs/tasks/configure-pod-container/dapi-envars-container.yaml" %}
{% include code.html language="yaml" file="dapi-envars-container.yaml" ghlink="/docs/tasks/inject-data-application/dapi-envars-container.yaml" %}
In the configuration file, you can see four environment variables. The `env`
field is an array of
@@ -135,7 +137,7 @@ from Container fields.
Create the Pod:
```shell
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/dapi-envars-container.yaml
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-envars-container.yaml
```
Verify that the Container in the Pod is running: