> ## Documentation Index
> Fetch the complete documentation index at: https://densify-sync-changelog-2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List container recommendations for a cluster

> Returns recommendation details for container manifests in the specified cluster.
When `details=true`, additional fields are included. Fields with no value may be omitted from the response.




## OpenAPI

````yaml /openapi/kubernetes/kubernetes_clusters_results.yaml GET /kubernetes/clusters/{clusterName}/containers
openapi: 3.0.3
info:
  title: Kubex API – Kubernetes Clusters Results
  version: 1.0.0
  description: |
    Container right-sizing recommendations at the cluster level.
    Returns all analyzed containers in the specified cluster.
servers:
  - url: https://{host}/api/v2
    variables:
      host:
        default: api.example.com
        description: Replace with your Kubex API host
security: []
tags:
  - name: Kubernetes Cluster Results
    description: Container recommendations for a given cluster
paths:
  /kubernetes/clusters/{clusterName}/containers:
    get:
      tags:
        - Kubernetes Cluster Results
      summary: List container recommendations for a cluster
      description: >
        Returns recommendation details for container manifests in the specified
        cluster.

        When `details=true`, additional fields are included. Fields with no
        value may be omitted from the response.
      operationId: getKubernetesClusterContainers
      parameters:
        - $ref: '#/components/parameters/k8s_clusterName'
        - $ref: '#/components/parameters/details'
      responses:
        '200':
          description: Array of container recommendations
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/ContainerRecommendation'
                    - $ref: '#/components/schemas/ContainerRecommendationDetailed'
                  description: >-
                    Returns ContainerRecommendation by default, or
                    ContainerRecommendationDetailed when details=true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    k8s_clusterName:
      name: clusterName
      in: path
      required: true
      description: >-
        Unique cluster name from `/kubernetes/clusters` or the Kubex UI
        Connections tab.
      schema:
        type: string
    details:
      name: details
      in: query
      required: false
      description: >-
        Include additional fields (`predictedUptime`, `configLastChangedOn`,
        `nodeGroup`, `oomKills_last7days`, `dateFirstAudited`,
        `dateLastAudited`).
      schema:
        type: boolean
        default: false
  schemas:
    ContainerRecommendation:
      type: object
      description: >-
        Container recommendation entry (base fields). Fields without values may
        be omitted.
      properties:
        cluster:
          type: string
          description: Cluster name as specified in the config.yaml files.
        namespace:
          type: string
          description: Namespace associated with the container.
        podOwnerName:
          type: string
          description: Name of the controller or pod owning the container.
        podOwnerKind:
          type: string
          description: >-
            Controller type (e.g., DaemonSet, Deployment, ReplicaSet,
            ReplicationController, StatefulSet).
        container:
          type: string
          description: Container manifest name.
        entityId:
          type: string
          description: Unique identifier for the selected cluster assigned by Kubex.
        containerId:
          type: string
          description: Unique identifier for the listed container.
        avgContainerCount:
          type: integer
          description: Average number of containers from the "In Service Instances" metric.
        currentCpuRequestmCores:
          type: integer
          description: Current CPU request (mCores).
        currentCpuLimitmCores:
          type: integer
          description: Current CPU limit (mCores).
        currentMemRequestBytes:
          type: integer
          description: Current memory request (bytes).
        currentMemLimitBytes:
          type: integer
          description: Current memory limit (bytes).
        recommendedCpuRequestmCores:
          type: integer
          description: Recommended CPU request (mCores).
        recommendedCpuLimitmCores:
          type: integer
          description: Recommended CPU limit (mCores).
        recommendedMemRequestBytes:
          type: integer
          description: Recommended memory request (bytes).
        recommendedMemLimitBytes:
          type: integer
          description: Recommended memory limit (bytes).
        estimatedSavingsPerContainer:
          type: number
          format: float
          description: Estimated savings per container when applying the recommendations.
        analyzedOn:
          type: string
          format: date-time
          description: Most recent analysis refresh (UTC, `YYYY-MM-DDTHH:mm:ssZ`).
        hpaMetricName:
          type: string
          description: HPA metric name (e.g., cpu, memory).
        hpaMetricThreshold:
          type: string
          description: HPA metric threshold (e.g., 75%).
        currentEphemeralStorageRequestBytes:
          type: number
          description: Current ephemeral storage request (bytes).
        currentEphemeralStorageLimitBytes:
          type: number
          description: Current ephemeral storage limit (bytes).
        recommendedEphemeralStorageRequestBytes:
          type: number
          description: Recommended ephemeral storage request (bytes).
        recommendedEphemeralStorageLimitBytes:
          type: number
          description: Recommended ephemeral storage limit (bytes).
        gpu:
          type: object
          description: GPU-related recommendations and metrics (present for GPU workloads).
          properties:
            currentGpuModel:
              type: string
              description: Current GPU model.
            currentGpuSharingStrategy:
              type: string
              description: >-
                Current GPU sharing strategy (e.g., kai-scheduler,
                time-slicing).
            currentGpuRequest:
              type: number
              format: float
              description: Current GPU request (fractional GPU units).
            gpuComputeOptimal:
              type: number
              format: float
              description: Optimal GPU compute utilization.
            gpuMemoryOptimalBytes:
              type: number
              description: Optimal GPU memory usage (bytes).
            gpuOverallOptimal:
              type: number
              format: float
              description: Overall optimal GPU utilization.
            recommendedGpuModel:
              type: string
              description: Recommended GPU model.
            recommendedGpuSharingStrategy:
              type: string
              description: Recommended GPU sharing strategy.
            recommendedGpuRequest:
              type: number
              format: float
              description: Recommended GPU request (fractional GPU units).
    ContainerRecommendationDetailed:
      allOf:
        - $ref: '#/components/schemas/ContainerRecommendation'
        - type: object
          description: >-
            Container recommendation entry with additional detail fields
            (returned when details=true).
          properties:
            predictedUptime:
              type: number
              format: float
              description: Predicted uptime percentage for the container.
            configLastChangedOn:
              type: string
              format: date-time
              description: Timestamp of the most recent change to requests/limits.
            nodeGroup:
              type: array
              items:
                type: string
              description: Names of associated node groups.
            oomKills_last7days:
              type: integer
              description: Number of OOM events in the last 7 days.
            dateFirstAudited:
              type: string
              format: date-time
              description: When this container was first audited (from workload history).
            dateLastAudited:
              type: string
              format: date-time
              description: When this container was last audited (from workload history).
    Error:
      type: object
      properties:
        status:
          type: integer
        message:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````