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
  • A 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 of at least 4 days of deployment metrics collected.

 

  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