-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update kubernetes_deployment.md #398
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,55 @@ | ||
# 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. | ||
```yaml | ||
|
||
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here we also need to set the default ingressClass otherwise you will need to do everything manually later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please suggest what change needs to be made to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @spolti Can you provide some suggested verbiage here for @Rajakavitha1? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is described a few lines below, one of the removed. btw @terrytangyuan, shouldn't we have a specific section for raw? You could change the beginning of the doc like keeping the requirements for the Serverless mode, and later, explain what is the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I have a few questions regarding this configuration. Isn't it true that the controller already handles these aspects? In other words, when using rawDeployment, these related calls may not even be triggered. Should we really be making changes in this area?
this would be needed.
Additionally, I understand that this setting implies using rawDeployment as the default, but it doesn't mean that only rawDeployment will be used. I think this configuration might still be necessary when setting the serverlessMode in isvc. Lastly, shouldn't the disableIngressCreation be set to false instead? does the ingress need not to be created? |
||
} | ||
|
||
**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 +58,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", | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if we need to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding was that Istio was not required
The current installation guide for raw deployment mode is not accurate. For example, Istio is not needed if disableIngressCreation is enabled. See https://github.com/kserve/kserve/pull/3436
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, raw does not require it, but for the serverless mode the docs advises to use it, iirc.