# 7. Autoscale

### 7.1. **Enable autoscale trong khi tạo cluster**

**Bước 1:** Thực hiện thoa tác tạo 1 k8s cluster. Sau khi nhập đầy đủ thông tin cho 1 cluster cần tạo > Click vào **Autoscale** ở mục **Worker Configuration** để enable tính năng autoscale.

![](/files/2glgu8zrQBGIpzTUYWhK)

**Bước 2:** Lựa chọn thông số **Scale Min** (số lượng node còn lại khi scale down xuống) và Scale max (số lượng node tối đa có thể scale up lên) > Click **Create cluster**.

![](/files/BZhYuzLFsZrl2gajS9Ls)

<mark style="color:red;">Lưu ý: Khi nhập số lượng cho scale max/min thì phải check xem còn đủ quota không, nếu nhập vượt quá quota cho phép, thì sẽ hiển thị thông báo quota không đủ như phía dưới:</mark>

![](/files/DjP1ToaDmeGbCiRvNbks)

<mark style="color:red;">Để khắc phục khác phục thì giảm lượng scale max/min xuống mức quota cho phép.</mark>

### 7.2. **Enable autoscale sau khi đã tạo xong 1 cluster**

**Bước 1:** Từ menu chọn **Kubernetes** > Chọn cluster muốn enable Autoscale.

![](/files/cvcrxBpY0JjRwmWzpo7N)

**Bước 2:** Từ mục **Worker Config** chọn vào mục **Autoscale** > Nhập thông số **Scale min** (số lượng tối thiểu khi scale down worker) và **Scale max** (số lượng tối đa khi Scale up worker) cho tính năng autoscale > Click **Autoscale** để enable tính năng.

![](/files/mzsj1ZokUTvjXf95QWtZ)

Sau khi click Autoscale thì status của cluster là Enable scaling. Quá trình Autoscale sẽ diễn ra tự động phù hợp với nhu cầu của bên người sử dụng.

### 7.3. Disable Autoscale

**Bước 1:** Từ Menu chọn **Kubernetes** > Chọn cluster muốn Disable Autoscale.

**Bước 2:** Trong mục **Worker Config** chọn **Autoscale**.

![](/files/iP07oFScN0gacsLBJhuQ)

**Bước 3:** Chọn Action **Disable Autoscale** > Click button **Disable** để ngừng tính năng Autoscale hoặc **Cancel** để hủy bỏ thao tác.

![](/files/9k6FrQy9CmZprUJfPAvM)

Sau khi disable thì status của cluster là Disable Scaling và quá trình Autoscale sẽ ngừng hoạt động.

### 7.4. Update Autoscale

**Bước 1:** Từ Menu chọn **Kubernetes** > Chọn cluster muốn Update Autoscale.

**Bước 2:** Trong mục **Worker Config** chọn **Autoscale** > Chọn Action **Update Autoscale** > Nhập thông số **Scale max** và **Scale min** worker nodes muốn điều chỉnh cho tính năng Autoscale > Chọn **Update** để thực hiện hoặc **Cancel** để hủy bỏ thao tác.

![](/files/s2u7sC0E0jE4HKJGn92g)

Sau khi update status của cluster là Update Scaling. Người dùng check lại số lượng Scale max và min worker nodes sau khi update lại.


---

# 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.fptcloud.com/kubenetes-engine/tutorials/7.-autoscale.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.
