Using Kubernetes Connector in Tekton Tasks enables centralized management of tool integration information and secure access to Kubernetes clusters during Tekton Task execution.
Not all Tekton Tasks can use Kubernetes Connector.
Kubernetes Connector essentially injects temporary Kubernetes credentials through a Connector CSI Driver. It provides a configuration named kubeconfig
that generates a kubeconfig
file with temporary authentication.
Therefore, Tekton Tasks must meet the following requirements to use Kubernetes Connector:
Support mounting a kubeconfig
file via Workspace, and the Workspace must support providing only the kubeconfig
file
After confirming that your Tekton Task can use Kubernetes Connector, you can add Kubernetes Connector to the TaskRun YAML file:
For example:
For workspaces parameters, please refer to Using Connectors CSI Driver to mount kubeconfig file in Kubernetes Connector Concepts document.
For more information about Connectors CSI Driver, please refer to Connectors CSI Configuration.