Skip to content

Commit

Permalink
docs: First InferenceService instructions with port-forwarding (#412)
Browse files Browse the repository at this point in the history
Signed-off-by: Nimisha Mehta <nimishamehta5@gmail.com>
  • Loading branch information
nimishamehta5 authored Nov 23, 2024
1 parent d551c91 commit 71c5049
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/get_started/first_isvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@ kubectl get svc istio-ingressgateway -n istio-system
INGRESS_GATEWAY_SERVICE=$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}')
kubectl port-forward --namespace istio-system svc/${INGRESS_GATEWAY_SERVICE} 8080:80
```
Open another terminal, and enter the following:
Open another terminal, and enter the following to perform inference:
```bash
export INGRESS_HOST=localhost
export INGRESS_PORT=8080

SERVICE_HOSTNAME=$(kubectl get inferenceservice sklearn-iris -n kserve-test -o jsonpath='{.status.url}' | cut -d "/" -f 3)
curl -v -H "Host: ${SERVICE_HOSTNAME}" -H "Content-Type: application/json" "http://${INGRESS_HOST}:${INGRESS_PORT}/v1/models/sklearn-iris:predict" -d @./iris-input.json
```

### 5. Perform inference
Expand Down

0 comments on commit 71c5049

Please sign in to comment.