Skip to content

Commit

Permalink
Fixes in Test KFServing installation documentation (kubeflow#838)
Browse files Browse the repository at this point in the history
* Avoid using namespace with control panel label
Use a dedicated namespace for inferenceservice test

* Kubectl command to Fetch hostname to be used in the header curl
Since hostname consists namespace (sklearn-iris.default.example.com)
it might be misleading to document it explicitly since users might
use other namespaces than default

@chipchaderez
  • Loading branch information
maorlipchuk authored May 23, 2020
1 parent 111d2f0 commit 35768c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,20 @@ Please refer to our [troubleshooting section](docs/DEVELOPER_GUIDE.md#troublesho
2) Wait all pods to be ready then launch KFServing `InferenceService`.(wait 1 min for everything to be ready and 40s to
launch the `InferenceService`)
```bash
kubectl apply -f docs/samples/sklearn/sklearn.yaml
kubectl create namespace kfserving-test
kubectl apply -f docs/samples/sklearn/sklearn.yaml -n kfserving-test
```
3) Check KFServing `InferenceService` status.
```bash
kubectl get inferenceservices sklearn-iris
kubectl get inferenceservices sklearn-iris -n kfserving-test
NAME URL READY DEFAULT TRAFFIC CANARY TRAFFIC AGE
sklearn-iris http://sklearn-iris.default.example.com/v1/models/sklearn-iris True 100 109s
sklearn-iris http://sklearn-iris.kfserving-test.example.com/v1/models/sklearn-iris True 100 109s
```
4) Curl the `InferenceService`
```bash
kubectl port-forward --namespace istio-system $(kubectl get pod --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}') 8080:80
curl -v -H "Host: sklearn-iris.default.example.com" http://localhost:8080/v1/models/sklearn-iris:predict -d @./docs/samples/sklearn/iris-input.json
SERVICE_HOSTNAME=$(kubectl get inferenceservice sklearn-iris -n kfserving-test -o jsonpath='{.status.url}' | cut -d "/" -f 3)
curl -v -H "Host: ${SERVICE_HOSTNAME}" http://localhost:8080/v1/models/sklearn-iris:predict -d @./docs/samples/sklearn/iris-input.json
```
### Use KFServing SDK
* Install the SDK
Expand Down

0 comments on commit 35768c9

Please sign in to comment.