With the Deployment manifest ready, we can run kubectl apply to update the desired state of our cluster:
$ kubectl apply -f manifests/elasticsearch/deployment.yamldeployment.apps "elasticsearch" created
This will trigger a set of events:
- kubectl sends the Deployment manifest to the Kubernetes API server (kube-apiserver). kube-apiserver will assign it a unique ID, and adds it on to etcd.
- The API server will also create the corresponding ReplicaSet and Pod Objects and add it to etcd.
- The scheduler watches etcd and notices that there are Pods that have not been assigned to a node. Then, the scheduler will make a decision about where to deploy the Pods specified by the Deployment.
- Once a decision ...