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

Adding example of manually setting up NGINX Ingress #699

Merged
merged 10 commits into from
Nov 9, 2022

Conversation

jasoonn
Copy link
Contributor

@jasoonn jasoonn commented Nov 8, 2022

Why are these changes needed?

This example provides users a starting point to customize their own ingress for ray clusters. ray-cluster.separate-ingress.yaml provides a template for setting up a ray cluster and the corresponding ingress, which clearly shows the relationship between ray cluster and ingress.

Information helpful for modifying the ingress in ray-cluster.separate-ingress.yaml

  • spec.rules.http.paths.backend.service.name should be the same as head service
  • spec.rules.http.paths.backend.service.port.number should match the port specified for dashboard in the RayCluster
  • metadata.annotations.nginx.ingress.kubernetes.io/rewrite-target: /$1
    Any characters captured by (.*) will be assigned to the placeholder $1, which is then used as a parameter in the rewrite-target annotation(rewrite-target doc)
    For example, the ingress definition above will result in the following rewrites:
    • $IP/$CLUSTER_NAME/ rewrites to $IP/ ($1 maps to nothing)
    • $IP/$CLUSTER_NAME/#/actors rewrites to $IP/#/actors ($1 maps to #/actors)
    • $IP/$CLUSTER_NAME/#/node rewrites to $IP/#/node ($1 maps to #/node)

Related issue number

#646

Demo

  • Step 1: Create kind cluster, for more reference can see in here.
    image

  • Step 2: Install NGINX ingress controller
    image

  • Step 3: Install KubeRay operator
    image

  • Step 4: Install RayCluster and create an ingress separately.
    image

  • Step 5: Check ingress created by Step 4.
    image

  • Step 6: Check <ip>/raycluster-ingress/ on the browser.

image

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

Thank @jasoonn for your contributions!

docs/guidance/ingress.md Outdated Show resolved Hide resolved
docs/guidance/ingress.md Outdated Show resolved Hide resolved
docs/guidance/ingress.md Outdated Show resolved Hide resolved
Signed-off-by: Hsin-Yuan Chen <[email protected]>
Signed-off-by: Hsin-Yuan Chen <[email protected]>
Signed-off-by: Hsin-Yuan Chen <[email protected]>
@jasoonn
Copy link
Contributor Author

jasoonn commented Nov 9, 2022

@kevin85421 Thanks for your suggestion. I have updated my pr.

docs/guidance/ingress.md Outdated Show resolved Hide resolved
docs/guidance/ingress.md Outdated Show resolved Hide resolved
jasoonn and others added 2 commits November 9, 2022 07:34
Co-authored-by: Dmitri Gekhtman <[email protected]>
Signed-off-by: Hsin-Yuan Chen <[email protected]>
Co-authored-by: Dmitri Gekhtman <[email protected]>
Signed-off-by: Hsin-Yuan Chen <[email protected]>
@jasoonn
Copy link
Contributor Author

jasoonn commented Nov 9, 2022

@DmitriGekhtman Thanks for the suggestion. I have updated my pr.

Copy link
Collaborator

@DmitriGekhtman DmitriGekhtman left a comment

Choose a reason for hiding this comment

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

Thanks!!

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

LGTM. Let's wait for CI to finish. Thank @jasoonn for this contribution!

@kevin85421 kevin85421 merged commit d10103d into ray-project:master Nov 9, 2022
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
This example provides users a starting point to customize their own ingress for ray clusters. ray-cluster.separate-ingress.yaml provides a template for setting up a ray cluster and the corresponding ingress, which clearly shows the relationship between ray cluster and ingress.

Signed-off-by: Hsin-Yuan Chen <[email protected]>
Co-authored-by: Ubuntu <azureuser@Ubuntu.pqxb1uggpgbehcpt4orv5untcb.rx.internal.cloudapp.net>
Co-authored-by: Dmitri Gekhtman <[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.

3 participants