-
Notifications
You must be signed in to change notification settings - Fork 434
[Docs]: add advanced kubernetes deployment examples #1230
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
[Docs]: add advanced kubernetes deployment examples #1230
Conversation
Add comprehensive documentation for deploying AIBrix on Kubernetes with persistent model caching, security policies, and monitoring integration. Includes YAML examples for namespace, deployment, service, and PVC configuration with detailed usage notes. Signed-off-by: haitwang-cloud <haitao_wht@outlook.com>
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.
Summary of Changes
Hello @haitwang-cloud, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces new, detailed documentation for advanced Kubernetes deployments of AIBrix. It provides a practical YAML example demonstrating how to set up AIBrix with features like persistent model caching, defined security policies, optimized resource allocation, and integrated health monitoring and metrics collection.
Highlights
- New Documentation: I've added a new documentation page,
advanced-k8s-examples.rst
, providing comprehensive examples for deploying AIBrix on Kubernetes. - Kubernetes Deployment Example: The new documentation includes a detailed YAML example demonstrating how to deploy a vLLM model (specifically
deepseek-ai/DeepSeek-R1-Distill-Llama-8B
) on Kubernetes, covering Namespace, Deployment, Service, and PersistentVolumeClaim configurations. - Persistent Model Caching: The example showcases how to configure a PersistentVolumeClaim (PVC) to provide 30Gi of persistent storage for HuggingFace model caches at
/root/.cache/huggingface
, ensuring models are not re-downloaded on pod restarts. - Security and Resource Management: The provided YAML includes configurations for an isolated namespace with a privileged security policy, explicit GPU, CPU, and memory resource limits and requests, and shared memory (
/dev/shm
) setup. - Health Checks and Monitoring: The deployment example integrates liveness and readiness probes for robust health monitoring, along with Prometheus annotations on the Service for metrics integration and service discovery.
- Documentation Integration: I've updated
installation.rst
to link to the new advanced Kubernetes examples, making them discoverable within the existing documentation structure.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
/gemini review |
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.
Code Review
The pull request adds documentation for advanced Kubernetes deployment examples, including YAML configurations for deploying AIBrix with persistent model caching, security policies, and monitoring integration. The documentation provides valuable insights into optimizing resource configuration and setting up health monitoring.
docs/source/getting_started/installation/advanced-k8s-examples.rst
Outdated
Show resolved
Hide resolved
docs/source/getting_started/installation/advanced-k8s-examples.rst
Outdated
Show resolved
Hide resolved
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.
Code Review
The pull request adds documentation for advanced Kubernetes deployment examples for AIBrix, including YAML configurations for namespace, deployment, service, and PVC. The documentation covers persistent model caching, security policies, and monitoring integration. The review identifies potential security concerns with the privileged security policy and suggests improvements to resource limit definitions, probe configurations, and storage class guidance.
docs/source/getting_started/installation/advanced-k8s-examples.rst
Outdated
Show resolved
Hide resolved
docs/source/getting_started/installation/advanced-k8s-examples.rst
Outdated
Show resolved
Hide resolved
Fixing the format error in
|
- Adjust pod security policies from privileged to baseline/restricted - Update probe timeouts and delays for better reliability - Add startup probe configuration - Fix code block formatting in gateway plugins docs - Update feature list and usage notes to reflect changes Signed-off-by: haitwang-cloud <haitao_wht@outlook.com>
/gemini review |
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.
Code Review
The pull request adds documentation for advanced Kubernetes deployment examples, including YAML configurations for deploying AIBrix with persistent model caching, security policies, and monitoring integration. The documentation is well-structured and provides valuable information for users looking to deploy AIBrix on Kubernetes. However, some minor improvements could be made to enhance clarity and usability.
@@ -59,6 +59,7 @@ Install AIBrix in testing Environments | |||
mac-for-desktop.rst | |||
aws.rst | |||
gcp.rst | |||
advanced-k8s-examples.rst |
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.
looks good at this moment. I plan to add an example section to host such examples.
* docs(installation): add advanced kubernetes deployment examples Add comprehensive documentation for deploying AIBrix on Kubernetes with persistent model caching, security policies, and monitoring integration. Includes YAML examples for namespace, deployment, service, and PVC configuration with detailed usage notes. Signed-off-by: haitwang-cloud <haitao_wht@outlook.com> * docs: update k8s examples and gateway plugins documentation - Adjust pod security policies from privileged to baseline/restricted - Update probe timeouts and delays for better reliability - Add startup probe configuration - Fix code block formatting in gateway plugins docs - Update feature list and usage notes to reflect changes Signed-off-by: haitwang-cloud <haitao_wht@outlook.com> --------- Signed-off-by: haitwang-cloud <haitao_wht@outlook.com>
Pull Request Description
Add comprehensive documentation for deploying AIBrix on Kubernetes with persistent model caching, security policies, and monitoring integration. Includes YAML examples for namespace, deployment, service, and PVC configuration with detailed usage notes.
Related Issues
Resolves: #[Insert issue number(s)]
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]
: Corrections to existing functionality[CI]
: Changes to build process or CI pipeline[Docs]
: Updates or additions to documentation[API]
: Modifications to aibrix's API or interface[CLI]
: Changes or additions to the Command Line Interface[Misc]
: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.