Vks Nodegroup
Published by vngcloud in vks-skills
What this skill does
Use when the user wants to change the worker capacity of an EXISTING VKS (VNG Kubernetes Service) cluster: add a node group, scale a node group up/down, change its size/labels/taints, delete a node group, or upgrade a node group's Kubernetes version. Trigger phrases: add a node group, create node pool, scale my nodes, add more nodes, change node count, resize node group, delete node group, upgrade node group version, thêm node, scale node. Creating a node group uses the same guided flow as clust
Add Vks Nodegroup to your agent
Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.
Install with a prompt
Paste this into a compatible coding agent:
add this skill "vks-nodegroup" from https://github.com/vngcloud/vks-skillsInstall with the CLI
Run this command in a controlled environment after reviewing the repository:
npx skills add https://github.com/vngcloud/vks-skills --skill vks-nodegroupSkill instructions
Manage VKS Node Groups
Overview
Add and operate node groups on an existing cluster. Creating a node group uses the same Hybrid guided flow as cluster creation (discover → default → plan → confirm). Scale / update / delete / upgrade each present a clear plan and require one explicit confirmation.
REQUIRED BACKGROUND: For node-group creation, read ../vks/references/resource-defaults.md — same discovery tools, default-picking, flavor-by-need, and name rules as cluster creation.
Prerequisites
- VKS MCP server running with
--allow-write(all operations here are writes). If an operation fails as read-only, tell the user to restart it with--allow-write. - The target cluster and node group — resolve names → ids per "Resolving a cluster / node group by name" in
../vks/references/resource-defaults.md(handle no-match / multiple-match; if the user says a generic word like "workers" and there are several node groups, list them and ask).
Tools
| Operation | Tool |
|---|---|
| Create node group | nodegroup_create (after cluster_versions_list + discovery) |
| Scale / change size, labels, taints, autoscale | nodegroup_update |
| Upgrade k8s version of a node group | nodegroup_upgrade_version |
| Preview a deletion | nodegroup_delete_dryrun |
| Delete node group | nodegroup_delete |
| Inspect current state (before changing) | nodegroup_list, nodegroup_get, nodegroup_list_nodes |
Create a node group (Hybrid)
- Resolve the target cluster (by name → id via
cluster_listif needed). Inherit the cluster's image type and SSH key where sensible. - Get the node-group name (5–15 chars; propose a fix if invalid).
- Discover + default per the reference:
flavor_list(default small, or byneedif the user wants to choose),secgroup_list,sshkey_list; disk SSD/100GB;osubuntu;numNodes1 (or 3 if prod/HA). - Present ONE plan table marking
[auto]vs[you chose]. - HARD GATE (below), then
nodegroup_create. - Poll
nodegroup_getuntil ACTIVE; report progress.
Scale / update
- Show current state first (
nodegroup_get) so the change is concrete ("currently 2 nodes → 5"). - Build the partial
nodegroup_updatebody with only the changed fields (e.g.{"numNodes": 5}) — see "Node-group update body" in the reference for writable fields, the autoscaler caveat, and the scale-down (node drain) warning. Present the before→after. - HARD GATE, then
nodegroup_update. Pollnodegroup_getto ACTIVE per the reference's waiting policy if the change provisions nodes.
Upgrade version
cluster_versions_listto show valid targets; confirm the target version.- HARD GATE, then
nodegroup_upgrade_version.
Delete (extra caution)
- Always run
nodegroup_delete_dryrunfirst and show the user exactly what will be removed (name, id, node count). - HARD GATE with an explicit destructive warning — state that deletion is irreversible and removes all nodes in the group.
- Only on explicit confirmation, call
nodegroup_delete.
HARD GATE — confirm before any operation
Tell the user exactly what will change and wait for an explicit confirmation keyword: yes, confirm, ok, approve, proceed, go ahead, do it, lgtm, or equivalent. ANY other response (a parameter change, a question, ambiguous text) is adjustment input — update and re-present. NEVER treat a non-confirmation response as approval. For deletes, require the confirmation after showing the dry-run.
Common mistakes
- Scaling/deleting without first showing current state — the user can't judge the change.
- Deleting without
nodegroup_delete_dryrunand a destructive warning. - Asking for raw flavor/sshkey/secgroup IDs instead of resolving via discovery tools.
- Reporting success at the API call when the node group is still provisioning — poll
nodegroup_getto ACTIVE.
Files included
- SKILL.md

