We recommend using the kubectl
command for troubleshooting streams and tasks.
You can list all artifacts used by using the following command:
kubectl get cm,secrets,svc,rc,pod
You can access the server log by using the following command (just supply the name of pod for the server):
kubectl logs <scdf-pod-name>
The streams apps are deployed with teh stream name followed by the name of the app and for processors and sinks there is also an instance index appended.
To see details for a specifc app deployment you can use (just supply the name of pod for the app):
kubectl details <app-pod-name>
For the application logs use:
kubectl logs <app-pod-name>
If you would like to tail a log you can use:
kubectl logs -f <app-pod-name>
Tasks are launched as bare pods without a replication controller. The pods remain after the tasks complete and this gives you an opportunity to review the logs.
To review the task logs use:
kubectl logs <task-pod-name>
You have two options to delete completed pods. You can delete them manually once they are no longer needed.
To delete the task pod use:
kubectl delete pod <task-pod-name>
You can also use the Data Flow shell command task execution cleanup
command to remove the completed pod for a task execution.
First we need to determine the ID
for the task execution:
dataflow:>task execution list ╔═════════╤══╤════════════════════════════╤════════════════════════════╤═════════╗ ║Task Name│ID│ Start Time │ End Time │Exit Code║ ╠═════════╪══╪════════════════════════════╪════════════════════════════╪═════════╣ ║task1 │1 │Fri May 05 18:12:05 EDT 2017│Fri May 05 18:12:05 EDT 2017│0 ║ ╚═════════╧══╧════════════════════════════╧════════════════════════════╧═════════╝
Next we issue the command to cleanup the execution artifacts (the completed pod):
dataflow:>task execution cleanup --id 1 Request to clean up resources for task execution 1 has been submitted