KServe
https://kserve.github.io/website/0.10/modelserving/control_plane/
https://kserve.github.io/website/0.10/modelserving/data_plane/data_plane/
설치
helm upgrade kserve-crd kserve-crd-v0.11.2.tgz \
--install \
--history-max 5
helm show values kserve-v0.11.2.tgz \
> kserve-values.yaml
kserve-values.yaml
kserve:
controller:
gateway:
domain: <domain>
localGateway:
# InferenceService를 생성하면
# gateway로 들어오는 요청을 gatewayService:80으로 전달하는
# VirtualService를 생성합니다
gateway: <gatewayNamespace>/<gatewayName>
gatewayService: <ingressGatewayServiceHost>
ingressGateway:
gateway: <gatewayNamespace>/<gatewayName>
gatewayService: <ingressGatewayServiceHost>
modelmesh:
enabled: false
helm template kserve kserve-v0.11.2.tgz \
-n kserve \
-f kserve-values.yaml \
> kserve.yaml
helm upgrade kserve kserve-v0.11.2.tgz \
--install \
--history-max 5 \
-n kserve \
-f kserve-values.yaml
Test
kubectl create namespace kserve-test
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: sklearn-iris
namespace: kserve-test
spec:
predictor:
model:
modelFormat:
name: sklearn
storageUri: gs://kfserving-examples/models/sklearn/1.0/model
args: ["--enable_docs_url=True"]
curl -v \
-H "Host: sklearn-iris.kserve-test.svc.cluster.local" \
http://localhost:8081/v1/models/sklearn-iris:predict \
-d '{"instances": [[6.8, 2.8, 4.8, 1.4],[6.0, 3.4, 4.5, 1.6]]}'