Merge pull request #3474 from kubernetes/chenopis-1.6-merge-patch1
Review conflicts from 1.6-release/master mergesreviewable/pr3427/r10
commit
830adcb3cc
|
@ -106,4 +106,4 @@ to pick up the `--runtime-config` changes.
|
|||
DaemonSets, Deployments, HorizontalPodAutoscalers, Ingress, Jobs and ReplicaSets are enabled by default.
|
||||
Other extensions resources can be enabled by setting `--runtime-config` on
|
||||
apiserver. `--runtime-config` accepts comma separated values. For ex: to disable deployments and jobs, set
|
||||
`--runtime-config=extensions/v1beta1/deployments=false,extensions/v1beta1/jobs=false`
|
||||
`--runtime-config=extensions/v1beta1/deployments=false,extensions/v1beta1/ingress=false`
|
||||
|
|
|
@ -76,7 +76,7 @@ Kubernetes satisfies a number of common needs of applications running in product
|
|||
* [load balancing](/docs/concepts/services-networking/service/),
|
||||
* [rolling updates](/docs/tasks/run-application/rolling-update-replication-controller/),
|
||||
* [resource monitoring](/docs/concepts/cluster-administration/resource-usage-monitoring/),
|
||||
* [log access and ingestion](/docs/concepts/clusters/logging/),
|
||||
* [log access and ingestion](/docs/concepts/cluster-administration/logging/),
|
||||
* [support for introspection and debugging](/docs/tasks/debug-application-cluster/debug-application-introspection/), and
|
||||
* [identity and authorization](/docs/admin/authorization/).
|
||||
|
||||
|
|
|
@ -24,12 +24,6 @@ due to a node hardware failure or a node reboot).
|
|||
|
||||
A Job can also be used to run multiple pods in parallel.
|
||||
|
||||
### extensions/v1beta1.Job is deprecated
|
||||
|
||||
Starting from version 1.5 `extensions/v1beta1.Job` is being deprecated, with a plan to be removed in
|
||||
version 1.6 of Kubernetes (see this [issue](https://github.com/kubernetes/kubernetes/issues/32763)).
|
||||
Please use `batch/v1.Job` instead.
|
||||
|
||||
## Running an example Job
|
||||
|
||||
Here is an example Job config. It computes π to 2000 places and prints it out.
|
||||
|
|
|
@ -305,34 +305,6 @@ SPECIAL_TYPE_KEY=charm
|
|||
log_level=INFO
|
||||
```
|
||||
|
||||
#### Optional ConfigMap in environment variables
|
||||
|
||||
There might be situations where environment variables are not
|
||||
always required. These environment variables can be marked as optional in a
|
||||
pod like so:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: dapi-test-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: test-container
|
||||
image: gcr.io/google_containers/busybox
|
||||
command: [ "/bin/sh", "-c", "env" ]
|
||||
env:
|
||||
- name: SPECIAL_LEVEL_KEY
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: a-config
|
||||
key: akey
|
||||
optional: true
|
||||
restartPolicy: Never
|
||||
```
|
||||
|
||||
When this pod is run, the output will be empty.
|
||||
|
||||
### Use-Case: Set command-line arguments with ConfigMap
|
||||
|
||||
ConfigMaps can also be used to set the value of the command or arguments in a container. This is
|
||||
|
@ -464,38 +436,6 @@ very
|
|||
You can project keys to specific paths and specific permissions on a per-file
|
||||
basis. The [Secrets](/docs/concepts/configuration/secret/) user guide explains the syntax.
|
||||
|
||||
#### Optional ConfigMap via volume plugin
|
||||
|
||||
Volumes and files provided by a ConfigMap can be also be marked as optional.
|
||||
The ConfigMap or the key specified does not have to exist. The mount path for
|
||||
such items will always be created.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: dapi-test-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: test-container
|
||||
image: gcr.io/google_containers/busybox
|
||||
command: [ "/bin/sh", "-c", "ls /etc/config" ]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: no-config
|
||||
optional: true
|
||||
restartPolicy: Never
|
||||
```
|
||||
|
||||
When this pod is run, the output will be:
|
||||
|
||||
```shell
|
||||
```
|
||||
|
||||
## Real World Example: Configuring Redis
|
||||
|
||||
Let's take a look at a real-world example: configuring redis using ConfigMap. Say that we want to inject
|
||||
|
|
|
@ -4,4 +4,4 @@ title: Jobs
|
|||
|
||||
{% include user-guide-content-moved.md %}
|
||||
|
||||
[Run to Completion Finite Workloads](/docs/concepts/jobs/run-to-completion-finite-workloads/)
|
||||
[Run to Completion Finite Workloads](/docs/concepts/workloads/controllers/jobs-run-to-completion/)
|
Loading…
Reference in New Issue