Add a Spot connector
Add a Harness Spot Elastigroup connector.
This topic describes how to connect Harness with your Spot cloud.
Install the Harness Delegate
The Harness Delegate is a service you run in your local network or VPC to connect Harness with your artifact repos, Spot infrastructure, and any other providers needed for deployments.
Expand the following section to learn how to install the Harness Delegate.
To learn more, watch the Delegate overview video.
Add the Spot Elastigroup cloud provider
You can connect Harness to a Spot Elastigroup cloud provider by adding a Harness Spot connector.
Here's a Spot Elastigroup connector YAML sample:
connector:
name: spotinst-conn
identifier: spotinstconn
description: ""
orgIdentifier: Ng_Pipelines_K8s_Organisations
projectIdentifier: DoNotDelete_IvanBalan
type: Spot
spec:
credential:
type: PermanentTokenConfig
spec:
spotAccountId: act-a12b12cd
apiTokenRef: spotapitoken
executeOnDelegate: trueCreate a connector using Connector API.
curl -i -X POST \
'https://app.harness.io/gateway/ng/api/connectors?accountIdentifier=string&branch=string&repoIdentifier=string&rootFolder=string&filePath=string&commitMsg=string&isNewBranch=false&baseBranch=string&connectorRef=string&storeType=INLINE&repoName=string' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"connector": {
"name": "string",
"identifier": "string",
"description": "string",
"orgIdentifier": "string",
"projectIdentifier": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"type": "K8sCluster",
"spec": {
"connectorType": "string"
}
}
}'To connect to a Spot Elastigroup cloud provider using Spot's API, go to Spot API authentication.
For the Terraform Provider resource, go to harness_platform_connector_spot.
Perform the following steps to add a Spot connector in Harness Manager.
Open a Harness project.
In Project Setup, select Connectors, then select New Connector.
In Cloud Providers, select Spot. The Spot connector settings appear.
Enter a connector name, enter an optional description and tag, and then select Continue.
Harness automatically creates an Id for the connector. The Id is based on the connector's name.
In Authentication, select one of the following options.
Plaintext - Enter the Spot Account Id and API Token. For API token, you can either create a new secret or use an existing one.
Encrypted - You can create or select a secret for your Spot account Id and API token.
Select Continue.
In Connect to the provider, select Connect through a Harness Delegate, and then select Continue.
We don't recommend using the Connect through Harness Platform option here because you'll need a delegate later when deploying to your Spot cloud. Typically, the Connect through Harness Platform option is a quick way to make connections without having to use delegates.
In Set Up Delegates, select the Connect using Delegates with the following Tags option and enter the name of the delegate you created earlier.
Select Save and Continue.
Once the test connection succeeds, select Finish.
The connector now appears in the Connectors list.
Last updated
Was this helpful?