Skip to content

Commit

Permalink
Update docs to include example of tolerations in a pod (#16157)
Browse files Browse the repository at this point in the history
Co-Authored-By: Tim Bannister <tim@scalefactory.com>
  • Loading branch information
2 people authored and k8s-ci-robot committed Sep 27, 2019
1 parent 5f9fe16 commit 8c0be10
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Expand Up @@ -61,6 +61,10 @@ tolerations:
effect: "NoSchedule"
```

Here’s an example of a pod that uses tolerations:

{{< codenew file="pods/pod-with-toleration.yaml" >}}

A toleration "matches" a taint if the keys are the same and the effects are the same, and:

* the `operator` is `Exists` (in which case no `value` should be specified), or
Expand Down
15 changes: 15 additions & 0 deletions content/en/examples/pods/pod-with-toleration.yaml
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
tolerations:
- key: "example-key"
operator: "Exists"
effect: "NoSchedule"

0 comments on commit 8c0be10

Please sign in to comment.