Provisions a new Kubernetes cluster on Vultr with customizable configuration options for node pools, version, and region.
The vultr-cli kubernetes create
command provisions a new Kubernetes cluster on Vultr's infrastructure, allowing you to specify configuration options like node pools, version, and region.
$ vultr-cli kubernetes create [flags]
# Full example
$ vultr-cli kubernetes create --label="my-cluster" --region="ewr" --version="v1.29.2+1" \
--node-pools="quantity:3,plan:vc2-2c-4gb,label:my-nodepool,tag:my-tag"
# Shortened with alias commands
$ vultr-cli k c -l="my-cluster" -r="ewr" -v="v1.29.2+1" -n="quantity:3,plan:vc2-2c-4gb,label:my-nodepool,tag:my-tag"
# Node pool options
The --node-pools option allows you to pass in options for any number of
node pools when creating a cluster. The options are passed in a delimited
string. Different node pools are delimited by a slash (/). The options for
each node pool are delimited by a comma (,) and each option is defined by
colon (:). If provided, the node pool options can also parse out the
node-labels params which are delimited by a pipe (|).
Available options are documented in the 'kubernetes node-pool create --help'
For example:
Multiple node pools
--node-pools="quantity:1,plan:vc2-4c-8gb,label:main-node-pool/quantity:5,plan:vc2-2c-4gb,label:worker-pool, \
auto-scaler:true,min-nodes:5,max-nodes:10"
Using node labels
--node-pools="quantity:5,plan:vc2-2c-4gb,label:worker-pool,auto-scaler:true,min-nodes:5,max-nodes:10, \
node-labels:application=identity-service|worker-size=small"
Shorthand | Long Version | Description |
---|---|---|
-f | --enable-firewall | (optional, default false) whether a firewall group should be created for the cluster |
| - | --high-avail | (optional, default false) whether or not the cluster should be deployed with multiple, highly available, control planes | | -l | --label | label for your kubernetes cluster | | -n | --node-pools | a comma-separated, key-value pair list of node pools. At least one node pool is required. At least one node is required in node pool. Use / between each new node pool. E.g: 'plan:vhf-8c-32gb,label:mynodepool,tag:my-tag,quantity:3/plan:vhf-8c-32gb,label:mynodepool2,quantity:3 | | -r | --region | region you want your kubernetes cluster to be located in | | -v | --version | the kubernetes version you want for your cluster |
No comments yet.