This topic describes the differences in network configurations when you deploy an
application from an image in a Container Service for Swarm cluster and in a Container
Service for Kubernetes (ACK) cluster.
Deploy an application from an image
The user interfaces for deploying an application from an image in a Container Service
for Swarm cluster and in an ACK cluster are quite different.
Network configurations
In Container Service for Swarm clusters, network configurations are used to expose applications to external access.
Port mapping
Container Service for Swarm cluster
You can configure port mapping to map the application port to a port on the host. After you specify a host port
number, the application port is mapped to this port on each host. You can access the
application by sending requests to <HostIP>:<Port>
.

ACK cluster
You can create a NodePort 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 Service when you deploy an application
- After you complete the settings on the Container wizard page, proceed to the Advanced wizard page. In the Access Control section, click Create on the right side of Services.
- Select Node Port from the Type drop-down list. For more information, see Create a stateless application by using a Deployment.
Method 2: Directly create a NodePort Service
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane of the details page, choose .
- Select the namespace to which the Service belongs. In the upper-right corner of the
Services page, click Create. In the Create Service dialog box, select Node Port from the Type drop-down list. For more information, see Manage Services.
Simple routing
Container Service for Swarm cluster
You can configure
simple routing to expose your application through a domain name. You can specify a custom domain
name or use the default domain name that is provided by Container Service for Swarm.

ACK cluster
You can create an Ingress to implement simple routing and other related features.
You can also use Ingresses to implement blue-green releases and canary releases for
applications in ACK clusters. For more information, see Use Ingresses to implement canary releases.
Method 1: Create an Ingress when you deploy an application
You can use one of the following methods to create an Ingress:
- After you complete the settings on the Container wizard page, proceed to the Advanced wizard page. In the Access Control section, click Create on the right side of Ingresses.
- Deploy a stateless application from an image. For more information, see Create a stateless application by using a Deployment.
Method 2: Directly create an Ingress
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane of the details page, choose .
- Select the namespace to which the Ingress belongs and click Create in the upper-right corner of the Ingresses page. For more information, see How to perform basic operations on an Ingress in the ACK console.
Load balancing
Container Service for Swarm cluster
You can configure
load balancing to expose your application by using Server Load Balancer (SLB). You must create an
SLB instance and associate the instance IP and port with your application. Then, you
can access the application by sending requests to <SLB_IP>:<Port>.

ACK cluster
You can also use an SLB instance to expose your application that is deployed in an
ACK cluster. You do not need to manually create and configure an SLB instance. A LoadBalancer
Service automatically creates an SLB instance for you. You can specify whether the
SLB instance is used to enable access over the Internet or a private network. If you
create a LoadBalancer Service by using a YAML template, you can specify to use an
existing SLB instance and enable the session persistence feature. For more information,
see Manage Services.
Method 1: Create a LoadBalancer Service when you deploy an application
You can use one of the following methods to create a LoadBalancer Service:
- After you complete the settings on the Container wizard page, proceed to the Advanced wizard page. In the Access Control section, click Create on the right side of Services.
- Select Server Load Balancer from the Type drop-down list. For more information, see Create a stateless application by using a Deployment.
Method 2: Directly create a LoadBalancer Service
- Log on to the ACK console.
- In the left-side navigation pane of the ACK console, click Clusters.
- On the Clusters page, find the cluster that you want to manage and click the name of the cluster
or click Details in the Actions column. The details page of the cluster appears.
- In the left-side navigation pane of the details page, choose .
- Select the namespace to which the Service belongs. In the upper-right corner of the
Services page, click Create. In the Create Service dialog box, select Server Load Balancer from the Type drop-down-list. For more information, see Manage Services.