Figure: Optimizing Kubernetes Containers Processes
Figure: Optimizing Kubernetes Containers Processes

- Data Collection—Collect Kubernetes data into Densify.
You will need a Data Forwarder container for each Prometheus server you want to collect data from.
- Analysis—Analyze collected data based on pre-defined policies to make recommendations.
- From the Densify API: Authenticate using JWT—Retrieve token to authenticate each subsequent API call.
- API: List All Kubernetes Container Analyses—Query for the analysis entity of each cluster for which Kubernetes container data was collected.
- API: Download Results for Action—Retrieve recommendations for actioning or forward to orchestration engine. Alternatively, you can Add a Webhook to an Existing Kubernetes Container Analysis to push recommendations to an external URI once the next analysis process completes.
- Console (optional alternative): Review the Kubernetes Container Optimization report from the Densify Console. See Optimizing Your Containers for details.
Postman Collection
Densify provides a Postman collection of sample API requests for working with your public cloud environments. See the Postman Collection.Authenticate using JWT
Use the/authorize
resource to retrieve an authenticated token to make subsequent API calls. See Authorize for details. By default, the token expires in 5 minutes, therefore you will need to ensure that you have an active token for each Densify API request.
Example: Retrieving an Authenticated Token
Example: Retrieving an Authenticated Token
Request:Response:Use the
POST /authorize
apiToken
value in your Authorization request header for subsequent Densify API calls.List All Kubernetes Container Analyses
To see a list of all Kubernetes analyses currently in Densify, use the/analysis/containers/kubernetes
resource. See List all analyses for a particular platform and vendor for details of the resource operation.
Example: List all Saved Kubernetes Container Analyses
Example: List all Saved Kubernetes Container Analyses
Request:Response:
Poll for Analysis Status
Use the"analysisStatus"
resource element from the List All Kubernetes Container Analyses response to poll for status of the data collection and analysis. See Check for analysis status for details of the resource operation. The analysis is complete and recommendations are available when "analysisStage": "Completed"
.
Example: Checking Kubernetes Analysis Status
Example: Checking Kubernetes Analysis Status
Request:Response:
Add a Webhook to an Existing Kubernetes Container Analysis
You can add a webhook definition to an existing Kubernetes container analysis. The analysis will push the optimized results to the specified webhook URI. See Analysis: Webhook for details on managing webhooks.Example: Adding a Webhook Definition to an Existing Kubernetes Container Analysis
Example: Adding a Webhook Definition to an Existing Kubernetes Container Analysis
Request:Response:
Download Results for Action
Use the/analysis/containers/kubernetes/<analysisId>/results
resource to retrieve recommendation results and forward to orchestration engine. See Analysis: Kubernetes Container Recommendations for details.
Example: Returning Kubernetes Container Recommendations in Terraform-map
Example: Returning Kubernetes Container Recommendations in Terraform-map
Request:Headers: