Fields within the pod are selected using the FieldRef
API type. FieldRef
has two fields:
Field |
Description |
fieldPath
|
The path of the field to select, relative to the pod. |
apiVersion
|
The API version to interpret the fieldPath selector within. |
Currently, there are four valid selectors in the v1 API:
Selector |
Description |
metadata.name
|
The pod’s name. |
metadata.namespace
|
The pod’s namespace. |
metadata.labels
|
The pod’s labels. |
metadata.annotations
|
The pod’s annotations. |
The apiVersion
field, if not specified, defaults to the API version of the
enclosing pod template.
In the future, more information, such as resource limits for pods and
information about services, will be available using the downward API.