> For the complete documentation index, see [llms.txt](https://docs.akamas.io/quick-guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akamas.io/quick-guides/quick-guides-akamas-in-a-sandbox/aias-03-guide-create-a-study-to-optimize-k8s-microservices-costs-using-the-akamas-cli.md).

# \[AIAS-03] Guide: Create a study to optimize K8s microservices costs using the Akamas CLI

This guide describes how to optimize the cost efficiency of a Kubernetes microservice application.

The target application is Online Boutique, a popular app developed by Google for demo purposes. Online Boutique runs on a minimal Kubernetes cluster within the Akamas sandbox environment so you don't need to install anything on your side.

You will use the Akamas CLI to create this study, to familiarize with Akamas Optimization-as-Code approach.

All the configuration files and scripts referenced in this guide can be downloaded from Akamas' [public GitHub repository](https://github.com/akamaslabs/kubernetes-online-boutique).

To start, clone the repository.

```bash
git clone https://github.com/akamaslabs/kubernetes-online-boutique.git
```

#### What you will learn <a href="#user-content-what-you-will-learn" id="user-content-what-you-will-learn"></a>

* How to use the Akamas CLI to create an Optimization Study and all its supporting artifacts
* How to model the Online Boutique application (which is available in the environment)
* How to configure Prometheus to let Akamas collect Kubernetes performance metrics
* How to optimize a Kubernetes application using Akamas

#### What you will need <a href="#user-content-what-you-will-need" id="user-content-what-you-will-need"></a>

* Access to the Akamas-In-A-Sandbox (AIAS) environment with valid credentials.
* Install the [Akamas CLI](https://docs.akamas.io/akamas-docs/installing-akamas/install-the-akamas-cli) and use your free trial instance URL as API address as follows: `https://<your-free-trial-sandbox-address>:8443`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akamas.io/quick-guides/quick-guides-akamas-in-a-sandbox/aias-03-guide-create-a-study-to-optimize-k8s-microservices-costs-using-the-akamas-cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
