Knative: Operator’s Handbook

Activation (wake up)

When a Knative Service is scaled to zero, it has no Pods running to receive traffic, so it's sleeping. 😴 How do we wake up the Serviceby scaling it up to handle traffic?

This is done by activator component. How does it do that:

Activation in action

Deploy an app, wait for it to scale to 0 Pods.

Look at Endpoints objects of the deployed Revision, it is pointing to the IP address of the activator Pod:

$ kubectl get endpoints
NAME                  ENDPOINTS            AGE
hello-tcz5c        2m23s
$ kubectl get pods -n knative-serving -o=wide
NAME                           STATUS    IP          AGE
activator-7688586ccb-gl9qx     Running   58s

Now wake up 🌞 the Service, by making a request.

You'll see that Endpoints of the revision is now updated with the pod IPs:

$ kubectl get endpoints
NAME                  ENDPOINTS                       AGE
hello-tcz5c                   7s
$ kubectl get pods -o=wide
NAME                           STATUS    IP          AGE
hello-tcz5c-deployment-689d8   Running   58s