How to install Jahia with Kubernetes
Question
How to install Jahia with Kubernetes?
Answer
π¦This answer was generated by an AI then modified and tested by one of our support engineers. It has not been validated by our Product and QA teams and, consequently, doesn't apply to a production environment.
Installing Jahia 8.2.1.0 in Kubernetes involves deploying Jahia CMS in containerized form. Follow these steps carefully to successfully install Jahia in your Kubernetes cluster.
π Prerequisites:
- Kubernetes cluster up and running
kubectl
installed and configured- Helm 3 installed (official guide)
- Docker registry access (if pulling from private registries)
- A persistent volume storage solution (like NFS, AWS EBS, Azure Disks, etc.)
π© Step-by-Step Installation Guide
β Step 1: Download Jahia Docker Images
Jahia provides official Docker images on Docker Hub:
docker pull jahia/jahia-ee:8.2.1.0
If your Kubernetes cluster has internet access, Kubernetes will automatically fetch these images. If using a private registry, push these images there first.
β Step 2: Prepare Kubernetes Namespace
It's recommended to deploy Jahia in its own namespace:
kubectl create namespace jahia
kubectl config set-context --current --namespace=jahia
β Step 3: Set Up Database
Jahia 8 requires a database backend (e.g., MySQL/PostgreSQL).
Here's an example using MySQL via Helm:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install jahia-db bitnami/mysql \
--namespace jahia \
--set auth.database=jahia \
--set auth.username=jahiauser \
--set auth.password=jahiapass \
--set auth.rootPassword=rootpass \
--set primary.persistence.size=20Gi
Save credentials (jahiauser
, jahiapass
) as you'll need them later.
β Step 4: Deploy Jahia
Jahia doesn't provide a Kubernetes-ready Helm Chart so a manual deploy is needed.
If Jahia doesn't provide an official Helm chart for your version, you can use a generic deployment method described below:
(Alternative) Manual Deployment via YAML:
Create a file named jahia-deployment.yaml
:
apiVersion: apps/v1
kind: Deployment
metadata:
name: jahia
labels:
app: jahia
spec:
replicas: 1
selector:
matchLabels:
app: jahia
template:
metadata:
labels:
app: jahia
spec:
containers:
- name: jahia
image: jahia/jahia-ee:8.2.1.0
ports:
- containerPort: 8080
env:
- name: DB_HOST
value: "jahia-db-mysql.jahia.svc.cluster.local"
- name: DB_NAME
value: "jahia"
- name: DB_USER
value: "jahiauser"
- name: DB_PASS
value: "jahiapass"
volumeMounts:
- name: jahia-storage
mountPath: /data
volumes:
- name: jahia-storage
persistentVolumeClaim:
claimName: jahia-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jahia-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: standard
Deploy with:
kubectl apply -f jahia-deployment.yaml
β Step 5: Accessing Jahia UI
- Check your deployment status:
kubectl get pods,svc -n jahia
-
Execute the following command to redirect your TCP port 8080 to the same TCP port of the pod jahia
kubectl port-forward pod/JAHIA_POD_ID 8080:8080
Default Jahia admin credentials (initial setup):
- Username:
root
- Password: Initially set during Jahia first-setup wizard (on UI).
π¦ Troubleshooting & Useful Commands:
Check logs:
kubectl logs -f deploy/jahia
Monitor events:
kubectl get events -w
If pods stuck, describe pods:
kubectl describe pod <pod-name>
β You're now running Jahia 8.2.1.0 on Kubernetes!