|
| 1 | +# Running Odoo Instances in Kubernetes |
| 2 | + |
| 3 | +We manage configuration of Odoo instances via the `kubeaid-config` repository. For each instance, there is a template file and a values file. |
| 4 | + |
| 5 | +Each Odoo instance has: - |
| 6 | + |
| 7 | +Template file: |
| 8 | +`kubeaid-config/k8s/<cluster-name>/argocd-apps/templates/<odoo-cms-name>.yaml` |
| 9 | + |
| 10 | +Values file: |
| 11 | +`kubeaid-config/k8s/<cluster-name>/argocd-apps/values-<odoo-cms-name>.yaml` |
| 12 | + |
| 13 | +Example values file: [values.yaml](values.yaml) |
| 14 | + |
| 15 | +## Create a new Odoo Instance |
| 16 | + |
| 17 | +1. Go to your kubeaid-config repository and copy an existing template and values file to new ones. |
| 18 | + |
| 19 | +2. Update the values file and template file with the desired configuration. |
| 20 | + |
| 21 | +3. Access ArgoCD: |
| 22 | + |
| 23 | + ``` bash |
| 24 | + kubectl port-forward svc/argocd-server -n argocd 8080:443 |
| 25 | + ``` |
| 26 | + |
| 27 | + Get the admin password: |
| 28 | + |
| 29 | + ``` bash |
| 30 | + kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d |
| 31 | + ``` |
| 32 | + |
| 33 | + Open http://localhost:8080 and log in with: |
| 34 | + |
| 35 | + - Username: `admin` |
| 36 | + - Password: output from above command |
| 37 | + |
| 38 | +4. In ArgoCD UI: go to |
| 39 | + `root application -> sync list -> find the new Odoo instance -> sync` |
| 40 | + |
| 41 | +The new Odoo CMS instance is now running. |
| 42 | + |
| 43 | +## Adding a Hostname/Domain |
| 44 | + |
| 45 | +1. Open the values file of your instance. |
| 46 | + |
| 47 | +2. Find the `ingress` section. |
| 48 | + |
| 49 | +3. Add your domain under the `hostname` field: |
| 50 | + |
| 51 | + ``` yaml |
| 52 | + ingress: |
| 53 | + enabled: true |
| 54 | + hostname: your-domain.com |
| 55 | + ``` |
| 56 | + |
| 57 | +4. Repeat the ArgoCD sync workflow. |
| 58 | + |
| 59 | +Your domain is now active and pointing to the Odoo CMS. |
| 60 | + |
| 61 | +The values file supports many customization options (e.g., scaling, |
| 62 | +resources, storage, secrets). |
| 63 | +Update them as needed, then re-sync in ArgoCD to apply changes. |
0 commit comments