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
| Item | Detail |
|---|---|
| Configuration | Use ConfigMaps or volume mounts for conf/ |
| Certificates | Use Kubernetes Secrets or cert-manager |
| Scaling | Horizontal Pod Autoscaler for traffic spikes |
| Ingress | Use 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
- Continue to Cloud Hosting for cloud provider considerations.