Skip to main content
GET
/
kubernetes
/
clusters
/
{clusterName}
/
containers
List container recommendations for a cluster
curl --request GET \
  --url https://api.example.com/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",
    "predictedUptime": 123,
    "configLastChangedOn": "2023-11-07T05:31:56Z",
    "nodeGroup": [
      "<string>"
    ],
    "oomKills_last7days": 123,
    "dateFirstAudited": "2023-11-07T05:31:56Z",
    "dateLastAudited": "2023-11-07T05:31:56Z"
  }
]

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

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 Densify.

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

Estimated savings per container when applying the recommendations.

analyzedOn
string<date-time>

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

predictedUptime
number

Predicted uptime percentage for the container.

configLastChangedOn
string<date-time>

Timestamp of the most recent change to requests/limits.

nodeGroup
string[]

Names of associated node groups.

oomKills_last7days
integer

Number of OOM events in the last 7 days.

dateFirstAudited
string<date-time>

When this container was first audited (from workload history).

dateLastAudited
string<date-time>

When this container was last audited (from workload history).