Back to Blog
DevOps

Kubernetes Deployment Best Practices for Odoo

January 15, 20268 min read

Kubernetes has become the standard for running containerized applications at scale. In this guide, we'll cover best practices for deploying Odoo on Kubernetes using Nurosentrix.

Prerequisites

Before you begin, ensure you have:

  • A Kubernetes cluster (1.24+)
  • kubectl configured
  • Helm 3.x installed
  • Nurosentrix account with API access
  • Architecture Overview

    A production Odoo deployment on Kubernetes typically includes:

  • **Odoo Pods**: Multiple replicas for high availability
  • **PostgreSQL**: Database (managed or in-cluster)
  • **Redis**: Session storage and caching
  • **Nginx Ingress**: Load balancing and SSL termination
  • **Persistent Volumes**: For filestore data
  • Installing with Helm

    Nurosentrix provides official Helm charts for Odoo deployment:

    helm repo add nurosentrix https://charts.nurosentrix.com

    helm install my-odoo nurosentrix/odoo \

    --set odoo.version=17.0 \

    --set postgresql.enabled=true \

    --set ingress.enabled=true

    Autoscaling Configuration

    Configure Horizontal Pod Autoscaler for automatic scaling:

    apiVersion: autoscaling/v2

    kind: HorizontalPodAutoscaler

    metadata:

    name: odoo-hpa

    spec:

    scaleTargetRef:

    apiVersion: apps/v1

    kind: Deployment

    name: odoo

    minReplicas: 2

    maxReplicas: 10

    metrics:

    - type: Resource

    resource:

    name: cpu

    target:

    type: Utilization

    averageUtilization: 70

    Monitoring Setup

    Deploy Prometheus and Grafana for comprehensive monitoring:

    1. Install the Prometheus stack

    2. Import Nurosentrix dashboards

    3. Configure alerting rules

    Best Practices

    1. **Use Resource Limits**: Always set CPU and memory limits

    2. **Enable PDB**: Prevent disruptions during updates

    3. **Use Secrets**: Store credentials in Kubernetes secrets

    4. **Implement Health Checks**: Configure readiness and liveness probes

    5. **Plan for Storage**: Use appropriate storage classes for filestore

    Conclusion

    Kubernetes provides excellent capabilities for running Odoo at scale. Combined with Nurosentrix's management features, you get a powerful platform for enterprise Odoo deployments.