A container deployment method, wherein the method is applied to a network device, and comprises: receiving a container deployment message, wherein the container deployment message comprises container image information and association information of a container; creating, based on the container image information, a container for a first service, and a first network namespace and a first interprocess communication, IPC, namespace that are corresponding to the container for the first service; creating a first load balancing container corresponding to the container for the first service, and setting a running parameter of the first load balancing container to a parameter of the first network namespace, wherein the running parameter is used by the first load balancing container to share the first network namespace during running; creating a loopback interface in the first network namespace, wherein the loopback interface is used by the first load balancing container to communicate with the container for the first service; determining, based on the association information of the container, that the network device has a container that is for a second service and that is associated with the container for the first service; and obtaining a parameter of a second IPC namespace corresponding to the container for the second service, and setting a starting parameter of the first load balancing container to the parameter of the second IPC namespace, wherein the starting parameter is used by the first load balancing container to communicate with the container for the second service by using an IPC interface of the second IPC namespace after the first load balancing container is started, and the parameter of the second IPC namespace is different from a parameter of the first IPC namespace. receiving a container deployment message, wherein the container deployment message comprises container image information and association information of a container; creating, based on the container image information, a container for a first service, and a first network namespace and a first interprocess communication, IPC, namespace that are corresponding to the container for the first service; creating a first load balancing container corresponding to the container for the first service, and setting a running parameter of the first load balancing container to a parameter of the first network namespace, wherein the running parameter is used by the first load balancing container to share the first network namespace during running; creating a loopback interface in the first network namespace, wherein the loopback interface is used by the first load balancing container to communicate with the container for the first service; determining, based on the association information of the container, that the network device has a container that is for a second service and that is associated with the container for the first service; and obtaining a parameter of a second IPC namespace corresponding to the container for the second service, and setting a starting parameter of the first load balancing container to the parameter of the second IPC namespace, wherein the starting parameter is used by the first load balancing container to communicate with the container for the second service by using an IPC interface of the second IPC namespace after the first load balancing container is started, and the parameter of the second IPC namespace is different from a parameter of the first IPC namespace.