Home > Article > Operation and Maintenance > What is the difference between pod and docker
The difference between pod and docker: 1. Pod is the smallest deployment unit in k8s, and docker is an open source application container engine; 2. Pod is a multi-process design, and there can be multiple containers in a Pod. Run multiple applications, and docker is a single-process design. One application is run in a container, and the daemon process can ensure that multiple containers are started.
The operating environment of this tutorial: linux7.3 system, docker version 19.03, Dell G3 computer.
The basic concept of Pod
1. Pod is the smallest deployment unit in k8s ;
2. A Pod contains a group of containers (one or more containers);
3. All containers in a Pod share the network command space;
4 The life cycle of .Pod is short-lived.
The relationship between containers and pods
A pod can contain one or more containers. It can be understood that a pod is a container of containers. We can view the container information of the corresponding pod through the kubectl describe pod
1 pod corresponds to 1 container
The difference between Pod and Docker
1. Pod is a multi-process design: there can be multiple containers in a Pod and multiple applications can be run;
2. The container is a single-process design: one application is run in a container, and the daemon process can ensure Start multiple containers;
3. The meaning of Pod’s existence: for intimate applications
3.1 Interaction between two applications. For example, if one application is responsible for reading and another application is responsible for writing, it is more reasonable to put them in one Pod;
3.2 For calls between networks, there is no need to call through IP in the same Pod;
3.3 Two Frequent calls are required between applications to ensure higher performance.
Recommended learning: "docker video tutorial"
The above is the detailed content of What is the difference between pod and docker. For more information, please follow other related articles on the PHP Chinese website!