@@ -24,7 +24,7 @@ spec: # specification of the pod's contents
|
|||||||
containers:
|
containers:
|
||||||
- name: hello
|
- name: hello
|
||||||
image: "ubuntu:14.04"
|
image: "ubuntu:14.04"
|
||||||
command: ["/bin/echo","hello'?,'?world"]
|
command: ["/bin/echo", "hello", "world"]
|
||||||
```
|
```
|
||||||
|
|
||||||
The value of `metadata.name`, `hello-world`, will be the name of the pod resource created, and must be unique within the cluster, whereas `containers[0].name` is just a nickname for the container within that pod. `image` is the name of the Docker image, which Kubernetes expects to be able to pull from a registry, the [Docker Hub](https://registry.hub.docker.com/) by default.
|
The value of `metadata.name`, `hello-world`, will be the name of the pod resource created, and must be unique within the cluster, whereas `containers[0].name` is just a nickname for the container within that pod. `image` is the name of the Docker image, which Kubernetes expects to be able to pull from a registry, the [Docker Hub](https://registry.hub.docker.com/) by default.
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
To update a service without an outage, `kubectl` supports what is called ['rolling update'](/docs/user-guide/kubectl/kubectl_rolling-update), which updates one pod at a time, rather than taking down the entire service at the same time. See the [rolling update design document](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/simple-rolling-update.md) and the [example of rolling update](/docs/user-guide/update-demo/) for more information.
|
To update a service without an outage, `kubectl` supports what is called ['rolling update'](/docs/user-guide/kubectl/kubectl_rolling-update), which updates one pod at a time, rather than taking down the entire service at the same time. See the [rolling update design document](https://github.com/kubernetes/kubernetes/blob/{{page.githubbranch}}/docs/design/simple-rolling-update.md) and the [example of rolling update](/docs/user-guide/update-demo/) for more information.
|
||||||
|
|
||||||
Note that `kubectl rolling-update` only supports Replication Controllers. However, if you deploy applications with Replication Controllers,
|
Note that `kubectl rolling-update` only supports Replication Controllers. However, if you deploy applications with Replication Controllers,
|
||||||
consider switching them to [Deployments](/docs/user-guide/deployments/). A Deployments is a higher-level controller that automates rolling updates
|
consider switching them to [Deployments](/docs/user-guide/deployments/). A Deployments is a higher-level controller that automates rolling updates
|
||||||
of applications declaratively, and therefore is recommended. If you still want to keep your Replication Controllers and use `kubectl rolling-update`, keep reading:
|
of applications declaratively, and therefore is recommended. If you still want to keep your Replication Controllers and use `kubectl rolling-update`, keep reading:
|
||||||
|
|
||||||
A rolling update applies changes to the configuration of pods being managed by
|
A rolling update applies changes to the configuration of pods being managed by
|
||||||
@@ -73,7 +73,7 @@ The update will fail if `IMAGE:TAG` is identical to the
|
|||||||
current value. For this reason, we recommend the use of versioned tags as
|
current value. For this reason, we recommend the use of versioned tags as
|
||||||
opposed to values such as `:latest`. Doing a rolling update from `image:latest`
|
opposed to values such as `:latest`. Doing a rolling update from `image:latest`
|
||||||
to a new `image:latest` will fail, even if the image at that tag has changed.
|
to a new `image:latest` will fail, even if the image at that tag has changed.
|
||||||
Moreover, the use of `:latest` is not recommended, see
|
Moreover, the use of `:latest` is not recommended, see
|
||||||
[Best Practices for Configuration](/docs/user-guide/config-best-practices/#container-images) for more information.
|
[Best Practices for Configuration](/docs/user-guide/config-best-practices/#container-images) for more information.
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@@ -215,7 +215,7 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.9.2
|
image: nginx:1.9.2
|
||||||
args: [“nginx”,”-T”]
|
args: ["nginx", "-T"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user