Analysis: Kubernetes Container Recommendations

Analysis: Kubernetes Container Recommendations

#340570

Description

The /analysis/containers/kubernetes/<analysisId>/results resource is used to return a collection of recommendations after optimization analysis has been performed on your Kubernetes container data in Densify.

To return a collection of all the Kubernetes containers included in the optimization analysis, see Analysis: Kubernetes Container Systems. The set of analyzed containers may be more than the set of container recommendations due to the possibility of no recommendations for some analyzed containers.

Resource

/analysis/containers/kubernetes/<analysisId>/results

Supported Operations

Table: Kubernetes Container Recommendations Supported Operations

HTTP Method

Input

Output

Description

GET /analysis/containers/kubernetes/<analysisId>/results

Path Parameter:

Query String Parameter Options:

Accept:

  • application/json

Collection of (JSON):

Returns a collection of recommendations for a Kubernetes container analysis.

Specify application/json in the request header for returned recommendations in JSON format.

Note: The returned recommendations can be in either JSON or Terraform-map format.

Example: Returning Kubernetes Container Recommendations

GET /analysis/containers/kubernetes/<analysisId>/results

Path Parameter:

Query String Parameter Options:

Accept:

  • application/terraform-map

Collection of (Terraform-map):

Returns a collection of recommendations for a Kubernetes container analysis. Specify application/terraform-map in the request header for Terraform-map output.

Note: The returned recommendations can be in either JSON or Terraform-map format.

Example: Returning Kubernetes Container Recommendations in Terraform-map Form

Parameters

Path Parameters

Table: Kubernetes Container Recommendations Path Parameters

Parameter Name

Type

Description

analysisId

string

The unique referenced ID of the Kubernetes analysis.

Query String Parameters

Table: Kubernetes Container Recommendations Query String Parameters

Parameter Name

Type

Description

Element Filters

string

You can use element filters to return a targeted subset of the recommendations. See the "F" (filter) designation in the Response schema table for a list of elements that support filtering. Refer to Filters for a complete description of this common operation feature.

Usage example:

../results?recommendationType=Resize

dataQuality

string

Allows you to indicate which workload type data collection detail to return for the system. See dataQuality for the returned details.

Specify a quoted list of workload type names for which data to be returned, separated by commas. The supported workload type names can be found in the Data Center Explorer (DCE) from the Analysis Console. See DCE Virtual Environment Workload Viewer to find a list of the supported workload types from the Analysis Console.

Usage example:

../results?dataQuality="CPU Utilization (CINT2006 Rate),Memory Utilization in Percent"

Note: A "400-Bad Request" error message is returned if a non-supported workload type is specified.

Response

Table: Kubernetes Container Recommendations Response Schema

Element

Type

Filter/Sort

Description

container

string

F

The container name.

cluster

string

F

The container's cluster name.

hostName

string

 

The Densify internal reference used to ensure that containers are uniquely identified across multiple clusters, even if they potentially have the same namespace, pod and/or container names.

predictedUptime

percentage

 

The predicted uptime (%) for the container is based on the percentage of hours that CPU utilization data is present in the historical interval specified in the policy settings.

displayName

string

F

The display name is a combination of the pod and container name.

recommLastSeen

Unix time
(in milliseconds)

 

The latest date and time that the following set of recommendations were provided by Densify(Unix Epoch time, in milliseconds):

Note: If any recommendation value was updated, then Densify would considered that as a new set of recommendations and the recommLastSeen value would not be updated.

podService

string

F

The pod or service name for the container.

auditInfo

  • dataCollection:
    • dateFirstAudited
    • dateLastAudited
    • auditCount
  • workloadDataLast30:
    • firstDate
    • lastDate
    • totalDays
    • seenDays

 

The following system data collection details are returned:

  • dateFirstAudited—the first time data was collected for this container (Unix epoch time, in milliseconds);
  • dateLastAudited—the most recent data collection time (Unix epoch time, in milliseconds);
  • auditCount—the number of times that data was collected.

The following container workload collection details, for the last 30 days, are returned:

  • firstDate—the first time workload data was collected for this container (Unix epoch time, in milliseconds);
  • lastDate—the most recent workload data collection time for this container (Unix epoch time, in milliseconds);
  • totalDays—the difference in days between firstDate and lastDate;
  • seenDays—the number of days that at least one workload data was added into Densify for this container.

Note: If no workload data is collected for the container in the last 30 days, then the workloadDataLast30 element block is not returned.

Note: The values in auditInfo are updated once a day (after the data collection and RDB populate processes are complete).

recommendedCpuLimit

float

 

The recommended CPU limit for the container after Densify optimization analysis.

currentCount

int

 

The number of copies running in the Controller.

This value comes form the container data collection. If size of the Controller is not found, then this value is set to 1.

recommSeenCount

integer

 

The number of times Densify recommended the same values for the following elements:

This is the count of Densify analysis processes which produced the same recommendation values from recommFirstSeen to recommLastSeen. This value is updated when the RDB populate task (i.e. the reporting database update process) is executed.

Note:  In typical production environments, where the RDB populate task is scheduled to run once daily post data collection and analysis, the recommSeenCount value will reflect exactly the number of times the same recommendations were provided after data collection and analysis. If your environment executes the RDB populate task more than once daily, the recommSeenCount value will be inflated beyond the actual number of times the analysis produced the same recommendations. Contact support@Densify.com if you have concerns about the recommSeenCount value.

currentMemLimit

float

 

The current memory limit configured for the container.

recommendedMemLimit

float

 

The recommended memory limit for the container after Densify optimization analysis.

recommendationType

string

F

The recommended action for this container:

  • "Just Right"—this container manifest is optimally configured for the workload;
  • "Upsize"—increase one or more of CPU Request, CPU Limit, Memory Request, or Memory Limit settings;
  • "Downsize"—decrease one or more of CPU Request, CPU Limit, Memory Request, or Memory Limit settings;
  • "Resize"— resize at least two of CPU Request, CPU Limit, Memory Request, or Memory Limit settings (i.e. at least one recommendation is a size increase and the other one is a size decrease);
  • "Resize from Unspecified"—resize recommendations for this container manifest are made without current CPU Request, CPU Limit, Memory Request, or Memory Limit values;
  • "Not Analyzed"— there is insufficient data to recommend CPU Request, CPU Limit, Memory Request, or Memory Limit values.

Containers with insufficient information for analysis do not have recommendations and are returned with limited elements. See Example: Returning Kubernetes Containers with No Recommendations.

recommendedCpuRequest

float

 

The recommended CPU request for the container after Densify optimization analysis.

recommFirstSeen

Unix time
(in milliseconds)

 

The first date and time that the following set of recommendations were provided by Densify (Unix Epoch time, in milliseconds):

Note: If any recommendation value (above) is different than the previous set of recommFirstSeen recommendation values, then Densify would considered that as a new set of recommendations and the recommFirstSeen value would be updated.

controllerType

string

 

The type of controller (i.e. "ReplicatSet", "ReplicationController", "DaemonSet", "StatefulSet", "Deployment", "Job", etc.).

currentMemRequest

float

 

The current memory request configured for the container.

entityId

string

 

The Densify assigned entity ID of the container system.

currentCpuLimit

float

 

The current CPU limit configured for the container.

dataQuality

array of:

  • workloadName
  • firstSeen
  • lastSeen
  • completeDays
  • partialDays

 

The dataQuality array provides workload type data collection details for the system:

  • workloadName—the workload type name (see DCE Virtual Environment Workload Viewer to find a list of the supported workload types from the Analysis Console);
  • firstSeen—the first time this workload was collected (Unix Epoch time, in milliseconds);
  • lastSeen—the most recent time this workload was collected (Unix Epoch time, in milliseconds);
  • completeDays—the number of complete days that this workload data was collected;
  • partialDays—the number of partial days that this workload data was collected.

Note: The dataQuality array is only returned when the dataQuality query string is specified in the request. In addition, if you specify a workload type in the request, for which system workload data does not exist in Densify, then no data is returned.

Note: The values in the dataQuality array are updated after data collection and subsequent updates to the reporting tables (i.e. RDB Populate process) are completed.

recommendedMemRequest

float

 

The recommended memory request for the container after Densify optimization analysis.

currentCpuRequest

float

 

The current CPU request configured for the container.

namespace

string

F

The container's namespace.

Examples

Example: Returning Kubernetes Container Recommendations

The following example shows you how to return a collection of Kubernetes Container recommendations in JSON format.

Example: Returning Kubernetes Container Recommendations in Terraform-map Form

The following example shows you how to return a collection of recommendations in terraform-map format.

Example: Returning Kubernetes Containers with No Recommendations

The following example shows you how to return a collection of Kubernetes containers without recommendations. These containers typically do not have adequate data for optimization analysis and have the "Not Analyzed" designation in the recommendationType element.