- Newest
- Most votes
- Most comments
When you have an EMR Virtual cluster that you can't delete because of a stuck job, and the underlying EKS cluster has already been deleted, you're facing a dependency issue where the EMR service is still tracking a job that can't be properly terminated.
Since the job keeps reverting from "Cancel pending" back to "Submitted" state, you'll need to take a different approach to resolve this issue. Here are steps you can try:
- First, try to delete the EMR on EKS virtual cluster directly using the AWS CLI command:
aws emr-containers delete-virtual-cluster --id your-virtual-cluster-id
If that doesn't work because of the stuck job, you can try to delete any managed endpoints associated with the virtual cluster:
aws emr-containers delete-managed-endpoint --id managed-endpoint-id --virtual-cluster-id your-virtual-cluster-id
If the job is still preventing deletion, you might need to force the deletion by:
- Identifying all virtual clusters in your region:
aws emr-containers list-virtual-clusters --region your-region
- Then delete the specific virtual cluster:
aws emr-containers delete-virtual-cluster --region your-region --id your-virtual-cluster-id
Since the underlying EKS cluster is already deleted, the EMR virtual cluster is essentially orphaned. In some cases, you may need to contact AWS Support if none of these methods work, as they might need to help clean up the resources at the service level.
Sources
Use Batch Processing Gateway to automate job management in multi-cluster Amazon EMR on EKS environments | AWS Big Data Blog
Delete an interactive endpoint - Amazon EMR
answered a year ago
Relevant content
asked 4 years ago
