| name | nextjs-k8s-deploy |
| description | Deploy Next.js applications to Kubernetes |
Next.js Kubernetes Deployment
When to Use
- Deploying Next.js frontend to Kubernetes
- Building containerized Next.js apps
- Setting up production-ready deployments
Instructions
Generate Deployment Files
- Run generator:
python scripts/generate_deployment.py <app-name> --port 3000
- Review generated Dockerfile and K8s manifests
- Customize as needed
Build and Deploy
- Build image:
python scripts/build_image.py <app-name>
- Deploy:
python scripts/deploy.py <app-name> --namespace apps
- Verify:
python scripts/verify.py <app-name> --namespace apps
Configure Ingress
- Create ingress:
python scripts/create_ingress.py <app-name> --domain app.example.com
- Apply:
kubectl apply -f <app-name>/k8s/ingress.yaml
Validation
See REFERENCE.md for Next.js optimization and ingress configuration.