From c1c01714150f2e3b2bcaf160fd84ef04c0f7d8c7 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Mon, 23 Sep 2024 10:57:23 +0530 Subject: [PATCH 1/3] Update kubernetes_deployment.md fixes: https://github.com/kserve/website/issues/383 Signed-off-by: Rajakavitha Kodhandapani --- docs/admin/kubernetes_deployment.md | 92 ++++++++++++----------------- 1 file changed, 38 insertions(+), 54 deletions(-) diff --git a/docs/admin/kubernetes_deployment.md b/docs/admin/kubernetes_deployment.md index 1ac501397..493842cd3 100644 --- a/docs/admin/kubernetes_deployment.md +++ b/docs/admin/kubernetes_deployment.md @@ -1,52 +1,54 @@ # Kubernetes Deployment Installation Guide KServe supports `RawDeployment` mode to enable `InferenceService` deployment with Kubernetes resources [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment), [`Service`](https://kubernetes.io/docs/concepts/services-networking/service), [`Ingress`](https://kubernetes.io/docs/concepts/services-networking/ingress) and [`Horizontal Pod Autoscaler`](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale). Comparing to serverless deployment it unlocks Knative limitations such as mounting multiple volumes, on the other hand `Scale down and from Zero` is not supported in `RawDeployment` mode. -Kubernetes 1.22 is the minimally required version and please check the following recommended Istio versions for the corresponding -Kubernetes version. - -## Recommended Version Matrix -| Kubernetes Version | Recommended Istio Version | -|:-------------------|:--------------------------| -| 1.27 | 1.18, 1.19 | -| 1.28 | 1.19, 1.20 | -| 1.29 | 1.20, 1.21 | - -## 1. Install Istio - -The minimally required Istio version is 1.13 and you can refer to the [Istio install guide](https://istio.io/latest/docs/setup/install). - -Once Istio is installed, create `IngressClass` resource for istio. -```yaml -apiVersion: networking.k8s.io/v1 -kind: IngressClass -metadata: - name: istio -spec: - controller: istio.io/ingress-controller -``` - - -!!! note - Istio ingress is recommended, but you can choose to install with other [Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) and create `IngressClass` resource for your Ingress option. - - - -## 2. Install Cert Manager +## 1. Install Cert Manager The minimally required Cert Manager version is 1.9.0 and you can refer to [Cert Manager installation guide](https://cert-manager.io/docs/installation/). !!! note Cert manager is required to provision webhook certs for production grade installation, alternatively you can run self signed certs generation script. -## 3. Install KServe +## 2. Install KServe !!! note - The default KServe deployment mode is `Serverless` which depends on Knative. The following step changes the default deployment mode to `RawDeployment` before installing KServe. - + The default KServe deployment mode is `Serverless` which depends on Knative. The following step changes the default deployment mode to `RawDeployment` before installing KServe and the `RawDeployment` mode does not have any dependecy on Knative. -**i. Install KServe** +**i. Create a yaml file** +Open an editor of your choice and create `kustomization.yaml` file. + ``` + apiVersion: kustomize.config.k8s.io/v1beta1 + kind: Kustomization + + namespace: kserve + + resources: + - https://github.com/kserve/kserve/releases/download/v0.13.0/kserve.yaml + + patches: + - target: + kind: ConfigMap + name: inferenceservice-config + patch: | + - path: /data/deploy + op: replace + value: |- + { + "defaultDeploymentMode": "RawDeployment" + } + - path: /data/ingress + op: replace + value: |- + { + "disableIstioVirtualHost": true, + "disableIngressCreation": true, + "ingressDomain": "svc.cluster.local", + "ingressGateway" : "disabled", + "ingressService" : "disabled" + } + +**ii. Install KServe** === "kubectl" ```bash - kubectl apply -f https://github.com/kserve/kserve/releases/download/v0.13.0/kserve.yaml + kubectl apply -f kustomization.yaml ``` Install KServe default serving runtimes: @@ -55,21 +57,3 @@ Install KServe default serving runtimes: ```bash kubectl apply -f https://github.com/kserve/kserve/releases/download/v0.13.0/kserve-cluster-resources.yaml ``` - -**ii. Change default deployment mode and ingress option** - -First in ConfigMap `inferenceservice-config` modify the `defaultDeploymentMode` in the `deploy` section, - -=== "kubectl" - ```bash - kubectl patch configmap/inferenceservice-config -n kserve --type=strategic -p '{"data": {"deploy": "{\"defaultDeploymentMode\": \"RawDeployment\"}"}}' - ``` - -then modify the `ingressClassName` in `ingress` section to point to `IngressClass` name created in [step 1](#1-install-istio). - ```yaml - ingress: |- - { - "ingressClassName" : "your-ingress-class", - } - ``` - From 9dd383764c661bb5819218d1c7a110e90ce790cc Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Mon, 23 Sep 2024 11:10:17 +0530 Subject: [PATCH 2/3] Update kubernetes_deployment.md fixed formatting Signed-off-by: Rajakavitha Kodhandapani --- docs/admin/kubernetes_deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin/kubernetes_deployment.md b/docs/admin/kubernetes_deployment.md index 493842cd3..e718ce52b 100644 --- a/docs/admin/kubernetes_deployment.md +++ b/docs/admin/kubernetes_deployment.md @@ -13,7 +13,7 @@ The minimally required Cert Manager version is 1.9.0 and you can refer to [Cert **i. Create a yaml file** Open an editor of your choice and create `kustomization.yaml` file. - ``` + ```yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization From bf1d4f9ede21f5b73d1f6b8d1f8397d2ceb16866 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Mon, 23 Sep 2024 11:24:54 +0530 Subject: [PATCH 3/3] Update kubernetes_deployment.md format Signed-off-by: Rajakavitha Kodhandapani --- docs/admin/kubernetes_deployment.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/admin/kubernetes_deployment.md b/docs/admin/kubernetes_deployment.md index e718ce52b..9b8ad8d43 100644 --- a/docs/admin/kubernetes_deployment.md +++ b/docs/admin/kubernetes_deployment.md @@ -14,6 +14,7 @@ The minimally required Cert Manager version is 1.9.0 and you can refer to [Cert **i. Create a yaml file** Open an editor of your choice and create `kustomization.yaml` file. ```yaml + apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization