Skip to main content

Kubernetes

Learning Focus

By the end of this lesson you will understand how OpenLiteSpeed fits into Kubernetes deployments.

OpenLiteSpeed in Kubernetes

OpenLiteSpeed can run as a Pod in Kubernetes, typically as a web/PHP tier behind a Kubernetes Service and Ingress.

Basic Pod Spec

apiVersion: v1
kind: Pod
metadata:
name: openlitespeed
spec:
containers:
- name: ols
image: litespeedtech/openlitespeed
ports:
- containerPort: 80
- containerPort: 443
volumeMounts:
- name: site-data
mountPath: /var/www
volumes:
- name: site-data
persistentVolumeClaim:
claimName: site-pvc

Considerations

ItemDetail
ConfigurationUse ConfigMaps or volume mounts for conf/
CertificatesUse Kubernetes Secrets or cert-manager
ScalingHorizontal Pod Autoscaler for traffic spikes
IngressUse NGINX Ingress or Cloudflare Tunnel for routing

Key Takeaways

  • OpenLiteSpeed works as a standard container in Kubernetes Pods.
  • Use PersistentVolumeClaims for site data and Secrets for certificates.
  • Kubernetes adds orchestration benefits like auto-scaling and rolling updates.

What's Next