News
Faster Speeds: Bandwidth for vStack Servers in Kazakhstan Increased to 200 Mbps
BS
June 27 2025
Updated June 24 2025

Running PrestaShop in Kubernetes Fast Deployment for Cloud-Based Stores

PrestaShop is a popular open-source platform for building online stores, offering flexibility and rich functionality. However, in traditional infrastructure, it faces challenges with scalability and reliability as traffic grows. Kubernetes addresses these issues by providing automatic scaling, fault tolerance, and consistent environments. This guide will help you deploy PrestaShop in Kubernetes, creating a store ready for high loads and rapid growth

Creating or Downloading Containers

Option 1 - Official Image

Quick start with the official image.

docker pull prestashop/prestashop:latest

# Test run

docker run -d -p 8080:80 --name presta-test \

-e PS_DEV_MODE=1 \

-e DB_SERVER=mysql-host \

prestashop/prestashop

Option 2 - Custom Image

1. Create `Dockerfile`:

FROM prestashop/prestashop:8.1-7.8

# Optimize for production

RUN rm -rf /var/www/html/install \

&& apt-get update && apt-get install -y libzip-dev \

&& docker-php-ext-install zip opcache \

&& echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/opcache.ini

# Set permissions

RUN chown -R www-data:www-data /var/www/html

2. Build the image:

Customization for performance.

docker build -t mycompany/prestashop:2.0 .

Deployment in Kubernetes

Architecture:

[Пользователь] → [Ingress] → [PrestaShop Pods] → [Redis] → [MariaDB] - visual selection (2)
Picture 1 - PretaShop

Step 1 - Install Dependencies

MariaDB and Redis for data and sessions.

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

helm install presta-db bitnami/mariadb-galera \

--namespace prestashop \

--set rootUser.password=DB_ROOT_PASS \

--set db.user=prestashop \

--set db.password=PRESTA_DB_PASS \

--set db.name=prestashop_db

helm install presta-redis bitnami/redis \

--namespace prestashop \

--set auth.password=REDIS_PASSWORD

Step 2 - Configuration

Settings for PrestaShop.

prestashop-configmap.yaml:

apiVersion: v1

kind: ConfigMap

metadata:

name: prestashop-config

namespace: prestashop

data:

PS_DOMAIN: "shop.example.com"

DB_SERVER: "presta-db-mariadb-galera"

DB_USER: "prestashop"

DB_NAME: "prestashop_db"

REDIS_HOST: "presta-redis-master"

Step 3 - Deployment

Deploys PrestaShop with storage.

prestashop-deployment.yaml:

apiVersion: apps/v1

kind: Deployment

metadata:

name: prestashop

namespace: prestashop

spec:

replicas: 3

selector:

matchLabels:

app: prestashop

template:

metadata:

labels:

app: prestashop

spec:

containers:

- name: prestashop

image: mycompany/prestashop:2.0

envFrom:

- configMapRef:

name: prestashop-config

- secretRef:

name: prestashop-secrets

ports:
- containerPort: 80

volumeMounts:

- name: prestashop-data

mountPath: /var/www/html

volumes:

- name: prestashop-data

persistentVolumeClaim:

claimName: prestashop-pvc

Step 4 - Service and Ingress

Enables access via a domain.

prestashop-service.yaml:

apiVersion: v1

kind: Service

metadata:

name: prestashop-service

namespace: prestashop

spec:

selector:

app: prestashop

ports:

- port: 80

apiVersion: networking.k8s.io/v1

kind: Ingress

metadata:

name: prestashop-ingress

namespace: prestashop

spec:

tls:

- hosts:

- shop.example.com

secretName: prestashop-tls

rules:

- host: shop.example.com

http:

paths:

- path: /

pathType: Prefix

backend:

service:

name: prestashop-service

port:

number: 80

Final Setup

Installation via Web Wizard

Open https://shop.example.com.

Follow steps:
- Database: presta-db-mariadb-galera, prestashop, prestashop_db, password from Secrets.

Health Check

For `readinessProbe`.

Create /var/www/html/health-check.php:

<?php

header('HTTP/1.1 200 OK');

echo "OK";
?>

Redis Configuration

Speeds up session handling.

// /app/config/parameters.php

'parameters' => [

ps_session_storage => 'ps_redis',

ps_redis_server => 'tcp://presta-redis-master:6379',

ps_redis_password => 'REDIS_PASSWORD',

]

Deploying PrestaShop in Kubernetes ensures scalability and reliability for eCommerce. This guide lays the foundation for a successful online store.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.