coreweave/kfserving
forked from kserve/kserve
Captured source
source ↗coreweave/kfserving
Description: Serverless Inferencing on Kubernetes
Language: Jsonnet
License: Apache-2.0
Stars: 2
Forks: 1
Open issues: 165
Created: 2020-04-21T05:26:41Z
Pushed: 2025-03-12T01:33:54Z
Default branch: master
Fork: yes
Parent repository: kserve/kserve
Archived: no
README:
KFServing
KFServing provides a Kubernetes Custom Resource Definition for serving machine learning (ML) models on arbitrary frameworks. It aims to solve production model serving use cases by providing performant, high abstraction interfaces for common ML frameworks like Tensorflow, XGBoost, ScikitLearn, PyTorch, and ONNX.
It encapsulates the complexity of autoscaling, networking, health checking, and server configuration to bring cutting edge serving features like GPU Autoscaling, Scale to Zero, and Canary Rollouts to your ML deployments. It enables a simple, pluggable, and complete story for Production ML Serving including prediction, pre-processing, post-processing and explainability.

Learn More
To learn more about KFServing, how to deploy it as part of Kubeflow, how to use various supported features, and how to participate in the KFServing community, please follow the KFServing docs on the Kubeflow Website.
Prerequisites
Knative Serving and Istio should be available on Kubernetes Cluster, Knative depends on Istio Ingress Gateway to route requests to Knative services. To use the exact versions tested by the Kubeflow and KFServing teams, please refer to the [prerequisites on developer guide](docs/DEVELOPER_GUIDE.md#install-knative-on-a-kubernetes-cluster)
- Istio: v1.1.6+
If you want to get up running Knative quickly or you do not need service mesh, we recommend installing Istio without service mesh(sidecar injection).
- Knative Serving: v0.11.2+
Currently only Knative Serving is required, cluster-local-gateway is required to serve cluster-internal traffic for transformer and explainer use cases. Please follow instructions here to install cluster local gateway
- Cert Manager: v0.12.0+
Cert manager is needed to provision KFServing webhook certs for production grade installation, alternatively you can run our self signed certs generation [script](./hack/self-signed-ca.sh).
Install KFServing
Standalone KFServing Installation
KFServing can be installed standalone if your kubernetes cluster meets the above prerequisites and KFServing controller is deployed in kfserving-system namespace.
TAG=v0.3.0 kubectl apply -f ./install/$TAG/kfserving.yaml
KFServing uses pod mutator or mutating admission webhooks to inject the storage initializer component of KFServing. By default all the pods in namespaces which are not labelled with control-plane label go through the pod mutator. This can cause problems and interfere with Kubernetes control panel when KFServing pod mutator webhook is not in ready state yet.
For Kubernetes 1.14 users we suggest enabling the following environment variable ENABLE_WEBHOOK_NAMESPACE_SELECTOR so that only pods in the namespaces which are labelled serving.kubeflow.org/inferenceservice: enabled go through the KFServing pod mutator.
env: - name: ENABLE_WEBHOOK_NAMESPACE_SELECTOR value: enabled
For Kubernetes 1.15+ users we strongly suggest turning on the object selector so that only KFServing InferenceService pods go through the pod mutator.
kubectl patch mutatingwebhookconfiguration inferenceservice.serving.kubeflow.org --patch '{"webhooks":[{"name": "inferenceservice.kfserving-webhook-server.pod-mutator","objectSelector":{"matchExpressions":[{"key":"serving.kubeflow.org/inferenceservice", "operator": "Exists"}]}}]}'KFServing in Kubeflow Installation
KFServing is installed by default as part of Kubeflow installation using Kubeflow manifests and KFServing controller is deployed in kubeflow namespace. Since Kubeflow Kubernetes minimal requirement is 1.14 which does not support object selector, ENABLE_WEBHOOK_NAMESPACE_SELECTOR is enabled in Kubeflow installation by default. If you are using Kubeflow dashboard or profile controller to create user namespaces, labels are automatically added to enable KFServing to deploy models. If you are creating namespaces manually using Kubernetes apis directly, you will need to add label serving.kubeflow.org/inferenceservice: enabled to allow deploying KFServing InferenceService in the given namespaces, and do ensure you do not deploy InferenceService in kubeflow namespace which is labelled as control-panel.
Install KFServing in 5 Minutes (On your local machine)
Make sure you have kubectl, helm 3 installed before you start.(2 mins for setup) 1) If you do not have an existing kubernetes cluster you can create a quick kubernetes local cluster with kind.(this takes 30s)
kind create cluster
2) Install Istio lean version, Knative Serving, KFServing all in one.(this takes 30s)
./hack/quick_install.sh
Ingress Setup and Monitoring Stack
- Configure Custom Ingress Gateway
- In addition you need to update [KFServing configmap](config/default/configmap/inferenceservice.yaml) to use the custom ingress gateway.
- Configure HTTPS Connection
- Configure Custom Domain
- Metrics
-…
Excerpt shown — open the source for the full document.