Skip to content

docs: add production deployment guide#9

Merged
mohit-nagaraj merged 1 commit intomainfrom
docs/production-deployment
Mar 24, 2026
Merged

docs: add production deployment guide#9
mohit-nagaraj merged 1 commit intomainfrom
docs/production-deployment

Conversation

@mohit-nagaraj
Copy link
Copy Markdown
Member

Summary

  • Adds comprehensive production deployment guide covering:
    • Docker Compose deployment with environment config
    • Kubernetes deployment (StatefulSet for MongoDB, Deployments for core/ui, Ingress)
    • TLS/HTTPS setup (nginx reverse proxy and cert-manager)
    • Database backup and recovery (manual + automated CronJob)
  • Added to sidebar under Guides

Related Issue

Closes #4

Test plan

  • Page renders correctly in Starlight
  • All code blocks have correct syntax highlighting
  • Manifests are valid YAML/Kubernetes resources

Covers Docker Compose and Kubernetes deployment, TLS configuration,
database backup/recovery, and automated backup CronJob.

Closes #4

Signed-off-by: Mohit Nagaraj <mohitnagaraj20@gmail.com>
@mohit-nagaraj mohit-nagaraj added the must-fix-for-cncf Required for CNCF Sandbox submission label Mar 24, 2026
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 significantly enhances the project's documentation by introducing a detailed production deployment guide. It provides users with clear, step-by-step instructions for deploying KubeOrch using either Docker Compose for smaller teams or Kubernetes for more robust setups, alongside crucial information on securing deployments with TLS/HTTPS and ensuring data integrity through backup and recovery procedures. This addition aims to streamline the process of moving KubeOrch into a production environment, making it more accessible and reliable for users.

Highlights

  • New Production Deployment Guide: A comprehensive guide for deploying KubeOrch in production environments has been added, covering both Docker Compose and Kubernetes options.
  • Deployment Options: The guide details Docker Compose deployment with environment configuration and Kubernetes deployment, including StatefulSet for MongoDB, Deployments for core/ui, and Ingress.
  • Security and Data Management: Instructions for TLS/HTTPS setup using nginx reverse proxy or cert-manager, and database backup and recovery (manual and automated CronJob) are included.
  • Documentation Integration: The new guide has been integrated into the documentation sidebar under the 'Guides' section.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. 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.

@mohit-nagaraj mohit-nagaraj merged commit 96042ca into main Mar 24, 2026
2 checks passed
@mohit-nagaraj mohit-nagaraj deleted the docs/production-deployment branch March 24, 2026 06:28
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a comprehensive production deployment guide, which is a great addition. However, the guide in its current form has several critical issues that would prevent a user from successfully deploying the application. My review includes feedback on insecure practices, configuration mismatches, and missing resource definitions. Specifically, I've pointed out the problematic use of :latest image tags, insecure Kubernetes secret creation methods, an Ingress path that doesn't match the application's configuration, and missing resource definitions for an Nginx configuration and a PersistentVolumeClaim for backups. Addressing these points will significantly improve the quality and reliability of the guide.

# docker-compose.production.yml
services:
core:
image: ghcr.io/kubeorch/core:latest
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using the :latest image tag in production is generally discouraged as it can lead to unpredictable behavior and makes deployments non-reproducible. If the latest tag is updated with a new, potentially breaking change, your deployment could fail unexpectedly. It also makes it difficult to track which version is running or to perform a rollback.

This comment also applies to the ui image on line 58, and the Kubernetes manifests on lines 186 and 255.

Suggested change
image: ghcr.io/kubeorch/core:latest
image: ghcr.io/kubeorch/core:v1.0.0 # Or any specific version

Comment on lines +109 to +113
kubectl create secret generic kubeorch-secrets \
--namespace kubeorch \
--from-literal=jwt-secret=$(openssl rand -hex 32) \
--from-literal=encryption-key=$(openssl rand -hex 16) \
--from-literal=mongo-uri=mongodb://mongo:27017/kubeorch
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Creating secrets with --from-literal=key=$(command) is insecure because the secret value can be exposed in your shell history and process list. For production documentation, it's crucial to demonstrate secure practices.

Suggested change
kubectl create secret generic kubeorch-secrets \
--namespace kubeorch \
--from-literal=jwt-secret=$(openssl rand -hex 32) \
--from-literal=encryption-key=$(openssl rand -hex 16) \
--from-literal=mongo-uri=mongodb://mongo:27017/kubeorch
# Create secrets from files for better security
echo -n "$(openssl rand -hex 32)" > jwt.txt
echo -n "$(openssl rand -hex 16)" > enc.txt
kubectl create secret generic kubeorch-secrets \
--namespace kubeorch \
--from-file=jwt-secret=./jwt.txt \
--from-file=encryption-key=./enc.txt \
--from-literal=mongo-uri=mongodb://mongo:27017/kubeorch
# Clean up the temporary files
rm jwt.txt enc.txt

Comment on lines +294 to +300
- path: /v1
pathType: Prefix
backend:
service:
name: core
port:
number: 8080
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

There's a critical mismatch between the Ingress path and the UI's API endpoint configuration. The Ingress is configured to route /v1 to the core service, but the UI deployment (line 260) is configured with NEXT_PUBLIC_API_URL pointing to .../api. This will cause all API calls from the frontend to fail with a 404 error. The path should be consistent.

Suggested change
- path: /v1
pathType: Prefix
backend:
service:
name: core
port:
number: 8080
- path: /api
pathType: Prefix
backend:
service:
name: core
port:
number: 8080

Comment on lines +403 to +404
persistentVolumeClaim:
claimName: backup-pvc
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The CronJob for automated backups will fail because it references a PersistentVolumeClaim named backup-pvc that is never created in this guide. The backup pods will be stuck in a Pending state waiting for the PVC, which does not exist. You should include instructions and a manifest for creating this PVC before the CronJob is applied. For example:

# backup-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: backup-pvc
  namespace: kubeorch
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi # Adjust size as needed

Comment on lines +60 to +61
environment:
- NEXT_PUBLIC_API_URL=https://your-domain.com/api
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ui service configuration is inconsistent with the instructions. The guide has the user define NEXT_PUBLIC_API_URL in the .env file, but the ui service doesn't use this file. Instead, it has a hardcoded environment variable. This can lead to confusion, as changes to the .env file won't be picked up by the UI service. It should use env_file like the core service.

Suggested change
environment:
- NEXT_PUBLIC_API_URL=https://your-domain.com/api
env_file: .env

Comment on lines +323 to +337
Add an nginx service to your compose file:

```yaml
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/nginx/certs:ro
depends_on:
- core
- ui
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This section provides a Docker Compose service definition for an Nginx reverse proxy but omits the corresponding nginx.conf file. Without a sample configuration, this part of the guide is incomplete and not actionable for the user, who would have to guess how to route traffic to the core and ui services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

must-fix-for-cncf Required for CNCF Sandbox submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add production deployment guide (Kubernetes, Docker, cloud providers)

1 participant