Kfserving: should the port forwarding be on service or pod in the tutorial on README.md?

Created on 23 Jul 2020  路  4Comments  路  Source: kubeflow/kfserving

I followed the tutorial on README.md.

At Step 4 Curl the InferenceService, port forwarding on the pod doesn't work for me.

kubectl port-forward --namespace istio-system $(kubectl get pod --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}') 8080:80 &

error is like

curl  -H "Host: ${SERVICE_HOSTNAME}" http://localhost:8080/v1/models/sklearn-iris:predict -d @./docs/samples/sklearn/iris-input.json
curl: (52) Empty reply from server
Forwarding from 127.0.0.1:8080 -> 80
Forwarding from [::1]:8080 -> 80
Handling connection for 8080
E0723 11:29:11.652569   71077 portforward.go:400] an error occurred forwarding 8080 -> 80: error forwarding port 80 to pod 0c266ba2b8421a4f014b4eb0bfc985a998632692531cd86c1b163b5492ebfd5c, uid : exit status 1: 2020/07/23 18:29:11 socat[58515] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused

Instead, port forwarding on service works

kubectl port-forward --namespace istio-system svc/$(kubectl get svc --namespace istio-system --selector="app=istio-ingressgateway" --output jsonpath='{.items[0].metadata.name}') 8080:80

Is that expected?

areengprod kinquestion

All 4 comments

Issue-Label Bot is automatically applying the labels:

| Label | Probability |
| ------------- | ------------- |
| kind/question | 0.94 |

Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.

Issue-Label Bot is automatically applying the labels:

| Label | Probability |
| ------------- | ------------- |
| area/engprod | 0.58 |

Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.

Issue-Label Bot is automatically applying the labels:

| Label | Probability |
| ------------- | ------------- |
| area/engprod | 0.58 |

Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.

@zyxue the command used to work and your way definitely works too, possibly something related to recent change to use the new istio 1.6.2 release for quick install demo. Please feel free to send a PR to fix it, thanks!

Was this page helpful?
0 / 5 - 0 ratings