Skip to main content

Kubernetes credentials

Seqera uses Kubernetes credentials to connect to your cluster. You can authenticate with a service account token or with an X509 client certificate.

These credentials are for generic Kubernetes compute environments. Amazon EKS and Google Kubernetes Engine use the credentials of their cloud provider.

Prerequisites

You need the following:

Create a service account token​

  1. Create a persistent API token for the tower-launcher-sa service account:

    kubectl apply -f - <<EOF
    apiVersion: v1
    kind: Secret
    metadata:
    name: tower-launcher-token
    namespace: tower-nf
    annotations:
    kubernetes.io/service-account.name: tower-launcher-sa
    type: kubernetes.io/service-account-token
    EOF
  2. Confirm that Kubernetes created the persistent API token secret:

    kubectl -n tower-nf describe secrets/tower-launcher-token
  3. Obtain the token:

    kubectl -n tower-nf describe secret <SERVICE-ACCOUNT-TOKEN-NAME> | grep -E '^token' | cut -f2 -d':' | tr -d '\t '

    Replace <SERVICE-ACCOUNT-TOKEN-NAME> with the name of the service account token (default: tower-launcher-token).

Add the credentials in Seqera​

  1. In your workspace, go to Credentials and add new credentials. You can also select + next to the Credentials drop-down when you create a compute environment.

  2. Enter a name, such as K8s Credentials, and for Provider, select Kubernetes.

  3. Under Credential type, select Service account token or X509 Client Certs:

    • To authenticate using a Kubernetes service account, enter your service account token in the Token field.
    • To authenticate using an X509 client certificate, paste the contents of your certificate file in the Client certificate field and the contents of your key file in the Client key field. Include the -----BEGIN...----- and -----END...----- lines. To generate your client certificate and key, see the Kubernetes documentation.
  4. Select Add.

Next step​

Create a Kubernetes compute environment.