Skip to content

Commit 1256d04

Browse files
authored
feat: add MkDocs documentation site with GitHub Pages (#4)
2 parents 3d3e3aa + 508f928 commit 1256d04

25 files changed

Lines changed: 1576 additions & 0 deletions

.github/workflows/deploy-docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Docs
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- 'docs/**'
11+
- 'mkdocs.yml'
12+
13+
permissions:
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.13'
30+
31+
- name: Install MkDocs
32+
run: pip install mkdocs-material
33+
34+
- name: Build docs
35+
run: mkdocs build
36+
37+
- name: Upload Pages artifact
38+
uses: actions/upload-pages@v4
39+
with:
40+
path: site/
41+
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

docs/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
See [CHANGELOG.md](https://github.com/vngcloud/greennode-cli/blob/main/CHANGELOG.md) for the full release history.
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# create-cluster
2+
3+
## Description
4+
5+
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.
6+
7+
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.
8+
9+
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.
10+
11+
Use `--dry-run` to validate all parameters without sending a create request.
12+
13+
## Synopsis
14+
15+
```
16+
grn vks create-cluster
17+
--name <value>
18+
--k8s-version <value>
19+
--network-type <value>
20+
--vpc-id <value>
21+
--subnet-id <value>
22+
--node-group-name <value>
23+
--flavor-id <value>
24+
--image-id <value>
25+
--disk-type <value>
26+
--ssh-key-id <value>
27+
[--cidr <value>]
28+
[--description <value>]
29+
[--enable-private-cluster]
30+
[--release-channel <value>]
31+
[--enabled-load-balancer-plugin]
32+
[--no-load-balancer-plugin]
33+
[--enabled-block-store-csi-plugin]
34+
[--no-block-store-csi-plugin]
35+
[--disk-size <value>]
36+
[--num-nodes <value>]
37+
[--enable-private-nodes]
38+
[--security-groups <value>]
39+
[--labels <value>]
40+
[--taints <value>]
41+
[--dry-run]
42+
```
43+
44+
## Options
45+
46+
**Cluster settings**
47+
48+
`--name` (required)
49+
: Cluster name. Must be 5–20 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.
50+
51+
`--k8s-version` (required)
52+
: Kubernetes version for the cluster (e.g. `v1.29.1`).
53+
54+
`--network-type` (required)
55+
: Network type for the cluster. Accepted values: `CALICO`, `CILIUM_OVERLAY`, `CILIUM_NATIVE_ROUTING`.
56+
57+
`--vpc-id` (required)
58+
: VPC ID where the cluster will be provisioned.
59+
60+
`--subnet-id` (required)
61+
: Subnet ID for the cluster control plane and the default node group.
62+
63+
`--cidr` (optional)
64+
: Pod CIDR block. Required when `--network-type` is `CALICO` or `CILIUM_OVERLAY` (e.g. `10.96.0.0/12`).
65+
66+
`--description` (optional)
67+
: Human-readable description for the cluster.
68+
69+
`--enable-private-cluster` (optional)
70+
: Enable private cluster mode (control plane not accessible from the public internet).
71+
72+
`--release-channel` (optional)
73+
: Release channel for automatic upgrades. Accepted values: `RAPID`, `STABLE`. Default: `STABLE`.
74+
75+
`--enabled-load-balancer-plugin` (optional)
76+
: Explicitly enable the load balancer plugin (enabled by default).
77+
78+
`--no-load-balancer-plugin` (optional)
79+
: Disable the load balancer plugin.
80+
81+
`--enabled-block-store-csi-plugin` (optional)
82+
: Explicitly enable the block store CSI plugin (enabled by default).
83+
84+
`--no-block-store-csi-plugin` (optional)
85+
: Disable the block store CSI plugin.
86+
87+
**Node group settings**
88+
89+
`--node-group-name` (required)
90+
: Name of the initial node group. Must be 5–15 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.
91+
92+
`--flavor-id` (required)
93+
: Flavor (instance type) ID for the nodes.
94+
95+
`--image-id` (required)
96+
: OS image ID for the nodes.
97+
98+
`--disk-type` (required)
99+
: Disk type ID for the node boot volumes.
100+
101+
`--ssh-key-id` (required)
102+
: SSH key pair ID to inject into each node.
103+
104+
`--disk-size` (optional)
105+
: Boot disk size in GiB. Accepted range: 20–5000. Default: `100`.
106+
107+
`--num-nodes` (optional)
108+
: Number of nodes to create in the default node group. Accepted range: 0–10. Default: `1`.
109+
110+
`--enable-private-nodes` (optional)
111+
: Enable private nodes (nodes will not have public IP addresses).
112+
113+
`--security-groups` (optional)
114+
: Comma-separated list of security group IDs to attach to the nodes (e.g. `sg-aaa111,sg-bbb222`).
115+
116+
`--labels` (optional)
117+
: Comma-separated `key=value` pairs to add as Kubernetes node labels (e.g. `env=prod,tier=app`).
118+
119+
`--taints` (optional)
120+
: Comma-separated node taints in `key=value:effect` format (e.g. `dedicated=gpu:NoSchedule`).
121+
122+
`--dry-run` (optional)
123+
: Validate all parameters and print a report without sending the create request.
124+
125+
## Examples
126+
127+
Create a minimal cluster with CILIUM_NATIVE_ROUTING:
128+
129+
```bash
130+
grn vks create-cluster \
131+
--name my-cluster \
132+
--k8s-version v1.29.1 \
133+
--network-type CILIUM_NATIVE_ROUTING \
134+
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
135+
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
136+
--node-group-name default-ng \
137+
--flavor-id flv-2c4g \
138+
--image-id img-ubuntu-22-04-k8s \
139+
--disk-type SSD \
140+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001
141+
```
142+
143+
Create a cluster with CALICO network type (CIDR required):
144+
145+
```bash
146+
grn vks create-cluster \
147+
--name prod-cluster \
148+
--k8s-version v1.29.1 \
149+
--network-type CALICO \
150+
--cidr 10.96.0.0/12 \
151+
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
152+
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
153+
--node-group-name prod-ng \
154+
--flavor-id flv-4c8g \
155+
--image-id img-ubuntu-22-04-k8s \
156+
--disk-type SSD \
157+
--disk-size 200 \
158+
--num-nodes 3 \
159+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
160+
--labels env=prod,tier=app \
161+
--taints dedicated=gpu:NoSchedule
162+
```
163+
164+
Validate parameters without creating (dry run):
165+
166+
```bash
167+
grn vks create-cluster \
168+
--name my-cluster \
169+
--k8s-version v1.29.1 \
170+
--network-type CILIUM_NATIVE_ROUTING \
171+
--vpc-id net-abc12345-0000-0000-0000-000000000001 \
172+
--subnet-id sub-abc12345-0000-0000-0000-000000000001 \
173+
--node-group-name default-ng \
174+
--flavor-id flv-2c4g \
175+
--image-id img-ubuntu-22-04-k8s \
176+
--disk-type SSD \
177+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
178+
--dry-run
179+
```
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# create-nodegroup
2+
3+
## Description
4+
5+
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.
6+
7+
Use `--dry-run` to validate parameters (name format, disk size range, node count range) without sending a create request.
8+
9+
## Synopsis
10+
11+
```
12+
grn vks create-nodegroup
13+
--cluster-id <value>
14+
--name <value>
15+
--image-id <value>
16+
--flavor-id <value>
17+
--disk-type <value>
18+
--ssh-key-id <value>
19+
[--enable-private-nodes]
20+
[--num-nodes <value>]
21+
[--disk-size <value>]
22+
[--security-groups <value>]
23+
[--subnet-id <value>]
24+
[--labels <value>]
25+
[--taints <value>]
26+
[--enable-encryption-volume]
27+
[--dry-run]
28+
```
29+
30+
## Options
31+
32+
`--cluster-id` (required)
33+
: ID of the cluster to add the node group to.
34+
35+
`--name` (required)
36+
: Node group name. Must be 5–15 characters, lowercase alphanumeric and hyphens, starting and ending with an alphanumeric character.
37+
38+
`--image-id` (required)
39+
: OS image ID for the nodes.
40+
41+
`--flavor-id` (required)
42+
: Flavor (instance type) ID for the nodes.
43+
44+
`--disk-type` (required)
45+
: Disk type ID for the node boot volumes.
46+
47+
`--ssh-key-id` (required)
48+
: SSH key pair ID to inject into each node.
49+
50+
`--enable-private-nodes` (optional)
51+
: Enable private nodes (nodes will not have public IP addresses).
52+
53+
`--num-nodes` (optional)
54+
: Number of nodes to create. Accepted range: 0–10. Default: `1`.
55+
56+
`--disk-size` (optional)
57+
: Boot disk size in GiB. Accepted range: 20–5000. Default: `100`.
58+
59+
`--security-groups` (optional)
60+
: Comma-separated list of security group IDs to attach to the nodes (e.g. `sg-aaa111,sg-bbb222`).
61+
62+
`--subnet-id` (optional)
63+
: Subnet ID for the node group. Uses the cluster subnet when not specified.
64+
65+
`--labels` (optional)
66+
: Comma-separated `key=value` pairs to add as Kubernetes node labels (e.g. `env=prod,tier=app`).
67+
68+
`--taints` (optional)
69+
: Comma-separated node taints in `key=value:effect` format (e.g. `dedicated=gpu:NoSchedule`).
70+
71+
`--enable-encryption-volume` (optional)
72+
: Enable encryption for the node boot volumes.
73+
74+
`--dry-run` (optional)
75+
: Validate parameters and print a report without sending the create request.
76+
77+
## Examples
78+
79+
Create a basic node group:
80+
81+
```bash
82+
grn vks create-nodegroup \
83+
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
84+
--name worker-ng \
85+
--image-id img-ubuntu-22-04-k8s \
86+
--flavor-id flv-4c8g \
87+
--disk-type SSD \
88+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001
89+
```
90+
91+
Create a GPU node group with taints and labels:
92+
93+
```bash
94+
grn vks create-nodegroup \
95+
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
96+
--name gpu-ng \
97+
--image-id img-ubuntu-22-04-k8s-gpu \
98+
--flavor-id flv-8c32g-gpu \
99+
--disk-type SSD \
100+
--disk-size 200 \
101+
--num-nodes 2 \
102+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
103+
--labels accelerator=nvidia,tier=gpu \
104+
--taints dedicated=gpu:NoSchedule \
105+
--enable-encryption-volume
106+
```
107+
108+
Validate parameters without creating:
109+
110+
```bash
111+
grn vks create-nodegroup \
112+
--cluster-id cls-abc12345-6789-def0-1234-abcdef012345 \
113+
--name worker-ng \
114+
--image-id img-ubuntu-22-04-k8s \
115+
--flavor-id flv-4c8g \
116+
--disk-type SSD \
117+
--ssh-key-id key-abc12345-0000-0000-0000-000000000001 \
118+
--dry-run
119+
```

0 commit comments

Comments
 (0)