githubEdit

Istio Examples

Prequisites

Setup Cluster and Ingress

Use the setup notebook to Setup Clusterarrow-up-right with Istio Ingressarrow-up-right.

!kubectl create namespace seldon
Error from server (AlreadyExists): namespaces "seldon" already exists

Configure Istio

For this example we will create the default istio gateway for seldon which needs to be called seldon-gateway. You can supply your own gateway by adding to your SeldonDeployments resources the annotation seldon.io/istio-gateway with values the name of your istio gateway.

Create a gateway for our istio-ingress

%%writefile resources/seldon-gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: seldon-gateway
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"

Ensure the istio ingress gatewaty is port-forwarded to localhost:8004

  • Istio: kubectl port-forward $(kubectl get pods -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].metadata.name}') -n istio-system 8004:8080

Serve Single Model

Get predictions

REST Request

gRPC Request

Host Restriction

In this example we will restriction request to those with the Host header "seldon.io"

Last updated

Was this helpful?