fbpx
POSThttps://api.spotinst.io/ocean/gcp/k8s/launchSpec?accountId={ACCOUNT_ID}

URL Parameters

Parameter Type Description
ACCOUNT_ID * String

The Spotinst accountId associated with your token.

Example: act-123abc
Request

Headers
{
  "Authorization": "Bearer ${token}",
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
    "launchSpec":{
        "oceanId" : "o-1fff54ed",
        "sourceImage":"https://www.googleapis.com/compute/v1/projects/gke-node-images/global/images/container-v1-3-v20160517",
        "metadata": [
                        {
                            "key": "key1",
                            "value": "value1"
                        },
                        {
                            "key": "value1",
                            "value": "value2"
                        }
                    ],
        "taints": [
            {
                "key":"test",
                "value":"test",
                "effect":"NoExecute"
            }
            ],
        "labels":[
            {
                "key":"test",
                "value":"test"
            }
		]
    }
}

Body Attributes


Attribute Type Description
launchSpec * Object

launchSpec.oceanId * String

The Ocean cluster ID. required for launchSpec create.

launchSpec.sourceImage * String

Set image URL. Can be null

launchSpec.metadata Array<Object>

Add metadata to cluster

launchSpec.metadata.key * String

Set metadata's key. Required on launchSpec.metadata

launchSpec.metadata.value * String

Set metadata's name. Required on launchSpec.metadata

launchSpec.taints Array<Object>

Add taints to cluster

launchSpec.taints.key String

taint's key

launchSpec.taints.value String

taint's value

launchSpec.taints.effect String

taint's effect

Example: NoExecute
launchSpec.labels Array<Object>

Add labels on cluster

launchSpec.labels.key String

Set label key

launchSpec.labels.value String

Set label value

Response - 200

Body
Copied!
Downloaded!
{
    "request": {
        "id": "c77fd005-04b3-4e8b-93a9-bb48e9cf44b9",
        "url": "/ocean/gcp/k8s/launchSpec?spotinstAccountId=act-7461862f",
        "method": "POST",
        "timestamp": "2019-06-15T10:48:38.242Z"
    },
    "response": {
        "status": {
            "code": 200,
            "message": "OK"
        },
        "kind": "spotinst:ocean:gcp:k8s",
        "items": [
			{
		        "oceanId" : "o-1fff54ed",
		        "sourceImage":"https://www.googleapis.com/compute/v1/projects/gke-node-images/global/images/container-v1-3-v20160517",
		        "metadata": [
		                        {
		                            "key": "key1",
		                            "value": "value1"
		                        },
		                        {
		                            "key": "value1",
		                            "value": "value2"
		                        }
		                    ],
		        "taints": [
		            {
		                "key":"test",
		                "value":"test",
		                "effect":"NoExecute"
		            }
		            ],
		        "labels":[
		            {
		                "key":"test",
		                "value":"test"
		            }
				],
                "createdAt": "2019-06-15T10:48:38.065Z",
                "updatedAt": "2019-06-15T10:48:38.065Z"
            }
        ],
        "count": 1
    }
}