The Container Service for Kubernetes (ACK) console provides extensive features to help you manage and maintain clusters and applications. This topic describes how to deploy an NGINX application, configure an Ingress, and query log data in the ACK console.
Prerequisites
Step 1: Deploy an NGINX application
Log on to the ACK console. In the navigation pane on the left, click Clusters.
On the Clusters page, find the cluster you want to manage and click its name. In the left-side pane, choose .
On the Deployments page, click Create from YAML in the upper-right corner. Then, configure the parameters and click Create.
To configure log collection, add the following content to the
spec.containersfield in your template:NoteIn the following sample code,
aliyun_logs_log-nginxvarlogspecifies that the name of the created Logstore is log-nginxvarlog. The value stdout specifies that the Logstore collects standard outputs of containers from the specified path. For log collection parameter configuration details, see Collect container logs from ACK clusters.env: - name: aliyun_logs_log-nginxvarlog value: stdout
After the NGINX application is created, you can click the
icon in the upper-left corner of the page to view the application on the Deployments page.

Step 2: Create a Service and release the NGINX application
In the left-side navigation pane of the details page, choose .
On the Services page, click Create in the upper-right corner. In the Create Service dialog box, configure the parameters and click OK.
Parameter
Description
Example
Name
Enter a name for the Service.
nginxservice
Service Type
Multiple types are supported.
Cluster IP
Backend
Set the associated services.
nginx-deployment-basic
Port Mapping
Configure the external port mapping.
Service Port: 80
Container Port: 80
Protocol: TCP
Step 3: Create an NGINX Ingress to expose the NGINX application
In the left-side navigation pane of the details page, choose .
On the Ingresses page, click Create Ingress.
Set Gateway Type to Nginx Ingress, configure the Ingress as described in the following section, and click OK.
The following section describes only the key parameters. For more information about how to configure other parameters, see Create an NGINX Ingress.
Name: Enter a name for the Ingress. The name is set to ingress-demo in this example.
Rules: Leave the Domain Name parameter empty, set Path to
/, use the default match rule, use the nginxservice Service that you created in Step 2, and set Port to 80.
Wait about 1 minute. The Ingress IP address is displayed in the Endpoint column of ingress-demo on the Ingresses page Enter the Ingress IP address into the address bar of the browser. If the following page is displayed, the Ingress is created.
Step 4: View the access log of the NGINX application
After the NGINX application is released and exposed, the NGINX Ingress controller allows you to stream all HTTP request log data to standard outputs. You can view the access log of the NGINX application and monitor the real-time status of the NGINX Ingress in the Simple Log Service console.
Log on to the ACK console. In the navigation pane on the left, click Clusters.
On the Clusters page, find the target cluster and click its name. In the navigation pane on the left, click Cluster Information.
On the page that appears, click the Cluster Resources tab, find Log Service Project, and then click its ID to check the Logstore.
On the Logstores tab, select log-nginxvarlog to view the latest access log of the application.
