https://github.com/edenreich/k8s-php-examples
Variety of php web-servers for k8s
https://github.com/edenreich/k8s-php-examples
Last synced: 7 months ago
JSON representation
Variety of php web-servers for k8s
- Host: GitHub
- URL: https://github.com/edenreich/k8s-php-examples
- Owner: edenreich
- Created: 2021-11-19T22:45:36.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T22:33:08.000Z (over 3 years ago)
- Last Synced: 2025-01-16T16:42:57.348Z (9 months ago)
- Language: Dockerfile
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Deploy PHP onto K8S
This repository is providing examples of different PHP web-servers combinations.
* [PHP-FPM proxied by HTTPD](php-httpd#README.md)
* [PHP-FPM proxied by NGINX](php-nginx#README.md)
* [PHP with Swoole](php-swoole#README.md)Unlike other languages in the PHP community the prefered approach was to NOT implement a web-server, instead reuse that which already exists. This IMO makes it a bit more difficult to package, but on the other hand you get all the security benefits of well known and maintained web-servers like apache and nginx. Alternatively some people in the PHP community would prefer to run php using swoole, which is a web-server implemented in C and written as an extension for PHP, also pretty powerful.
In order to deploy these bundles I'm going to use k3d which is a minimalist binary for spinning up a local kubernetes cluster using docker containers.
I will write all of these manfiests to be compatible for kubernetes version v1.21.1I'm going to use non-modified publicly available docker images maintained by the PHP community, just to keep things simple.
To spin-up a cluster I'll use the following command:
```sh
k3d cluster create --agents 3
```