diff --git a/modules/nextflow/src/main/groovy/nextflow/k8s/client/K8sClient.groovy b/modules/nextflow/src/main/groovy/nextflow/k8s/client/K8sClient.groovy index 6fe1f75a19..ea9193be3f 100644 --- a/modules/nextflow/src/main/groovy/nextflow/k8s/client/K8sClient.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/k8s/client/K8sClient.groovy @@ -487,7 +487,7 @@ class K8sClient { if( status.conditions instanceof List ) { final allConditions = status.conditions as List final cond = allConditions.find { cond -> cond.type == 'PodScheduled' } - if( cond.reason == 'Unschedulable' ) { + if( cond?.reason == 'Unschedulable' ) { def message = "K8s pod cannot be scheduled" if( cond.message ) message += " -- $cond.message" //def cause = new K8sResponseException(resp)