official next.js deployment adapter · knative

Scale‑to‑zero Next.js, on Knative.

knext is a deployment adapter that runs Next.js on the official Adapter API with true scale-to-zero — pods drop to nothing when idle and wake on the first request, with bytecode-cached cold starts. One operator. Any cloud. No lock-in.

replicas · autoscaler: KPA · target idle → 0
idle cost: $0 · pods scaled to zerocold wake: bytecode cache skips JS recompile
// why knext
01

Official adapter, not a fork

Built on Next.js's official Deployment Adapter API (NextAdapter, output:'standalone'). No reverse-engineered runtime. (Compatibility is tracked honestly in the compat matrix — knext does not yet claim to pass the official suite.)

02

True scale-to-zero

Knative KPA + activator: idle services drop to 0 replicas and wake on demand through the activator. You pay for requests, not idle containers.

03

Bytecode-cached cold starts

NODE_COMPILE_CACHE persists V8 bytecode to a volume — cold pods skip JS recompilation. Self-hosted, on your cluster.

04

Multi-cloud, no lock-in

One Go operator + a NextApp CRD reconciles your app on GKE, EKS, AKS, OKE, or bare-metal. Object storage via gcs, s3, or minio. Your manifests are yours.

// declare it, the operator reconciles it

Your app is a resource.

Describe the deployment once as a NextApp custom resource. The operator — the single source of truth for cluster state — builds the Knative Service, wires scale-to-zero, and rejects any image that is not digest-pinned.

  • 01 push a digest-pinned image
  • 02 apply the NextApp CR
  • 03 operator reconciles → reachable URL, scaled to zero
# the whole deployment, declared
apiVersion: apps.kn-next.dev/v1alpha1
kind: NextApp
metadata:
  name: storefront
spec:
  image: registry/storefront@sha256:9f1c...   # digest-pinned (required)
  scaling:
    minScale: 0      # scale to zero
    maxScale: 20
  cache:
    enableBytecodeCache: true   # NODE_COMPILE_CACHE on a PVC