In links to ref pages, use {{page.version}}.
This commit is contained in:
committed by
Andrew Chen
parent
28f3cfdd4f
commit
f9ac865c5f
@@ -134,7 +134,7 @@ Here are some examples:
|
||||
* Learn more about [containers and commands](/docs/user-guide/containers/).
|
||||
* Learn more about [configuring containers](/docs/user-guide/configuring-containers/).
|
||||
* Learn more about [running commands in a container](/docs/tasks/kubectl/get-shell-running-container/).
|
||||
* See [Container](/docs/api-reference/v1.6/#container-v1-core).
|
||||
* See [Container](/docs/api-reference/{{page.version}}/#container-v1-core).
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Pod:
|
||||
|
||||
* Learn more about [environment variables](/docs/tasks/configure-pod-container/environment-variable-expose-pod-information/).
|
||||
* Learn about [using secrets as environment variables](/docs/user-guide/secrets/#using-secrets-as-environment-variables).
|
||||
* See [EnvVarSource](/docs/api-reference/v1.6/#envvarsource-v1-core).
|
||||
* See [EnvVarSource](/docs/api-reference/{{page.version}}/#envvarsource-v1-core).
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@ Here is a configuration file you can use to create a Pod:
|
||||
|
||||
### Reference
|
||||
|
||||
* [Secret](/docs/api-reference/v1.6/#secret-v1-core)
|
||||
* [Volume](/docs/api-reference/v1.6/#volume-v1-core)
|
||||
* [Pod](/docs/api-reference/v1.6/#pod-v1-core)
|
||||
* [Secret](/docs/api-reference/{{page.version}}/#secret-v1-core)
|
||||
* [Volume](/docs/api-reference/{{page.version}}/#volume-v1-core)
|
||||
* [Pod](/docs/api-reference/{{page.version}}/#pod-v1-core)
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ In the configuration file, you can see that the Pod has a `downwardAPI` Volume,
|
||||
and the Container mounts the Volume at `/etc`.
|
||||
|
||||
Look at the `items` array under `downwardAPI`. Each element of the array is a
|
||||
[DownwardAPIVolumeFile](/docs/resources-reference/v1.6/#downwardapivolumefile-v1-core).
|
||||
[DownwardAPIVolumeFile](/docs/resources-reference/{{page.version}}/#downwardapivolumefile-v1-core).
|
||||
The first element specifies that the value of the Pod's
|
||||
`metadata.labels` field should be stored in a file named `labels`.
|
||||
The second element specifies that the value of the Pod's `annotations`
|
||||
The second element specifies that the value of the Pod's `annotations`
|
||||
field should be stored in a file named `annotations`.
|
||||
|
||||
**Note**: The fields in this example are Pod fields. They are not
|
||||
@@ -149,7 +149,7 @@ Exit the shell:
|
||||
|
||||
## Store Container fields
|
||||
|
||||
The preceding exercise, you stored Pod fields in a DownwardAPIVolumeFile.
|
||||
The preceding exercise, you stored Pod fields in a DownwardAPIVolumeFile.
|
||||
In this next exercise, you store Container fields. Here is the configuration
|
||||
file for a Pod that has one Container:
|
||||
|
||||
@@ -162,7 +162,7 @@ Look at the `items` array under `downwardAPI`. Each element of the array is a
|
||||
DownwardAPIVolumeFile.
|
||||
|
||||
The first element specifies that in the Container named `client-container`,
|
||||
the value of the `limits.cpu` field
|
||||
the value of the `limits.cpu` field
|
||||
should be stored in a file named `cpu_limit`.
|
||||
|
||||
Create the Pod:
|
||||
@@ -238,11 +238,11 @@ inject the Pod's name into the well-known environment variable.
|
||||
|
||||
{% capture whatsnext %}
|
||||
|
||||
* [PodSpec](/docs/resources-reference/v1.6/#podspec-v1-core)
|
||||
* [Volume](/docs/resources-reference/v1.6/#volume-v1-core)
|
||||
* [DownwardAPIVolumeSource](/docs/resources-reference/v1.6/#downwardapivolumesource-v1-core)
|
||||
* [DownwardAPIVolumeFile](/docs/resources-reference/v1.6/#downwardapivolumefile-v1-core)
|
||||
* [ResourceFieldSelector](/docs/resources-reference/v1.6/#resourcefieldselector-v1-core)
|
||||
* [PodSpec](/docs/resources-reference/{{page.version}}/#podspec-v1-core)
|
||||
* [Volume](/docs/resources-reference/{{page.version}}/#volume-v1-core)
|
||||
* [DownwardAPIVolumeSource](/docs/resources-reference/{{page.version}}/#downwardapivolumesource-v1-core)
|
||||
* [DownwardAPIVolumeFile](/docs/resources-reference/{{page.version}}/#downwardapivolumefile-v1-core)
|
||||
* [ResourceFieldSelector](/docs/resources-reference/{{page.version}}/#resourcefieldselector-v1-core)
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Pod fields and Container fields.
|
||||
|
||||
There are two ways to expose Pod and Container fields to a running Container:
|
||||
environment variables and
|
||||
[DownwardAPIVolumeFiles](/docs/resources-reference/v1.6/#downwardapivolumefile-v1-core).
|
||||
[DownwardAPIVolumeFiles](/docs/resources-reference/{{page.version}}/#downwardapivolumefile-v1-core).
|
||||
Together, these two ways of exposing Pod and Container fields are called the
|
||||
*Downward API*.
|
||||
|
||||
@@ -36,7 +36,7 @@ Together, these two ways of exposing Pod and Container fields are called the
|
||||
There are two ways to expose Pod and Container fields to a running Container:
|
||||
|
||||
* Environment variables
|
||||
* [DownwardAPIVolumeFiles](/docs/resources-reference/v1.6/#downwardapivolumefile-v1-core)
|
||||
* [DownwardAPIVolumeFiles](/docs/resources-reference/{{page.version}}/#downwardapivolumefile-v1-core)
|
||||
|
||||
Together, these two ways of exposing Pod and Container fields are called the
|
||||
*Downward API*.
|
||||
@@ -51,7 +51,7 @@ configuration file for the Pod:
|
||||
|
||||
In the configuration file, you can see five environment variables. The `env`
|
||||
field is an array of
|
||||
[EnvVars](/docs/resources-reference/v1.6/#envvar-v1-core).
|
||||
[EnvVars](/docs/resources-reference/{{page.version}}/#envvar-v1-core).
|
||||
The first element in the array specifies that the `MY_NODE_NAME` environment
|
||||
variable gets its value from the Pod's `spec.nodeName` field. Similarly, the
|
||||
other environment variables get their names from Pod fields.
|
||||
@@ -128,7 +128,7 @@ container:
|
||||
|
||||
In the configuration file, you can see four environment variables. The `env`
|
||||
field is an array of
|
||||
[EnvVars](/docs/resources-reference/v1.6/#envvar-v1-core).
|
||||
[EnvVars](/docs/resources-reference/{{page.version}}/#envvar-v1-core).
|
||||
The first element in the array specifies that the `MY_CPU_REQUEST` environment
|
||||
variable gets its value from the `requests.cpu` field of a Container named
|
||||
`test-container`. Similarly, the other environment variables get their values
|
||||
@@ -166,12 +166,12 @@ The output shows the values of selected environment variables:
|
||||
{% capture whatsnext %}
|
||||
|
||||
* [Defining Environment Variables for a Container](/docs/tasks/configure-pod-container/define-environment-variable-container/)
|
||||
* [PodSpec](/docs/resources-reference/v1.6/#podspec-v1-core)
|
||||
* [Container](/docs/resources-reference/v1.6/#container-v1-core)
|
||||
* [EnvVar](/docs/resources-reference/v1.6/#envvar-v1-core)
|
||||
* [EnvVarSource](/docs/resources-reference/v1.6/#envvarsource-v1-core)
|
||||
* [ObjectFieldSelector](/docs/resources-reference/v1.6/#objectfieldselector-v1-core)
|
||||
* [ResourceFieldSelector](/docs/resources-reference/v1.6/#resourcefieldselector-v1-core)
|
||||
* [PodSpec](/docs/resources-reference/{{page.version}}/#podspec-v1-core)
|
||||
* [Container](/docs/resources-reference/{{page.version}}/#container-v1-core)
|
||||
* [EnvVar](/docs/resources-reference/{{page.version}}/#envvar-v1-core)
|
||||
* [EnvVarSource](/docs/resources-reference/{{page.version}}/#envvarsource-v1-core)
|
||||
* [ObjectFieldSelector](/docs/resources-reference/{{page.version}}/#objectfieldselector-v1-core)
|
||||
* [ResourceFieldSelector](/docs/resources-reference/{{page.version}}/#resourcefieldselector-v1-core)
|
||||
|
||||
{% endcapture %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user