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.
You need the following:
- A cluster prepared with the
tower-launcher-saservice account. See Prepare a Kubernetes cluster.
Create a service account token
-
Create a persistent API token for the
tower-launcher-saservice 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 -
Confirm that Kubernetes created the persistent API token secret:
kubectl -n tower-nf describe secrets/tower-launcher-token -
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
-
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.
-
Enter a name, such as K8s Credentials, and for Provider, select Kubernetes.
-
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.
-
Select Add.