What happens when you run kubectl apply -f deploy.yaml?

kubectl sends the object to the API server, which authenticates, authorises, runs admission and stores it in etcd. The Deployment controller creates a ReplicaSet, which creates Pods. The scheduler assigns each pod to a node, and that node's kubelet starts the containers through the container runtime.