The Container Service for Kubernetes (ACK) console provides rich features that allow
you to manage and maintain ACK clusters and applications. This topic describes how
to deploy an NGINX application, configure an Ingress, and query logs in the ACK console.
Step 1: Deploy an NGINX application
- 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 .
- On the Deployments page, click Create from Template in the upper-right corner of the page.
- Set the required parameters and click Create.
- At the top of the Create page, set Namespace to default.
- Set Sample Template to Resource - basic Deployment.
- Configure log collection. For more information about how to configure log collection
parameters, see Use Log Service to collect container logs.
Add the following content to the
spec
field in the template.
Note aliyun_logs_log-nginxvarlog
specifies that the name of the created Logstore is log-nginxvarlog. The value of
stdout indicates that the Logstore collects standard outputs of containers from the
specified path.
env:
- name: aliyun_logs_log-nginxvarlog
value: stdout

- Change the version of the image that is used to deploy the NGINX application to 1.9.1.

After you create the NGINX application, you can view the application on the Deployments
page.
Step 2: Release the NGINX application
- 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 .
- On the Services page, click Create in the upper-right corner of the page.
- In the Create Service dialog box, set the parameters and click Create.
Parameter |
Description |
Name |
Enter a name for the Service. |
Type |
Set Type to Cluster IP.
|
Backend |
Select nginx-deployment-basic from the drop-down list.
|
Port Mapping |
Enter a name for the port. Set Service Port to 80, Container Port to 80, and Protocol to TCP.
|
Annotations |
Add one or more annotations to the Service and configure Server Load Balancer (SLB)
parameters. For example, the annotation service.beta.kubernetes.io/alicloud-loadbalancer-bandwidth:20 specifies that the maximum bandwidth of the Service is 20 Mbit/s. This limits the
amount of traffic that flows through the Service. For more information, see Use annotations to configure SLB instances.
|
Label |
Add one or more labels to the Service. |
Step 3: 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.
- On the Ingresses page, click Create in the upper-right corner of the page.
- In the Create dialog box, set the required parameters and click Create.
The following lists key parameters. For more information about how to configure other
parameters, see
Ingress configurations.
- Name: Enter a name for the Ingress. The name is set to ingress-demo in this example.
- Rules: Enter a custom domain name in the Domain field and enter the path /nginx in the Path field. Set Name in the Services section to the name of the Service that you created
in Step 2: Release the NGINX application and use the automatically matched port 80 for Port.
On the
Ingresses page, obtain the IP address of ingress-demo in the
Endpoint column. Enter the
endpoint IP address in the address bar of your browser. If the following page is displayed, it indicates
that the Ingress is created.

Step 4: View the access log of the NGINX application
- 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, click Cluster Information.
- On the page that appears, click the Cluster Resources tab, find Log Service Project, and then click its ID to go to the Logstore.
- On the Logstores tab, select log-nginxvarlog to view the latest access log of the
application.