concept new pod in category kubernetes

appears as: new pod, new pods, new pods, The new pods, The new pod
Kubernetes in Action

This is an excerpt from Manning's book Kubernetes in Action.

When you ran the kubectl command, it created a new ReplicationController object in the cluster by sending a REST HTTP request to the Kubernetes API server. The ReplicationController then created a new pod, which was then scheduled to one of the worker nodes by the Scheduler. The Kubelet on that node saw that the pod was scheduled to it and instructed Docker to pull the specified image from the registry because the image wasn’t available locally. After downloading the image, Docker created and ran the container.

You’ll create a new pod that includes an HTTP GET liveness probe. The following listing shows the YAML for the pod.

The current number of replicas matches the desired number, because the controller has already created a new pod. It shows four running pods because a pod that’s terminating is still considered running, although it isn’t counted in the current replica count.

Listing 6.6. Retrieving MongoDB’s persisted data in a new pod
$ kubectl exec -it mongodb mongo
MongoDB shell version: 3.2.8
connecting to: mongodb://127.0.0.1:27017
Welcome to the MongoDB shell.
...
> use mystore
switched to db mystore
> db.foo.find()
{ "_id" : ObjectId("57a61eb9de0cfd512374cc75"), "name" : "foo" }


!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":32}],[{\"line\":5,\"ch\":0},{\"line\":5,\"ch\":13}],[{\"line\":7,\"ch\":0},{\"line\":7,\"ch\":15}]]"}
!@%STYLE%@!
Figure 9.14. Deployment blocked by a failing readiness probe in the new pod