Cluster resource
A Cluster resource represents a cluster other than the one Pipelines is currently running on. This resource allows users to deploy applications or functions on different clusters.
The resource uses the provided parameters to create a link:(kubeconfig
file that can be used by other steps in the pipeline task to access the target cluster. The kubeconfig file is placed in /workspace/<your-cluster-name>/kubeconfig on your Task container.
The Cluster resource has the following parameters:
Required:
-
name: The name to be given to the target cluster, will be used in the kubeconfig file and also as part of the path to the kubeconfig file. -
URL: Host URL of the master node. -
username: The user with access to the cluster. -
cadata: Holds PEM-encoded bytes and is typically read from a root certificate bundle.
Optional:
-
password: To be used for clusters with basic auth -
token: Used for authentication. If present it is used ahead of the password. -
insecure: Indicates whether the server should be accessed without verifying the TLS certificate.
|
Only one authentication technique is allowed per user; either a |
The following example displays the syntax and structure of a Cluster resource:
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: test-cluster
spec:
type: cluster
params:
- name: URL
value: https://10.10.10.10 # url to the cluster master node
- name: cadata
value: LS0tLS1CRUdJTiBDRVJ.....
- name: token
value: ZXlKaGJHY2lPaU....