KServe UI

An overview of the KServe UI

What is the KServe UI?

The KServe UI is a component of KServe that provides a user-friendly way to handle the lifecycle of InferenceService CRs in a Kubeflow cluster. This allows users to create, delete, and inspect the state of their Model Servers without needing to interact with Kubernetes resources directly. The UI is included as a part of the kubeflow/community-distribution. It is exposed as a menu link in the Kubeflow Central Dashboard by default. To see how the UI is installed and verified, refer to the tests/kserve_install.sh script, which the Test KServe workflow runs in CI.

Usage

The UI exposes information from the underlying Knative resources, like Conditions from the Knative Configurations, Route and Revisions as well as live logs from the Model server pod.

Listing

The main page of the UI provides a list of all the InferenceServices that are deployed in the selected Namespace. The frontend periodically polls the backend for the latest state of InferenceServices.

Models web app main page

Creating

The page for creating a new InferenceService. The user can paste the YAML object of the InferenceService they wish to create.

Note that the backend will override the provided .metadata.namespace field of the submitted object, to prevent users from trying to create InferenceServices in other namespaces.

Models web app create page

Deleting

Users can delete an existing InferenceService by clicking on the icon next to an InferenceService, in the main page that lists all the namespaced resources.

Inspecting

Users can click on the name of an InferenceService, from the main page, and view a more detailed summary of the CR’s state.

Models web app overview page

Metrics

As mentioned in the above sections the UI allows users to inspect the metrics from the InferenceService. This tab will not be enabled by default. In order to expose it the users will need to install Grafana and Prometheus.

Currently, the frontend is expecting to find a Grafana exposed in the /grafana prefix. This Grafana instance will need to have specific dashboards in order for the app to embed them in iframes. We are working on making this more generic to allow people to expose their own graphs.

You can install Grafana and Prometheus, for the UI to consume, by installing:

  1. the monitoring-core.yaml and monitoring-metrics-prometheus.yaml files from the Knative 0.21 release
  2. the following yaml files for exposing Grafana outside the cluster, by allowing anonymous access


apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-custom-config
namespace: knative-monitoring
labels:
serving.knative.dev/release: "v0.21.0"
data:
custom.ini: | # You can customize Grafana via changing the context of this field.
[auth.anonymous] # enable anonymous access
enabled = true
[security]
allow_embedding = true
[server]
root_url = "/grafana"
serve_from_sub_path = true


apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana
namespace: knative-monitoring
spec:
gateways:

- kubeflow/kubeflow-gateway
  hosts:
- '\*'
  http:
- match: - uri:
  prefix: /grafana/
  route: - destination:
  host: grafana.knative-monitoring.svc.cluster.local
  port:
  number: 30802
  


  apiVersion: security.istio.io/v1beta1
  kind: AuthorizationPolicy
  metadata:
  name: models-web-application
  namespace: kubeflow
  spec:
  action: ALLOW
  rules:
- from: - source:
  principals: - cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account
  selector:
  matchLabels:
  kustomize.component: kserve-models-web-application
  app.kubernetes.io/component: kserve-models-web-application
  

After applying these YAMLs, and ensuring the Grafana instance is exposed under /grafana the UI will show the METRICS tab.

Models web app metrics page

Feedback

Was this page helpful?