mnist example namespace fix (#720)

* update mnist tutorial to use the user profile namespace for the tfjob

* add namespace arg to some kubectl commands
This commit is contained in:
Amy 2020-02-10 10:11:54 -08:00 committed by GitHub
parent 06f9b3f880
commit 0c8d2fdfc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 7 deletions

View File

@ -229,23 +229,35 @@ kustomize edit add configmap mnist-map-training --from-literal=modelDir=gs://${B
kustomize edit add configmap mnist-map-training --from-literal=exportDir=gs://${BUCKET}/${MODEL_PATH}/export
```
You can now submit the job
Build a yaml file for the `TFJob` specification based on your kustomize config:
```
kustomize build . |kubectl apply -f -
kustomize build . > mnist-training.yaml
```
And you can check the job status
Then, in `mnist-training.yaml`, search for this line: `namespace: kubeflow`.
Edit it to **replace `kubeflow` with the name of your user profile namespace**,
which will probably have the form `kubeflow-<username>`. (If you're not sure what this
namespace is called, you can find it in the top menubar of the Kubeflow Central
Dashboard.)
After you've updated the namespace, apply the `TFJob` specification to the
Kubeflow cluster:
```
kubectl get tfjobs -o yaml mnist-train-dist
kubectl apply -f mnist-training.yaml
```
And to check the logs
You can then check the job status:
```
kubectl logs -f mnist-train-dist-chief-0
kubectl get tfjobs -n <your-user-namespace> -o yaml mnist-train-dist
```
And to check the logs:
```
kubectl logs -n <your-user-namespace> -f mnist-train-dist-chief-0
```
#### Using S3