The Deployment and Service manifests are fine — apps/v1 and v1 are still the current API versions. The container they schedule is the problem. It runs the PHP development server, on a PHP version that has been end-of-life since November 2022, and here is what the first of those costs you:
# two requests against `php -S` (which is what `php artisan serve` starts).
# the second one does no work at all and is issued 0.3s after the first.
slow took 3.01s pid=74879 start=...169.896 end=...172.900
fast took 2.71s pid=74879 start=...172.901 end=...172.901
Same PID, and the fast request’s start timestamp is the slow request’s end timestamp. It did not run concurrently; it queued. One in-flight request is the entire capacity of the process, so replicas: 3 gives a concurrency of three — not three times the throughput of one pod, literally three simultaneous requests, shared with every liveness probe and health check. deploy-laravel-kubernetes-aws-eks.sh repeats those two requests against a php -S listener on a local port and asserts the shared PID, then re-checks the PHP 7.4 end-of-life date, the missing 7.4-fpm tag and Laravel 13’s PHP requirement, and lists every EKS claim as skipped rather than run.
php.net says this outright about the built-in server: “It is not intended to be a full-featured web server. It should not be used on a public network” and “The web server runs only one single-threaded process, so PHP applications will stall if a request is blocked.” Laravel’s own command describes itself as serving “on the PHP development server”, and Laravel’s deployment documentation covers Nginx with PHP-FPM and FrankenPHP — artisan serve appears nowhere on it.
Table of Contents
Fixing the image
A Dockerfile that starts FROM php:7.4-fpm points at a tag that is no longer published:
$ curl -s https://raw.githubusercontent.com/docker-library/docs/master/php/README.md -o php-readme.md
$ grep -o '7\.4' php-readme.md | wc -l
0
$ grep -oE '`[0-9]+\.[0-9]+-fpm`' php-readme.md | sort -u
`8.2-fpm` `8.3-fpm` `8.4-fpm` `8.5-fpm`
$ # php.net/eol.php, 7.4 row:
7.4 | 28 Nov 2022 (3 years, 8 months ago) | 7.4.33
$ # php.net/supported-versions.php, active support until:
8.2 | 8 Dec 2022 | 31 Dec 2024 8.4 | 21 Nov 2024 | 31 Dec 2026
8.3 | 23 Nov 2023 | 31 Dec 2025 8.5 | 20 Nov 2025 | 31 Dec 2027
Laravel 13 requires PHP ^8.3. Of the branches that satisfy it, 8.3 is already security-only, so 8.4 or 8.5 is the choice. A Dockerfile with a separate build stage for dependencies:
FROM composer:2 AS vendor
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-scripts --no-interaction
FROM php:8.4-fpm
RUN docker-php-ext-install pdo_mysql opcache
WORKDIR /var/www
COPY --from=vendor /app/vendor ./vendor
COPY . .
# no CMD php artisan serve. php-fpm is the image's own entrypoint.
Two details matter. Copying composer.lock and running composer install before the application code means a code change does not reinstall your dependencies. And --no-dev keeps PHPUnit, Faker and the debug bar out of a production image.
Three things the Deployment needs
spec:
containers:
- name: laravel-app
image: <account-id>.dkr.ecr.<region>.amazonaws.com/laravel-app:<git-sha>
ports: [{containerPort: 9000}]
env:
- name: APP_KEY
valueFrom: {secretKeyRef: {name: laravel-secrets, key: app-key}}
resources:
requests: {cpu: 250m, memory: 256Mi}
limits: {memory: 512Mi}
readinessProbe:
httpGet: {path: /up, port: 8080}
livenessProbe:
httpGet: {path: /up, port: 8080}
initialDelaySeconds: 15
The probes are HTTP checks on port 8080, so the pod needs an HTTP server listening there, such as an nginx sidecar in front of php-fpm, because php-fpm on port 9000 speaks FastCGI rather than HTTP; if php-fpm is the only container, use a tcpSocket probe on port 9000 instead, which only confirms that php-fpm accepts connections.
Without APP_KEY the application throws on boot. Without a readiness probe, Kubernetes routes traffic to a pod the moment the process starts, before PHP-FPM is listening. Without resource requests the scheduler has no idea what the pod needs. And note the image tag: :latest means a rollout may or may not pull a new image and kubectl rollout undo has nothing to roll back to. Tag with the commit SHA.
What EKS upgrades automatically, and what it does not
The reassurance “EKS handles updates and patches for you automatically” is close to the opposite of what AWS’s documentation says, and the difference is a production incident.
Nodes are never upgraded for you. AWS’s own FAQ: “Are Amazon EKS managed node groups automatically updated along with the cluster control plane version? No.” Same answer for self-managed node groups and for Fargate pods.
The control plane is force-upgraded, but only at the very end, and not in a way you want to discover. A Kubernetes version gets 14 months of standard support and then 12 months of extended support. At the end of that, per AWS: “Clusters running on a Kubernetes version that has completed its 26-month lifecycle… will be auto-upgraded to the next version. The auto-upgrade includes only the Kubernetes control plane. … Self-managed nodes and EKS Managed Node Groups will remain on the previous version.” And: “You won’t receive any notification before the update.” Clusters upgraded that way cannot be rolled back, whereas a deliberate in-place upgrade can be, within seven days.
So the failure mode of ignoring upgrades is not “AWS takes care of it”. It is an unannounced control-plane jump that leaves every node behind on the old version. It also costs money before it gets there — extended support is billed at $0.60 per cluster per hour against $0.10 for a version in standard support, six times the rate, and it starts automatically the day standard support ends.
Two more things to know: load balancers and cluster access
A bare type: LoadBalancer still gets you a Classic Load Balancer. AWS’s own words: “the AWS cloud provider load balancer controller creates AWS Classic Load Balancers by default… This controller is only receiving critical bug fixes in the future.” The recommended path is the AWS Load Balancer Controller, which creates NLBs, and it needs annotations — service.beta.kubernetes.io/aws-load-balancer-type: "external" is the one that switches controllers. Note NLBs default to an internal scheme, and AWS says not to edit these annotations after creating the Service; delete and recreate instead.
Cluster access has a new mechanism. The aws-auth ConfigMap that every older tutorial uses is what AWS now calls “the legacy aws-auth ConfigMap”; since December 2023 the recommended mechanism is EKS access entries, and “EKS access entries are the best way to grant users access to the Kubernetes API”. Be precise here: AWS has not published a deprecation or removal date for the ConfigMap, so it is legacy, not deprecated. One-way door worth knowing before you create a cluster — once access entries are enabled they cannot be disabled, and if the ConfigMap method is not enabled at creation time it cannot be enabled later.
The command aws eks update-kubeconfig --region <region> --name <cluster> is still exactly right. AWS documents that verbatim, with a floor of AWS CLI 2.12.3 or 1.27.160.
What was not tested
Everything above about EKS is read from AWS documentation, not run. This machine has no Docker, no kubectl, no eksctl and no AWS CLI:
docker not installed
kubectl not installed
eksctl not installed
aws not installed
No cluster was created and no manifest was applied. The single-threaded measurement at the top is the one thing on this page produced by running something.