This topic describes the differences in network configurations when you create an application from an image in a cluster of Container Service for Swarm and a cluster of Container Service for Kubernetes (ACK).
Create an application from an image
- For more information about how to create an application from an image in a Swarm cluster, see Create an application.
- For more information about how to create an application from an image in an ACK cluster, see Use an image to create a stateless application.
Network configurations
In Swarm clusters, network configurations are used to expose applications to external access.
Port mapping
Swarm cluster
You can configure port mapping to map the application port to a port on the host. If you set the same port on all
hosts, you can access the application by requesting <HostIP>:<Port>
.

ACK cluster
You can create a NodePort type Service to expose your application to external access. You can use one of the following methods to create a Service.
Method 1: Create a NodePort type Service when you create an application
Method 2: Directly create a NodePort type Service
Simple routing
Swarm cluster

ACK cluster
You can create an Ingress to implement simple routing and other related features. You can also use Ingresses to implement blue-green deployment and canary release. For more information, see Overview.
Method 1: Create an Ingress when you create an application
You can use one of the following methods to create an Ingress.
Method 2: Directly create an Ingress
Load balancing
Swarm cluster

ACK cluster
You can also use SLB to expose your application. You do not need to create an SLB instance. Instead, you can create a LoadBalancer type Service, which automatically creates an SLB instance for you. You can specify whether the SLB instance is used for public access or internal access. If you use a YAML file to create a LoadBalancer type Service, you can use an existing SLB instance and configure session persistence. For more information, see Create a service.
Method 1: Create a LoadBalancer type Service when you create an application
You can use one of the following methods to create a LoadBalancer type Service: