---
title: "Import GKE Cluster To Ocean"
method: POST
path: "/ocean/gcp/k8s/cluster/gke/import"
tags: ["Ocean GKE"]
---

# Import GKE Cluster To Ocean

`POST /ocean/gcp/k8s/cluster/gke/import`

## Request

- Base URL: `https://api.spotinst.io`
- URL: `https://api.spotinst.io/ocean/gcp/k8s/cluster/gke/import`
- Auth: HTTP bearer

Returns an Ocean Cluster configuration, and optionally Virtual Node Group (VNG) configurations based on a given GKE Cluster and its Node Pools.\
The returned values ("Imported Cluster/VNGs") can then be used as inputs to the Create Cluster/VNG APIs in order to create the respectful resources.

## Query parameters

- `location` string, required
- `clusterName` string, required
- `nodePoolName` string
- `includeLaunchSpecs` boolean

## Parameters

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

## Request body

- object
  - `cluster` object, required: The specification of the Ocean cluster.
    - `name` string: Add a name for the Ocean cluster.
    - `controllerClusterId` string: Enter the Ocean cluster identifier.
    - `capacity` Capacity (unresolved $ref)
    - `instanceTypes` object: The type of instances that may or may not be a part of the Ocean cluster.
      - `whitelist` string[]: Instance types allowed in the Ocean cluster. Cannot be configured if a deny list is configured.
      - `blacklist` string[]: Instance types to avoid launching in the Ocean cluster. Cannot be configured if a permit list is configured.
    - `autoScaler` AutoScaler (unresolved $ref)
    - `availabilityZones` string[]: An array holding availability zones, this configures the availability zones the Ocean may launch instances in per VNG. Can be null.
    - `backendServices` object[]
      - `backendServiceName` string, required
      - `locationType` 'regional' | 'global'
      - `scheme` 'EXTERNAL' | 'INTERNAL': Required if locationType is set to "regional".
      - `namedPorts` object
        - `name` string, required
        - `ports` integer[], required

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/spot/apis/spot-by-flexera-api.md) - [All operations](https://skmtc.dev/spot/apis/spot-by-flexera-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spot/apis/spot-by-flexera-api/revisions/f7e206fa6474?raw)
