Change:
Consider the following Dockerfile: And the following Now I say After changing "echo 1" to "echo 2" in the Dockerfile and re-building and re-pushing it to the same image name/tag, I call and watch the logs with ... and get a lot of "1"s. Thus, the image was not pulled although imagePullPolicy was set to "Always". I see no difference between "Always" and "IfNotPresent" then, so I suspect something in kubectl is not working.
It seems to work if I indent "imagePullPolicy" into the container data in the YAML file. However, shouldn't it also work at the container-global position? Besides, there is no error message.
is the container's field, It works only when you put it there. And because the Go json parser kubernetes use now has a number of limitations, so doesn't show helpful information when you specified a field wrong place. We've been investigating alternatives parser,
But then, the docs need to be clarified: speaks of "spec.containers.imagePullPolicy", which suggests that imagePullPolicy sits on the same level as each container rather than within a container. And in , imagePullPolicy is clearly defined outside the container.
Ah, I see the latter is already fixed.

Discussion:
- For example: `metadata.uid` is set synchronously.  (Read more about [metadata](../devel/api-conventions.md#metadata)). - For example, `status.hostIP` is set only after the pod has been scheduled.  This often happens fast, but you may notice pods which do not have this set yet.  This is called Late Initialization.  (Read mode about [status](../devel/api-conventions.md#spec-and-status) and [late initialization](../devel/api-conventions.md#late-initialization) ). - Some fields are set to default values.  Some defaults vary by cluster and some are fixed for the API at a certain version.  (Read more about [defaulting](../devel/api-conventions.md#defaulting)). <del> - For example, `spec.containers.imagePullPolicy` always defaults to `IfNotPresent` in api v1. - For example, `spec.containers.resources.limits.cpu` may be defaulted to  `100m` on some clusters, to some other value on others, and not defaulted at all on others. </del> <ins> - For example, `spec.containers[0].imagePullPolicy` always defaults to `IfNotPresent` in api v1. - For example, `spec.containers[0].resources.limits.cpu` may be defaulted to  `100m` on some clusters, to some other value on others, and not defaulted at all on others. </ins> The API will generally not modify fields that you have set; it just sets ones which were unspecified. ## <a name="finding_schema_docs"></a>Finding Documentation on Resource Fields <del> You can browse auto-generated API documentation at the [project website](http://kubernetes.io/third_party/swagger-ui/) or directly from your cluster, like this: - Run `kubectl proxy --api-prefix=/` - Go to `http://localhost:8001/swagger-ui` in your browser. - It should say "swagger" at the top-left. Once there: - Click on "v1" and wait for it to expand. - Search for "pods", "services", "replicationcontrollers" or some other resource. - Click on that POST row for the matching resource. - Click on the words "Model". - You should see a list of all possible resource fields, starting with `v1.pods {...}` </del> <ins> You can browse auto-generated API documentation at the [project website](http://kubernetes.io/v1.0/api-ref.html) or on [github](../../docs/api-reference/). </ins> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->