# Optimize Kubernetes Deployments for Compute Resources and Storage Volumes

You can optimize the compute resources, such as CPU and RAM, along with storage volumes in Kubernetes through strategic usage of zones.To enhance the performance of your Kubernetes environment, consider implementing a strategic approach for resource allocation. You can intelligently distribute workloads across different zones to improve performance and enhance fault tolerance and resilience.

## Example

Define a storage class named `ionos-enterprise-ssd-zone-1`, which specifies the provisioning of SSD-type storage with `ext4` file system format, located in availability zone `ZONE_2`. Configure the `volumeBindingMode` and `allowVolumeExpansion` fields.

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.kubernetes.io/is-default-class: "false"
  name: ionos-enterprise-ssd-zone-1
provisioner: cloud.ionos.com
parameters:
  type: SSD
  fstype: ext4
  availabilityZone: ZONE_2
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
```

{% hint style="info" %}
**Note**: Supported values for `fstype` are `ext2`, `ext3` or `ext4`.
{% endhint %}

This implementation provides a robust and reliable Kubernetes infrastructure for your applications.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/containers/managed-kubernetes/use-cases/optimize-kubernetes-deployments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
