@@ -36,8 +36,7 @@ If you define args, but do not define a command, the default command is used
36
36
with your new arguments.
37
37
38
38
{{< 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.
41
40
{{< /note >}}
42
41
43
42
In this exercise, you create a Pod that runs one container. The configuration
@@ -111,50 +110,9 @@ command: ["/bin/sh"]
111
110
args: [" -c" , " while true; do echo hello; sleep 10;done" ]
112
111
` ` `
113
112
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
-
151
113
# # {{% heading "whatsnext" %}}
152
114
153
115
154
116
* Learn more about [configuring pods and containers](/docs/tasks/).
155
117
* Learn more about [running commands in a container](/docs/tasks/debug-application-cluster/get-shell-running-container/).
156
118
* See [Container](/docs/reference/generated/kubernetes-api/{{< param " version" > }}/# container-v1-core).
157
-
158
-
159
-
160
-
0 commit comments