Skip to content

Commit

Permalink
Adds notes and example annotation for tfjob (#2017)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnzhu committed Jun 25, 2020
1 parent fac4d1b commit 4b1a06e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions content/en/docs/components/training/tftraining.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ TFJob is a Kubernetes
implementation of TFJob is in
[`tf-operator`](https://github.com/kubeflow/tf-operator).

**Note**: TFJob doesn't work in a user namespace by default because of Istio [automatic sidecar injection](https://istio.io/v1.3/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection). In order to get TFJob running, it needs annotation `sidecar.istio.io/inject: "false"` to disable it for TFJob pods.

A TFJob is a resource with a YAML representation like the one below (edit to use the container image and command for your own training code):

```yaml
Expand All @@ -30,6 +32,9 @@ spec:
replicas: 1
restartPolicy: OnFailure
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: tensorflow
Expand All @@ -44,6 +49,9 @@ spec:
replicas: 3
restartPolicy: OnFailure
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: tensorflow
Expand All @@ -70,6 +78,9 @@ spec:
replicas: 1
restartPolicy: OnFailure
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: tensorflow
Expand All @@ -95,6 +106,9 @@ spec:
replicas: 1
restartPolicy: OnFailure
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
containers:
- name: tensorflow
Expand Down

0 comments on commit 4b1a06e

Please sign in to comment.