* 'master' of https://github.com/kubernetes/kubernetes.github.io:
  Document kubeadm KUBELET_DNS_ARGS issue
  CronJobs aren't enabled in 1.6 by default
  Fix typo
  Document pod-template-hash label
  Rename last remaining reference of kargo to kubespray
This commit is contained in:
Andrew Chen
2017-06-26 10:58:27 -07:00
5 changed files with 26 additions and 8 deletions
@@ -42,8 +42,6 @@ with batch/v2alpha1 API turned on by passing `--runtime-config=batch/v2alpha1=tr
the API server (see [Turn on or off an API version for your cluster](/docs/admin/cluster-management/#turn-on-or-off-an-api-version-for-your-cluster)
for more).
Beginning with 1.6 series Cron Jobs are enabled by default, but note that you can not use Cron Jobs on a hosted Kubernetes provider that has disabled alpha resources.
## Creating a Cron Job
Here is an example Cron Job. Every minute, it runs a simple job to print current time and then say
@@ -100,12 +100,22 @@ nginx-deployment-2035384211-qqcnn 1/1 Running 0 18s app
The created ReplicaSet will ensure that there are three nginx Pods at all times.
**Note:** You must specify appropriate selector and pod template labels of a Deployment (in this case,
`app = nginx`), i.e. don't overlap with other controllers (including Deployments, ReplicaSets,
ReplicationControllers, etc.) Kubernetes won't stop you from doing that, and if you end up with multiple
controllers that have overlapping selectors, those controllers will fight with each other and won't behave
**Note:** You must specify an appropriate selector and pod template labels in a Deployment (in this case,
`app = nginx`), i.e. don't overlap with other controllers (including other Deployments, ReplicaSets,
StatefulSets, etc.). Kubernetes won't stop you from doing that, and if you end up with multiple
controllers that have overlapping selectors, those controllers may fight with each other and won't behave
correctly.
### Pod-template-hash label
**Note:** This label is not meant to be mutated by users!
Note the pod-template-hash label in the example output in the pod labels above. pod-template-hash is added by the
Deployment controller in every ReplicaSet that a Deployment creates or adopts. Its purpose is so that children
ReplicaSets of a Deployment will not overlap among them. It is computed by hashing the PodTemplate of the ReplicaSet
and using the resulting hash as the label value that will be added in the ReplicaSet selector, pod template labels,
and in any existing Pods that the ReplicaSet may have.
## Updating a Deployment
**Note:** a Deployment's rollout is triggered if and only if the Deployment's pod template (i.e. `.spec.template`)