Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4b5d47d1
Commit
4b5d47d1
authored
May 11, 2015
by
Nikhil Jindal
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8027 from pmorie/dapi-docs
Fix example in downward-api docs
parents
9c0fdc7a
634fb6e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
33 deletions
+20
-33
downward_api.md
docs/downward_api.md
+20
-33
No files found.
docs/downward_api.md
View file @
4b5d47d1
...
@@ -24,37 +24,24 @@ field is the version of the API schema that the `fieldPath` is written in terms
...
@@ -24,37 +24,24 @@ field is the version of the API schema that the `fieldPath` is written in terms
This is an example of a pod that consumes its name and namespace via the downward API:
This is an example of a pod that consumes its name and namespace via the downward API:
```
json
```
yaml
{
apiVersion
:
v1beta3
"apiVersion"
:
"v1beta3"
,
kind
:
Pod
"name"
:
"downward-api-pod"
,
metadata
:
"kind"
:
"Pod"
,
name
:
dapi-test-pod
"spec"
:
{
spec
:
"manifest"
:
{
containers
:
"containers"
:
[{
-
name
:
test-container
"name"
:
"example-container"
,
image
:
gcr.io/google_containers/busybox
"image"
:
"gcr.io/google_containers/busybox"
,
command
:
[
"
/bin/sh"
,
"
-c"
,
"
env"
]
"command"
:
[
"sh"
,
"-c"
,
"env"
]
env
:
"env"
:
[{
-
name
:
POD_NAME
"name"
:
"POD_NAMESPACE"
,
valueFrom
:
"valueFrom"
:
{
fieldRef
:
"fieldPath"
:
{
fieldPath
:
metadata.name
"apiVersion"
:
"v1beta3"
,
-
name
:
POD_NAMESPACE
"fieldPath"
:
"metadata.namespace"
valueFrom
:
}
fieldRef
:
}
fieldPath
:
metadata.namespace
},
restartPolicy
:
Never
{
"name"
:
"POD_NAME"
,
"valueFrom"
:
{
"fieldPath"
:
{
"apiVersion"
:
"v1beta3"
,
"fieldPath"
:
"metadata.name"
}
}
}]
}]
}
}
}]
```
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment