Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Docs

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'

permissions:
pages: write
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install MkDocs
run: pip install mkdocs-material

- name: Build docs
run: mkdocs build

- name: Upload Pages artifact
uses: actions/upload-pages@v4
with:
path: site/

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

See [CHANGELOG.md](https://github.com/vngcloud/greennode-cli/blob/main/CHANGELOG.md) for the full release history.
179 changes: 179 additions & 0 deletions docs/commands/vks/create-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# create-cluster

## Description

Create a new VKS cluster with an initial default node group. The command provisions both the control plane and the first node group in a single call.

Cluster names must be 5–20 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character. Node group names follow the same pattern with a length of 5–15 characters.

When `--network-type` is `CALICO` or `CILIUM_OVERLAY`, the `--cidr` option is required. By default, both the load balancer plugin and the block store CSI plugin are enabled; use the `--no-*` flags to disable them.

Use `--dry-run` to validate all parameters without sending a create request.

## Synopsis

```
grn vks create-cluster
--name <value>
--k8s-version <value>
--network-type <value>
--vpc-id <value>
--subnet-id <value>
--node-group-name <value>
--flavor-id <value>
--image-id <value>
--disk-type <value>
--ssh-key-id <value>
[--cidr <value>]
[--description <value>]
[--enable-private-cluster]
[--release-channel <value>]
[--enabled-load-balancer-plugin]
[--no-load-balancer-plugin]
[--enabled-block-store-csi-plugin]
[--no-block-store-csi-plugin]
[--disk-size <value>]
[--num-nodes <value>]
[--enable-private-nodes]
[--security-groups <value>]
[--labels <value>]
[--taints <value>]
[--dry-run]
```

## Options

**Cluster settings**

`--name` (required)
: Cluster name. Must be 5–20 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.

`--k8s-version` (required)
: Kubernetes version for the cluster (e.g. `v1.29.1`).

`--network-type` (required)
: Network type for the cluster. Accepted values: `CALICO`, `CILIUM_OVERLAY`, `CILIUM_NATIVE_ROUTING`.

`--vpc-id` (required)
: VPC ID where the cluster will be provisioned.

`--subnet-id` (required)
: Subnet ID for the cluster control plane and the default node group.

`--cidr` (optional)
: Pod CIDR block. Required when `--network-type` is `CALICO` or `CILIUM_OVERLAY` (e.g. `10.96.0.0/12`).

`--description` (optional)
: Human-readable description for the cluster.

`--enable-private-cluster` (optional)
: Enable private cluster mode (control plane not accessible from the public internet).

`--release-channel` (optional)
: Release channel for automatic upgrades. Accepted values: `RAPID`, `STABLE`. Default: `STABLE`.

`--enabled-load-balancer-plugin` (optional)
: Explicitly enable the load balancer plugin (enabled by default).

`--no-load-balancer-plugin` (optional)
: Disable the load balancer plugin.

`--enabled-block-store-csi-plugin` (optional)
: Explicitly enable the block store CSI plugin (enabled by default).

`--no-block-store-csi-plugin` (optional)
: Disable the block store CSI plugin.

**Node group settings**

`--node-group-name` (required)
: Name of the initial node group. Must be 5–15 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.

`--flavor-id` (required)
: Flavor (instance type) ID for the nodes.

`--image-id` (required)
: OS image ID for the nodes.

`--disk-type` (required)
: Disk type ID for the node boot volumes.

`--ssh-key-id` (required)
: SSH key pair ID to inject into each node.

`--disk-size` (optional)
: Boot disk size in GiB. Accepted range: 20–5000. Default: `100`.

`--num-nodes` (optional)
: Number of nodes to create in the default node group. Accepted range: 0–10. Default: `1`.

`--enable-private-nodes` (optional)
: Enable private nodes (nodes will not have public IP addresses).

`--security-groups` (optional)
: Comma-separated list of security group IDs to attach to the nodes (e.g. `sg-aaa111,sg-bbb222`).

`--labels` (optional)
: Comma-separated `key=value` pairs to add as Kubernetes node labels (e.g. `env=prod,tier=app`).

`--taints` (optional)
: Comma-separated node taints in `key=value:effect` format (e.g. `dedicated=gpu:NoSchedule`).

`--dry-run` (optional)
: Validate all parameters and print a report without sending the create request.

## Examples

Create a minimal cluster with CILIUM_NATIVE_ROUTING:

```bash
grn vks create-cluster \
--name my-cluster \
--k8s-version v1.29.1 \
--network-type CILIUM_NATIVE_ROUTING \
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
--node-group-name default-ng \
--flavor-id flv-2c4g \
--image-id img-ubuntu-22-04-k8s \
--disk-type SSD \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001
```

Create a cluster with CALICO network type (CIDR required):

```bash
grn vks create-cluster \
--name prod-cluster \
--k8s-version v1.29.1 \
--network-type CALICO \
--cidr 10.96.0.0/12 \
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
--node-group-name prod-ng \
--flavor-id flv-4c8g \
--image-id img-ubuntu-22-04-k8s \
--disk-type SSD \
--disk-size 200 \
--num-nodes 3 \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
--labels env=prod,tier=app \
--taints dedicated=gpu:NoSchedule
```

Validate parameters without creating (dry run):

```bash
grn vks create-cluster \
--name my-cluster \
--k8s-version v1.29.1 \
--network-type CILIUM_NATIVE_ROUTING \
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
--node-group-name default-ng \
--flavor-id flv-2c4g \
--image-id img-ubuntu-22-04-k8s \
--disk-type SSD \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
--dry-run
```
119 changes: 119 additions & 0 deletions docs/commands/vks/create-nodegroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# create-nodegroup

## Description

Create a new node group within an existing VKS cluster. Node group names must be 5–15 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.

Use `--dry-run` to validate parameters (name format, disk size range, node count range) without sending a create request.

## Synopsis

```
grn vks create-nodegroup
--cluster-id <value>
--name <value>
--image-id <value>
--flavor-id <value>
--disk-type <value>
--ssh-key-id <value>
[--enable-private-nodes]
[--num-nodes <value>]
[--disk-size <value>]
[--security-groups <value>]
[--subnet-id <value>]
[--labels <value>]
[--taints <value>]
[--enable-encryption-volume]
[--dry-run]
```

## Options

`--cluster-id` (required)
: ID of the cluster to add the node group to.

`--name` (required)
: Node group name. Must be 5–15 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.

`--image-id` (required)
: OS image ID for the nodes.

`--flavor-id` (required)
: Flavor (instance type) ID for the nodes.

`--disk-type` (required)
: Disk type ID for the node boot volumes.

`--ssh-key-id` (required)
: SSH key pair ID to inject into each node.

`--enable-private-nodes` (optional)
: Enable private nodes (nodes will not have public IP addresses).

`--num-nodes` (optional)
: Number of nodes to create. Accepted range: 0–10. Default: `1`.

`--disk-size` (optional)
: Boot disk size in GiB. Accepted range: 20–5000. Default: `100`.

`--security-groups` (optional)
: Comma-separated list of security group IDs to attach to the nodes (e.g. `sg-aaa111,sg-bbb222`).

`--subnet-id` (optional)
: Subnet ID for the node group. Uses the cluster subnet when not specified.

`--labels` (optional)
: Comma-separated `key=value` pairs to add as Kubernetes node labels (e.g. `env=prod,tier=app`).

`--taints` (optional)
: Comma-separated node taints in `key=value:effect` format (e.g. `dedicated=gpu:NoSchedule`).

`--enable-encryption-volume` (optional)
: Enable encryption for the node boot volumes.

`--dry-run` (optional)
: Validate parameters and print a report without sending the create request.

## Examples

Create a basic node group:

```bash
grn vks create-nodegroup \
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
--name worker-ng \
--image-id img-ubuntu-22-04-k8s \
--flavor-id flv-4c8g \
--disk-type SSD \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001
```

Create a GPU node group with taints and labels:

```bash
grn vks create-nodegroup \
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
--name gpu-ng \
--image-id img-ubuntu-22-04-k8s-gpu \
--flavor-id flv-8c32g-gpu \
--disk-type SSD \
--disk-size 200 \
--num-nodes 2 \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
--labels accelerator=nvidia,tier=gpu \
--taints dedicated=gpu:NoSchedule \
--enable-encryption-volume
```

Validate parameters without creating:

```bash
grn vks create-nodegroup \
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
--name worker-ng \
--image-id img-ubuntu-22-04-k8s \
--flavor-id flv-4c8g \
--disk-type SSD \
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
--dry-run
```
Loading
Loading