This topic describes how to view the logs of a running Flink job and access the Flink web UI.
Prerequisites
Before you begin, ensure that you have:
A Flink cluster created on the EMR on ACK page of the E-MapReduce (EMR) console. For more information, see Getting started
View Flink job logs
JobManager and TaskManager logs are available directly from the EMR console.
Log on to the EMR console. In the left-side navigation pane, click EMR on ACK.
On the EMR on ACK page, find the Flink cluster and click the name of the Container Service for Kubernetes (ACK) cluster in the ACK Cluster column.
On the Pods page, find the pod and click Logs in the Actions column. The console displays the JobManager or TaskManager logs for your Flink job.
Access the Flink web UI
Access the web UI by forwarding a port from your local machine to the Flink REST Service.
Connect to the ACK cluster using kubectl. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster. Alternatively, connect by calling an API operation. For more information, see Use the Kubernetes API.
Run the following command to forward port
18088on your local machine to port8081of the Flink REST Service:kubectl port-forward -n <yourClusterId> svc/basic-emr-example-rest 18088:8081Replace the following placeholders with actual values:
Placeholder Description How to get it <yourClusterId>The ID of the Flink cluster Find it on the EMR on ACK page of the EMR console svc/basic-emr-example-restThe name of the Flink REST Service in <flink_deployment_name>-restformatRun kubectl get svc -n <yourClusterId>to list all Services in the clusterOpen
http://127.0.0.1:18088/#/overviewin your browser to view the Flink job status.