Skip to content

Commit 1b75c44

Browse files
authored
Merge pull request #31058 from championshuttler/notecleanup
Cleanup notes in Define a Command and Arguments docs
2 parents 988b1ba + 7a2863b commit 1b75c44

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

content/en/docs/tasks/inject-data-application/define-command-argument-container.md

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ If you define args, but do not define a command, the default command is used
3636
with your new arguments.
3737

3838
{{< note >}}
39-
The `command` field corresponds to `entrypoint` in some container
40-
runtimes. Refer to the [Notes](#notes) below.
39+
The `command` field corresponds to `entrypoint` in some container runtimes.
4140
{{< /note >}}
4241

4342
In this exercise, you create a Pod that runs one container. The configuration
@@ -111,50 +110,9 @@ command: ["/bin/sh"]
111110
args: ["-c", "while true; do echo hello; sleep 10;done"]
112111
```
113112

114-
## Notes
115-
116-
This table summarizes the field names used by Docker and Kubernetes.
117-
118-
| Description | Docker field name | Kubernetes field name |
119-
|----------------------------------------|------------------------|-----------------------|
120-
| The command run by the container | Entrypoint | command |
121-
| The arguments passed to the command | Cmd | args |
122-
123-
When you override the default Entrypoint and Cmd, these rules apply:
124-
125-
* If you do not supply `command` or `args` for a Container, the defaults defined
126-
in the Docker image are used.
127-
128-
* If you supply a `command` but no `args` for a Container, only the supplied
129-
`command` is used. The default EntryPoint and the default Cmd defined in the Docker
130-
image are ignored.
131-
132-
* If you supply only `args` for a Container, the default Entrypoint defined in
133-
the Docker image is run with the `args` that you supplied.
134-
135-
* If you supply a `command` and `args`, the default Entrypoint and the default
136-
Cmd defined in the Docker image are ignored. Your `command` is run with your
137-
`args`.
138-
139-
Here are some examples:
140-
141-
| Image Entrypoint | Image Cmd | Container command | Container args | Command run |
142-
|--------------------|------------------|---------------------|--------------------|------------------|
143-
| `[/ep-1]` | `[foo bar]` | &lt;not set&gt; | &lt;not set&gt; | `[ep-1 foo bar]` |
144-
| `[/ep-1]` | `[foo bar]` | `[/ep-2]` | &lt;not set&gt; | `[ep-2]` |
145-
| `[/ep-1]` | `[foo bar]` | &lt;not set&gt; | `[zoo boo]` | `[ep-1 zoo boo]` |
146-
| `[/ep-1]` | `[foo bar]` | `[/ep-2]` | `[zoo boo]` | `[ep-2 zoo boo]` |
147-
148-
149-
150-
151113
## {{% heading "whatsnext" %}}
152114

153115

154116
* Learn more about [configuring pods and containers](/docs/tasks/).
155117
* Learn more about [running commands in a container](/docs/tasks/debug-application-cluster/get-shell-running-container/).
156118
* See [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core).
157-
158-
159-
160-

0 commit comments

Comments
 (0)