Deploying Odoo on Kubernetes
A practical guide to deploying Odoo on Kubernetes, showing real-world architecture and solutions that work.
December 19, 2025
9 min read
Copenhagen, Denmark
Why Odoo on Kubernetes?
Odoo is a comprehensive, open-source suite of business applications designed to streamline operations across CRM, eCommerce, accounting, inventory, sales, and project management. Its modular structure allows businesses to start with one application and expand as needed, making it a versatile choice for organizations of all sizes.
At Asergo, we have successfully deployed and enabled our customers to run Odoo on our platform, leveraging Kubernetes to maximize performance, scalability, and reliability. In this post, we will explore the benefits of running Odoo on dedicated servers within a Kubernetes cluster, share our modular deployment approach, and highlight how this architecture addresses common challenges while delivering real-world results.
Why Run Odoo on Dedicated Servers in Kubernetes?
Enhanced Performance
Dedicated servers ensure Odoo applications have the resources required to perform optimally, avoiding the “noisy neighbor” issues common in shared environments. Kubernetes further enhances performance by efficiently managing resource allocation and workload distribution, ensuring consistent responsiveness even under heavy loads.
Scalability
Kubernetes simplifies horizontal scaling, allowing businesses to handle increased traffic or workloads without downtime. Whether you are a growing SME or a large enterprise, Kubernetes makes it easy to scale Odoo applications up or down based on demand—providing flexibility as your business evolves.
Reliability
Dedicated servers offer a stable, isolated environment for critical business applications. Combined with Kubernetes’ self-healing capabilities, this setup minimizes downtime and ensures high availability, so your Odoo instance remains operational when it matters most.
Asergo’s Support for Odoo Deployments
Asergo provides comprehensive support for Odoo deployments, tailored to your business needs:
Internal Use: We run Odoo internally, giving us firsthand experience in optimizing its performance within Kubernetes.
Customer Hosting: We host Odoo for businesses of all sizes, offering tailored infrastructure and expert support.
Flexible Deployments: From small setups to large scale clusters, we ensure your Odoo deployment aligns with your operational requirements.
Cost-Effective Hosting: Unlike many providers, we do not charge extra for hosting Odoo. You only pay for the Kubernetes cluster, giving you the freedom to host additional applications alongside Odoo—maximizing your investment.
Key Challenges and Solutions
1. Odoo Is Not Natively Designed for Kubernetes
Odoo’s architecture was not originally built with Kubernetes in mind, which can complicate deployment. However, with the right configuration—such as custom Helm charts, persistent volume claims, and proper ingress setups—Odoo can thrive in a Kubernetes environment.
2. Database Management
PostgreSQL is the backbone of Odoo, and its deployment strategy depends on your scale:
Mid-Size Installations: Running PostgreSQL within the Kubernetes cluster simplifies management.
Large Scale Deployments: For high-traffic or data-intensive setups, we recommend dedicated database servers. Our standard offering includes 25G bandwidth and a private network linking the Kubernetes cluster to a highly available PostgreSQL server, ensuring both performance and reliability.
Modular Deployment: A Technical Deep Dive
Deploying Odoo in Kubernetes using a modular architecture significantly improves security, scalability, and maintainability. Instead of running Odoo as a single monolithic deployment, we split it into multiple, specialized deployments, such as odoo-backoffice, odoo-public, and odoo-bus-replicator, each handling different aspects of the application. All deployments share a Redis database for session management, ensuring consistency and efficiency.
Why Split Odoo into Multiple Deployments?
Splitting Odoo into separate deployments offers several advantages:
Enhanced Security: Isolate public-facing and internal components, reducing the attack surface.
Independent Scaling: Scale up or down individual components based on demand.
Improved Maintainability: Easier to update, debug, and manage each part independently.
High Availability: Run multiple replicas for critical components to ensure redundancy.
Example Deployment Architecture
1. Odoo (Main Deployment)
This deployment handles the core Odoo application logic and internal user requests. Key Features:
- Runs with 5 replicas for high availability.
- Resource limits ensure stable performance.
- Health checks monitor application status.
- Uses Kubernetes Secrets for sensitive configuration.
Example YAML Snippet:
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo-backoffice
namespace: odoo
labels:
app: odoo
component: backoffice
spec:
replicas: 5
selector:
matchLabels:
app: odoo
component: backoffice
template:
metadata:
labels:
app: odoo
component: backoffice
spec:
containers:
- name: odoo
image: registry.example.com/odoo/18.0:20251101
env:
- name: DB_HOST
value: postgres-odoo
- name: DB_USER
valueFrom:
secretKeyRef:
key: username
name: odoo-db-credentials
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: odoo-db-credentials
ports:
- containerPort: 8069
name: http
livenessProbe:
httpGet:
path: /web/health
port: http
readinessProbe:
httpGet:
path: /web/health
port: http
volumeMounts:
- mountPath: /etc/odoo
name: odoo-config
- mountPath: /var/lib/odoo
name: odoo-filestore
volumes:
- name: odoo-config
secret:
secretName: odoo-config
- name: odoo-filestore
persistentVolumeClaim:
claimName: odoo-data-pvc2. Odoo-Public (Public-Facing Deployment)
This deployment serves public-facing requests, such as customer portals or websites. Key Features:
- Isolated from internal traffic for security.
- Runs with 3 replicas for public workloads.
- Shares the same database and Redis session store as the main deployment.
Example YAML Snippet:
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo-public
namespace: odoo
labels:
app: odoo
component: public
spec:
replicas: 3
selector:
matchLabels:
app: odoo
component: public
template:
metadata:
labels:
app: odoo
component: public
spec:
containers:
- name: odoo
image: registry.example.com/odoo/18.0:20251101
env:
- name: DB_HOST
value: postgres-odoo
- name: DB_USER
valueFrom:
secretKeyRef:
key: username
name: odoo-db-credentials
ports:
- containerPort: 8069
name: http
volumeMounts:
- mountPath: /etc/odoo
name: odoo-config
- mountPath: /var/lib/odoo
name: odoo-filestore
volumes:
- name: odoo-config
secret:
secretName: odoo-public-config
- name: odoo-filestore
persistentVolumeClaim:
claimName: odoo-data-pvc3. Odoo Bus
Key Features:
- Dedicated to event processing, improving reliability.
- Runs with 4 replicas for redundancy.
- Lightweight configuration (—no-http, —workers 0).
Example YAML Snippet:
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo-bus-replicator
namespace: odoo
labels:
app: odoo
component: bus-replicator
spec:
replicas: 4
selector:
matchLabels:
app: odoo
component: bus-replicator
template:
metadata:
labels:
app: odoo
component: bus-replicator
spec:
containers:
- name: odoo
image: registry.example.com/odoo/18.0:20251101
args: ["odoo", "--database", "odoo", "--no-http", "--workers", "0"]
env:
- name: DB_HOST
value: postgres-odoo
- name: BUS_ENABLED
value: "true"
- name: BUS_CREDS_FILE
value: /etc/bus/credentials.json
volumeMounts:
- mountPath: /etc/odoo
name: odoo-config
- mountPath: /var/lib/odoo
name: odoo-filestore
volumes:
- name: odoo-config
secret:
secretName: odoo-bus-replicator-config
- name: odoo-filestore
persistentVolumeClaim:
claimName: odoo-data-pvcNetwork Isolation for Odoo-Public
To enhance security, we use NetworkPolicy to restrict the odoo-public deployment’s egress traffic. Below is an example policy to allow only necessary communication: Example Network Policy:
apiVersion: crd.projectcalico.org/v1
kind: NetworkPolicy
metadata:
name: odoo-public-network-policy
namespace: odoo
spec:
selector: app == 'odoo' && component == 'public'
egress:
- action: Allow
destination:
namespaceSelector: kubernetes.io/metadata.name == 'kube-system'
selector: k8s-app == 'kube-dns'
- action: Allow
destination:
selector: app in {'postgres-odoo', 'redis-session-store'} || (app == 'odoo' && component == 'public')
- action: Allow
destination:
namespaceSelector: kubernetes.io/metadata.name == 'messaging'
selector: app.kubernetes.io/component == 'event-bus'
protocol: TCP
ports: [4222]
- action: Allow
destination:
namespaceSelector: kubernetes.io/metadata.name == 'mail-services'
- action: Allow
destination:
nets: ['0.0.0.0/0']
- action: Deny
destination:
nets: ['10.0.0.0/8', '172.16.0.0/16', '192.168.0.0/16']
types:
- EgressWhat These Policies Do:
- Allow DNS resolution and communication with
kube-dns. - Permit access to the database, Redis, and the event bus.
- Restrict access to private networks, except for explicitly allowed destinations.
Shared Infrastructure
Redis: All deployments share a Redis instance for session storage, ensuring seamless user sessions.
Database: A single PostgreSQL database is used, with credentials managed via Kubernetes Secrets.
Observability: OpenTelemetry (OTEL) can be configured to export metrics and traces for monitoring.
Customer Spotlight: Hybrid Hosting for Performance and Flexibility
In 2021, GreenMind sought a system to streamline operations and support digital growth. Odoo Enterprise was the ideal fit, but integrating their website directly into Odoo was not possible through odoo.sh. They turned to a hybrid architecture:
- Patroni on Bare-Metal: For high-performance, resilient PostgreSQL clusters.
- Kubernetes for Odoo: Managing the application layer for flexibility, scalability, and streamlined updates.
“This hybrid approach provided the perfect balance between performance, reliability, and scalability. Today, our Odoo environment runs efficiently, with faster response times and the flexibility to scale as needed.”
— Kristian Gram Krogh, CTO, GreenMind.
For the full customer experience and technical details, see GreenMind’s Hybrid Hosting Story.
Security: Protecting Your Odoo Deployment
Security is critical when self-hosting Odoo. At Asergo, we implement:
OpenID Support: Secure access to your Odoo applications with Asergo’s OpenID integration.
Robust Backups: Ample backup options across data centers ensure data redundancy and quick recovery in case of failures.
Network Isolation: Public and internal traffic are separated, reducing exposure and minimizing risks.
Conclusion: Asergo’s Proven Approach
Deploying Odoo in Kubernetes presents unique challenges, but the benefits—performance, scalability, and reliability make it worthwhile. By leveraging a modular architecture, PostgreSQL, dedicated servers, and Kubernetes’ orchestration capabilities, Asergo helps businesses overcome the complexities of Odoo deployment while keeping costs predictable and security airtight.
Ready to deploy Odoo in Kubernetes? Let’s talk about how Asergo can support your setup—whether you’re starting small or planning to scale. Contact our team to learn more.