Kubernetes Server with PVC
import osos.environ["NAMESPACE"] = "seldon-mesh"MESH_IP=!kubectl get svc seldon-mesh -n ${NAMESPACE} -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
MESH_IP=MESH_IP[0]
import os
os.environ['MESH_IP'] = MESH_IP
MESH_IP'172.19.255.1'Kind cluster setup
To run this example in Kind we need to start Kind with access to a local folder where are models are location. In this example we will use a folder in /tmp and associate that with a path in the container.
!cat kind-config.yamlapiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
extraMounts:
- hostPath: /tmp/models
containerPath: /modelsTo start a Kind cluster with these settings using our ansible script you can run from the project root folder
Now you should finish the Seldon install following the docs.
Create the local folder we will use for our models and copy an example iris sklearn model to it.
Create Server with PVC
Here we create a storage class and associated persistent colume referencing the /models folder where our models are stored.
Now we create a new Server based on the provided MLServer configuration but extend it with our PVC by adding this to the rclone container which will allow rclone to move models from this PVC onto the server.
We also add a new capability pvc to allow us to schedule models to this server that has the PVC.
SKLearn Model
We use a simple sklearn iris classification model with the added pvc requirement so our MLServer with the PVC will be targeted during scheduling.
Do a gRPC inference call
Last updated
Was this helpful?

