1.5 KiB
1.5 KiB
Kubernetes plugin for Nextflow
Summary
The Kubernetes plugin provides native Kubernetes execution capability for Nextflow pipelines. It supports pod management, volume mounting, and resource allocation.
Get Started
To use this plugin, add it to your nextflow.config:
plugins {
id 'nf-k8s'
}
Configure the Kubernetes executor:
process.executor = 'k8s'
k8s {
namespace = 'default'
serviceAccount = 'nextflow'
storageClaimName = 'nextflow-pvc'
}
The plugin automatically detects the Kubernetes configuration from:
- In-cluster configuration (when running inside a pod)
~/.kube/configfileKUBECONFIGenvironment variable
Examples
Basic Kubernetes Configuration
plugins {
id 'nf-k8s'
}
process.executor = 'k8s'
k8s {
namespace = 'nextflow'
serviceAccount = 'nextflow-sa'
storageClaimName = 'nf-workdir-pvc'
storageMountPath = '/workspace'
}
workDir = '/workspace/work'
Pod Configuration
k8s {
namespace = 'nextflow'
pod = [
[volumeClaim: 'data-pvc', mountPath: '/data'],
[secret: 'aws-credentials', mountPath: '/root/.aws']
]
}
Resource Requests
process {
executor = 'k8s'
cpus = 2
memory = '4 GB'
pod = [[label: 'app', value: 'nextflow']]
}