|
| 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 | +``` |
0 commit comments