Skip to content
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

Raw Gateway API documentation #438

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sivanantha321
Copy link
Member

Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for elastic-nobel-0aef7a ready!

Name Link
🔨 Latest commit aa5a0ef
🔍 Latest deploy log https://app.netlify.com/sites/elastic-nobel-0aef7a/deploys/67a10694a1ed210008326891
😎 Deploy Preview https://deploy-preview-438--elastic-nobel-0aef7a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


Kubernetes 1.28 is the minimally required version and please check the following recommended Istio versions for the corresponding
Kubernetes version.

!!! warning
Kubernetes `Ingress` support is deprecated and will be removed in the future. `Gateway API` is the recommended option for KServe.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to come up with a timeline for removing Ingress support.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we keep it for backwards compatibility?
As Gateway API is the new and preferred option, ingress will not be deprecated anytime soon, so it would make sense to keep both around to give users flexibility, wdyt?

# Kubernetes Ingress to Gateway API Migration Guide

## 1. Install Gateway API CRD
Install the Gateway API CRD as it is not part of the Kubernetes installation. KServe implements Gateway API version 1.2.1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Gateway API is not part of the Kubernetes cluster, therefore it needs to be installed manually, to do this, follow the next steps.

```

## 2. Create GatewayClass
Create a `GatewayClass` resource using your preferred network controller. For this example, you will use [Envoy Gateway](https://gateway.envoyproxy.io/docs/) as the network controller.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add the other options, maybe point to the docs and how to configure as well.

Copy link
Member Author

@sivanantha321 sivanantha321 Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple providers for Gateway API. I think it is not possible to cover all of them. Maybe we can add an example for Istio and add a link to list of network providers who suppot gateway api.

=== "Kubectl"

```shell
kubectl edit configmap inferenceservice-config -n kserve
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't better to use the patch command here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch can't be used here as it is a string json. It will replace all the other ingress configurations.

port: 443
tls:
mode: Terminate
certificateRefs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who handles these certificates?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry. I didn't understand the question. Can you elaborate with more context ?


## 6. Restart the KServe controller
The existing InferenceServices will not use the Gateway API configuration until the next reconciliation.
You can restart the KServe controller to trigger the reconciliation and apply the Gateway API configuration to all the existing InferenceServices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to use mixed ingress configuration?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It is not possible

```

## 7. Configure the external traffic
If you are using a cloud provider, you may need to configure the external traffic to the LoadBalancer service created in [step 4](#4-create-gateway-resource).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a quick step guide about how to do it?

```

=== "Load Balancer"
If the EXTERNAL-IP value is set, your environment has an external load balancer that you can use for the ingress gateway.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the external access can be configured, no?
Maybe point to the k8s docs: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand the question. What do you mean by external access can be configured ?


Once Istio is installed, create `IngressClass` resource for istio.
```yaml
apiVersion: networking.k8s.io/v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also keep a example with istio? Probably Kourier as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean for kubernetes Ingress or Gateway API ?

Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants