> 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-box/aiab-04-optimize-a-java-based-kubernetes-application-online-boutique.md).

# \[AIAB-04] Optimize a Java-based Kubernetes application (Online Boutique)

This guide will walk you through the steps of optimizing an application running on a Kubernetes cluster using Akamas.

You will optimize [Online Boutique](https://github.com/GoogleCloudPlatform/microservices-demo), a cloud-native microservices application implemented by Google as a demo application for Kubernetes. It is a web-based sample, yet a fully-fledged, e-commerce application.

<figure><img src="https://1455297369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWaLHgCJcLYwHY9VZwaxO%2Fuploads%2FPE82AyHAMzUplgPCsVlr%2Fhigh-architecture.png?alt=media&amp;token=a5e36dd4-7556-4cd8-8f36-0290354f7201" alt=""><figcaption></figcaption></figure>

#### What you will learn

* How to integrate your Kubernetes Cluster with Akamas
* How to model the Online Boutique application inside Akamas
* 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>

* Basic understanding of the concepts - you may want to watch a quick (2m) video included in this Welcome to Akamas guide and get yourself familiar with Akamas' key concepts by reading the Learn Akamas key concepts guide.
* An Akamas installation with a valid license - you may want to read the Akamas in-a-box guide to set up your Akamas instance.
* A working Kubernetes cluster - if you do not have such a cluster available, you can easily create a local one following the next sections of this guide.

You can find all the configuration files used in this guide on Akamas' [public GitHub repository](https://github.com/akamaslabs/kubernetes-online-boutique).

Please clone the repository in the home directory of the Akamas instance by running the command

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


---

# 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-box/aiab-04-optimize-a-java-based-kubernetes-application-online-boutique.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.
