Skip to content

Commit

Permalink
Add a simple pod manifest to pod overview (#5986)
Browse files Browse the repository at this point in the history
  • Loading branch information
tengqm authored and steveperry-53 committed Oct 25, 2017
1 parent 6ed5d06 commit 59fd2c4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/concepts/workloads/pods/pod-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ In general, Controllers use a Pod Template that you provide to create the Pods f
Pod templates are pod specifications which are included in other objects, such as
[Replication Controllers](/docs/concepts/workloads/controllers/replicationcontroller/), [Jobs](/docs/concepts/jobs/run-to-completion-finite-workloads/), and
[DaemonSets](/docs/concepts/workloads/controllers/daemonset/). Controllers use Pod Templates to make actual pods.
The sample below is a simple manifest for a Pod which contains a container that prints
a message.

```yaml
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: busybox
command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600']
```
Rather than specifying the current desired state of all replicas, pod templates are like cookie cutters. Once a cookie has been cut, the cookie has no relationship to the cutter. There is no quantum entanglement. Subsequent changes to the template or even switching to a new template has no direct effect on the pods already created. Similarly, pods created by a replication controller may subsequently be updated directly. This is in deliberate contrast to pods, which do specify the current desired state of all containers belonging to the pod. This approach radically simplifies system semantics and increases the flexibility of the primitive.
Expand Down

0 comments on commit 59fd2c4

Please sign in to comment.