Skip to main content
GET
/
kubernetes
/
clusters
/
{clusterName}
/
containers
List container recommendations for a cluster
curl --request GET \
  --url https://{host}/api/v2/kubernetes/clusters/{clusterName}/containers \
  --header 'Authorization: Bearer <token>'
[
  {
    "cluster": "<string>",
    "namespace": "<string>",
    "podOwnerName": "<string>",
    "podOwnerKind": "<string>",
    "container": "<string>",
    "entityId": "<string>",
    "containerId": "<string>",
    "avgContainerCount": 123,
    "currentCpuRequestmCores": 123,
    "currentCpuLimitmCores": 123,
    "currentMemRequestBytes": 123,
    "currentMemLimitBytes": 123,
    "recommendedCpuRequestmCores": 123,
    "recommendedCpuLimitmCores": 123,
    "recommendedMemRequestBytes": 123,
    "recommendedMemLimitBytes": 123,
    "estimatedSavingsPerContainer": 123,
    "analyzedOn": "2023-11-07T05:31:56Z",
    "hpaMetricName": "<string>",
    "hpaMetricThreshold": "<string>",
    "currentEphemeralStorageRequestBytes": 123,
    "currentEphemeralStorageLimitBytes": 123,
    "recommendedEphemeralStorageRequestBytes": 123,
    "recommendedEphemeralStorageLimitBytes": 123,
    "gpu": {
      "currentGpuModel": "<string>",
      "currentGpuSharingStrategy": "<string>",
      "currentGpuRequest": 123,
      "gpuComputeOptimal": 123,
      "gpuMemoryOptimalBytes": 123,
      "gpuOverallOptimal": 123,
      "recommendedGpuModel": "<string>",
      "recommendedGpuSharingStrategy": "<string>",
      "recommendedGpuRequest": 123
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

clusterName
string
required

Unique cluster name from /kubernetes/clusters or the Kubex UI Connections tab.

Query Parameters

details
boolean
default:false

Include additional fields (predictedUptime, configLastChangedOn, nodeGroup, oomKills_last7days, dateFirstAudited, dateLastAudited).

Response

Array of container recommendations

Returns ContainerRecommendation by default, or ContainerRecommendationDetailed when details=true

cluster
string

Cluster name as specified in the config.yaml files.

namespace
string

Namespace associated with the container.

podOwnerName
string

Name of the controller or pod owning the container.

podOwnerKind
string

Controller type (e.g., DaemonSet, Deployment, ReplicaSet, ReplicationController, StatefulSet).

container
string

Container manifest name.

entityId
string

Unique identifier for the selected cluster assigned by Kubex.

containerId
string

Unique identifier for the listed container.

avgContainerCount
integer

Average number of containers from the "In Service Instances" metric.

currentCpuRequestmCores
integer

Current CPU request (mCores).

currentCpuLimitmCores
integer

Current CPU limit (mCores).

currentMemRequestBytes
integer

Current memory request (bytes).

currentMemLimitBytes
integer

Current memory limit (bytes).

Recommended CPU request (mCores).

Recommended CPU limit (mCores).

Recommended memory request (bytes).

Recommended memory limit (bytes).

estimatedSavingsPerContainer
number<float>

Estimated savings per container when applying the recommendations.

analyzedOn
string<date-time>

Most recent analysis refresh (UTC, YYYY-MM-DDTHH:mm:ssZ).

hpaMetricName
string

HPA metric name (e.g., cpu, memory).

hpaMetricThreshold
string

HPA metric threshold (e.g., 75%).

currentEphemeralStorageRequestBytes
number

Current ephemeral storage request (bytes).

currentEphemeralStorageLimitBytes
number

Current ephemeral storage limit (bytes).

Recommended ephemeral storage request (bytes).

Recommended ephemeral storage limit (bytes).

gpu
object

GPU-related recommendations and metrics (present for GPU workloads).