> For the complete documentation index, see [llms.txt](https://docs.readyidc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.readyidc.com/readme/kubenetes-cluster/managing-kubernetes-worker-group.md).

# Managing Kubernetes worker group

#### ข้อจำกัด

* worker group สามารถใช้งานได้บน kubernetes cluser เวอร์ชั่น 1.15.x ขึ้นไป
* ค่าปกติของ worker group บน kubernetes cluster ไม่สามารถลบหรือแทนที่ได้เพราะเป็นส่วนของ cluster
* kubernetes เวอร์ชั่น 1.21.x และก่อนหน้า ไม่สามารถทำ scaling จาก 0 ได้

### การเพิ่ม worker group

1. ไปที่หน้า **Kubernetes** **clusters** กดที่ Kubernetes cluster
2. ในหน้าของ cluster ไปที่แท็บ **Groups**
3. ในส่วนของ **Workers** กด Add
4. ในส่วนของ **Worker group** ระบุชื่อของ group
5. ในส่วนของ **Worker group** เลือก flavor ของแต่ละ worker ส่วนนี้สามารถเลือก automatic scaling ของ worker group ได้
6. ในส่วนของ **Labels** กำหนดตัวแปรเพิ่มเติม เช่น selinux\_mode=permissive
7. กด **Create**<br>

   <figure><img src="/files/EbBdfqL9rRlDYIcoAdC3" alt="" width="560"><figcaption></figcaption></figure>

### แก้ไขจำนวนของ worker ใน group

1. ไปที่หน้า **Kubernetes** **clusters** กดที่ Kubernetes cluster
2. ในหน้าของ cluster ไปที่แท็บ **Groups**
3. ในส่วนของ **Workers** กดที่ไอคอนรูปดินสอ สำหรับแก้ไข default worker group หรือ กดที่ : สำหรับแก้ไข group ทั้งหมด แล้วเลือก **Edit**
4. กด **Save**

### วิธีลบ worker group

* กดเลือก worker group ที่ต้องการ และกด **Delete**

### วิธีย้าย worker group

1. เปิดการใช้งาน **autoscaling** และตั้งค่าจำนวนต่ำสุดของ node
   * กดแทบขวาที่ **Kubernetes** **cluster** และกดที่แท็บ **Groups**
   * ในส่วนของ **Worker** กดที่ไอคอนรูปดินสอ สำหรับแก้ไข default worker group หรือ กดที่ : สำหรับแก้ไข group ทั้งหมด แล้วเลือก **Edit**
   * กด **Save**
2. ป้องกัน **workload** สร้างใหม่ เมื่อมี schedule บน default worker node

```
kubectl cordon <node-name>
```

3. กระจาย **workload** ที่มีอยู่แล้วบน default worker node

```
kubectl drain <node-name> --ignore-daemonsets --delete-local-data --force
```

4. รอ autoscaling ทำการย้าย node ใช้เวลาประมาณ 10 นาที


---

# 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 dynamically by asking a question.

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

```
GET https://docs.readyidc.com/readme/kubenetes-cluster/managing-kubernetes-worker-group.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
