Deploy Next.js 16.0.1 and Node 20 with Jenkins pipeline on Kubernetes gives error: Could not find any JavaScript file in "APP_DIR" (/data/app)
I'm trying to deploy a Next.js 16 / Node 20 application to Kubernetes using a Jenkins pipeline and without using a Dockerfile.
In my Jenkins pipeline I do the following steps:
- npm install
- npm run build
- Zip the directory .next and upload it to Artrepo
- Build image for Kubernetes from the zip
Symptoms in Kubernetes:
Could not find any JavaScript file in "APP_DIR" (/data/app)
Readiness probe failed: Get "http://:3000/": dial tcp :3000: connect: connection refused
Back-off restarting failed container in pod
I belive that I am missing something? Maby how to start the image in Kuberenetes?