---
title: "Create Cluster"
method: POST
path: "/ocean/insights/k8s/cluster"
tags: ["Ocean Insights"]
---

# Create Cluster

`POST /ocean/insights/k8s/cluster`

Creates an Ocean Insight entity according to a given specification.

Prerequisite:

The Ocean Controller is used to monitor the cluster resources and report back to Ocean. The Ocean Controller is required for Ocean Insights.<br />

To install the Ocean Controller, complete and run the following script on a machine with the kubectl command line tool installed and configured:

```
#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
bash
```

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `cluster` object, required
    - `id` string — Ocean Insight Cluster ID.
    - `name` string, required — Add a name for the Ocean Insight cluster.
    - `controllerClusterId` string, required — The reporting identifier for the Ocean Controller.
    - `createdAt` string, date-time — A timestamp of the Ocean insight creation.
    - `updatedAt` string, date-time — A timestamp of the latest Ocean insight update.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
