NGINX Ingress

Configure Seldon ingress with NGINX Ingress

NGINX Ingress is a production-ready ingress controller for Kubernetes that uses NGINX as a reverse proxy and load balancer.

Important

Before starting the installation procedure, please download installation resources as explained here and make sure that all pre-requisites are satisfied.

This page also assumes that main Seldon Core v2 and Seldon Enterprise Platform components are installed.

Installing NGINX Ingress

Note

This section is for users installing NGINX ingress with Helm.

If you want to choose a different installation method, you can use the official documentation.

helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace

TLS / HTTPS

Information on using TLS/HTTPS is provided in the documentation for NGINX Ingress.

Using Seldon Enterprise Platform with NGINX Ingress

Configuring NGINX Ingress

An ingress configuration has to be provided for:

  • Seldon Enterprise Platform:

seldon-deploy-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: seldon-deploy
  namespace: seldon-system
spec:
  tls:
  rules:
  - http:
      paths:
      - path: /seldon-deploy/
        pathType: Prefix
        backend:
          service:
            name: seldon-deploy
            port:
              number: 80
  ingressClassName: nginx
  • Keycloak (only required if you’re using Keycloak)

keycloak-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: keycloak
  annotations:
    nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
  namespace: seldon-system
spec:
  tls:
  rules:
  - http:
      paths:
      - path: /auth/
        pathType: Prefix
        backend:
          service:
            name: keycloak-http
            port:
              number: 80
  ingressClassName: nginx

For the two configurations above it is mostly important to configure the correct namespace and the correct service name since these are the unique identifiers, which will be used by the ingress to sync with the service.

Other ingress configurations will be found in their separate chapters later. If you decide to use a different ingress controller than NGINX, you can adapt the configurations of the other services from here:

Install Seldon Enterprise Platform with Istio Disabled

Similarly, you would add following entries to your deploy-values.yaml file (please update {{NGINX_INGRESS}} with your NGINX Ingress address like instructed below):

seldon:
  enabled: false
  knativeEnabled: false

requestLogger:
  trigger:
    create: false

rbac:
  opa:
    istioPolicySyncInterval: ""

seldonCoreV2:
  curlForm: |
    curl -k https://{{NGINX_INGRESS}}/v2/models/{{ .ModelName }}/infer \<br/>
    &nbsp;&nbsp;-H "Host: {{ .Namespace }}.inference.seldon" \<br/>
    &nbsp;&nbsp;-H "Content-Type: application/json" \<br/>
    &nbsp;&nbsp;-H "Seldon-Model: {{ .ModelName }}.pipeline" \<br/>
    &nbsp;&nbsp;-d '{{ .Payload }}'
  enabled: true

virtualService:
  create: false

Find address of your Seldon Enterprise Platform

The following script can help you find the address of your Seldon Enterprise Platform instance:

NGINX_INGRESS=$(kubectl get svc -n ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
NGINX_INGRESS+=$(kubectl get svc -n ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

echo "Seldon Enterprise Platform: http://$NGINX_INGRESS/seldon-deploy/"