fbpx

Introduction

In this tutorial we will introduce Ocean VPA suggestions and present how to use it. This feature will help you define better resource requirements (based on actual consumption) in order to avoid cluster over\under provisioning, increase the cluster’s efficiency.

Prerequisites

  • A Spotinst account
  • An AWS account
  • Metric Server installed in your Kubernetes cluster
  • Ocean cluster managing your Kubernetes worker nodes

Use VPA Guide

Step 1 – Monitoring deployment resource consumption

Ocean will collect usage metrics for all deployments in the cluster periodically, once every 5 minutes. Based on past 2 weeks of collected metrics, Ocean will calculate relevant consumption metric for each resource (CPU and Memory), and base its suggestions upon these calculated metrics.

 

VPA suggestions and the below mentioned graphs display data after at least 4 days of deployment metrics collection.

 

  1. Open your Ocean cluster console.
  2. Under Namespaces, click on the deployment you wish to review to find CPU Utilization and Memory Utilization charts.


Step 2 – Adjusting resource allocation according to actual consumption

 

Resource suggestions will be provided to help you adjust deployment requests to actual resource usage, per CPU and Memory.

Resource resize recommendations are triggered in case the requested resources are 15% above or below the Avg. metric during the last two weeks.

Navigate to the “Right Sizing” tab under your Ocean cluster.

Review the suggested resources offered for all your deployments.

To deep dive into a specific deployment and review resource suggestion, click on the requested deployment.

Modify your deployment resource requirements by running the following from the command line:

kubectl set resources MyDeployment --requests=cpu=XXX,memory=XXX

 

Right Sizing Notifications

In addition to the above content, the Right Sizing tab may display one of several notification messages, determined by the status of the Metrics Server reports and the Right Sizing service:

 

 

  1. Indicates that the Metrics Server pod is not yet installed on your cluster.
  2. Appears when the Metrics Server is installed, but the system has not received any reports.
  3. Indicates that the last report from the Metrics Server is more than 3 hours old.
  4. Metrics Server is installed and data is being collected by the Right Sizing service. The progress bar below reflects the amount of data left to collect before suggestions can be displayed.
  5. Data collection works as intended. There are no suggestions to make, or all previous suggestions have been applied/dismissed.
  6. Metrics Server is installed, but no data has been received yet. A temporary message that transitions into message #4 once data aggregation is in progress.