Skip to main content

Prepare a Kubernetes cluster

Prepare your Kubernetes cluster so that Seqera can deploy Nextflow pipelines to it.

You apply a Kubernetes manifest that creates a service account named tower-launcher-sa and the associated role bindings, all in the tower-nf namespace. Seqera uses the service account to launch Nextflow pipelines. Use this service account name when you set up the compute environment for this Kubernetes cluster in Seqera.

The same steps apply to Amazon EKS and Google Kubernetes Engine (GKE) clusters.

Prerequisites

You need the following:

  • An existing Kubernetes cluster.
  • Administrative privileges on the cluster.

Prepare the cluster​

  1. Verify the connection to your Kubernetes cluster:

    kubectl cluster-info
  2. Create a file named tower-launcher.yml with the following YAML:

    apiVersion: v1
    kind: Namespace
    metadata:
    name: tower-nf

    ---

    apiVersion: v1
    kind: ServiceAccount
    metadata:
    name: tower-launcher-sa
    namespace: tower-nf

    ---

    apiVersion: rbac.authorization.k8s.io/v1
    kind: Role
    metadata:
    name: tower-launcher-role
    namespace: tower-nf
    rules:
    - apiGroups: [""]
    resources: ["pods", "pods/status", "pods/log", "pods/exec", "persistentvolumeclaims", "configmaps"]
    verbs: ["get", "list", "watch", "create", "delete"]
    - apiGroups: ["apps"]
    resources: ["deployments"]
    verbs: ["get", "list", "watch", "create", "delete"]
    - apiGroups: ["batch"]
    resources: ["jobs", "jobs/status", "jobs/log"]
    verbs: ["get", "list", "watch", "create", "delete"]

    ---

    apiVersion: rbac.authorization.k8s.io/v1
    kind: RoleBinding
    metadata:
    name: tower-launcher-rolebind
    namespace: tower-nf
    roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: Role
    name: tower-launcher-role
    subjects:
    - kind: ServiceAccount
    name: tower-launcher-sa

    ---

    apiVersion: rbac.authorization.k8s.io/v1
    kind: RoleBinding
    metadata:
    name: tower-launcher-userbind
    namespace: tower-nf
    roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: Role
    name: tower-launcher-role
    subjects:
    - kind: User
    name: tower-launcher-user
  3. Apply the manifest:

    kubectl apply -f tower-launcher.yml
  4. Create persistent storage. Seqera requires a ReadWriteMany persistent volume claim (PVC) mounted to all nodes where workflow pods run.

    Use any storage solution that supports the ReadWriteMany access mode. These instructions do not cover storage setup. The right solution depends on what is available for your infrastructure or cloud vendor, such as NFS, GlusterFS, CephFS, or Amazon FSx. Ask your cluster administrator for more information.

  5. Apply your PVC configuration to the cluster:

    kubectl apply -f <PVC_YAML_FILE>

Next step​

Create Kubernetes credentials for the service account. For Amazon EKS and GKE, continue with the checklist for Amazon EKS or GKE.