doctl kubernetes cluster create

Go to Navigation

Usage

doctl kubernetes cluster create <name> [flags]

Aliases

c

Description

Creates a Kubernetes cluster given the specified options, using the specified name. Before creating the cluster, you can use doctl kubernetes options to see possible values for the various configuration flags.

If no configuration flags are used, a three-node cluster with a single node pool will be created in the nyc1 region, using the latest Kubernetes version.

After creating a cluster, a configuration context will be added to kubectl and made active so that you can begin managing your new cluster immediately.

Flags

Option Description
--1-clicks Comma-separated list of 1-Click Applications to install on the kubernetes cluster. To see a list of 1-Click Applications available run doctl kubernetes 1-click list
--auto-upgrade A boolean flag indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window (default false). To enable automatic upgrade, supply –auto-upgrade(=true).
Default: false
--count Number of nodes in the default node pool (incompatible with –node-pool)
Default: 3
--ha A boolean flag indicating whether the cluster will be configured with a highly-available control plane (default false). To enable the HA control plane, supply –ha(=true).
Default: false
--help , -h Help for this command
--maintenance-window Sets the beginning of the four hour maintenance window for the cluster. Syntax is in the format: day=HH:MM, where time is in UTC. Day can be: any, monday, tuesday, wednesday, thursday, friday, saturday, sunday.
Default: any=00:00
--node-pool

Comma-separated list of node pools, defined using semicolon-separated configuration values and surrounded by quotes (incompatible with –size and –count) Format: "name=your-name;size=size_slug;count=5;tag=tag1;tag=tag2;label=key1=value1;label=key2=label2;taint=key1=value1:NoSchedule;taint=key2:NoExecute" where:

  • name: Name of the node pool, which must be unique in the cluster
  • size: Machine size of the nodes to use. Possible values: see doctl kubernetes options sizes.
  • count: Number of nodes to create.
  • tag: Comma-separated list of tags to apply to nodes in the pool
  • label: Label in key=value notation; repeat to add multiple labels at once.
  • taint: Taint in key[=value]:effect notation; repeat to add multiple taints at once.
  • auto-scale: Boolean defining whether to enable cluster auto-scaling on the node pool.
  • min-nodes: Minimum number of nodes that can be auto-scaled to.
  • max-nodes: Maximum number of nodes that can be auto-scaled to.
--region Cluster region. Possible values: see doctl kubernetes options regions (required)
Default: nyc1
--set-current-context Boolean that specifies whether to set the current kubectl context to that of the new cluster
Default: true
--size Machine size to use when creating nodes in the default node pool (incompatible with –node-pool). Possible values: see doctl kubernetes options sizes
Default: s-1vcpu-2gb
--surge-upgrade Boolean specifying whether to enable surge-upgrade for the cluster
Default: true
--tag Comma-separated list of tags to apply to the cluster, in addition to the default tags of k8s and k8s:$K8S_CLUSTER_ID.
--update-kubeconfig Boolean that specifies whether to add a configuration context for the new cluster to your kubectl
Default: true
--version Kubernetes version. Possible values: see doctl kubernetes options versions
Default: latest
--vpc-uuid Kubernetes UUID. Must be the UUID of a valid VPC in the same region specified for the cluster.
--wait Boolean that specifies whether to wait for cluster creation to complete before returning control to the terminal
Default: true
Command Description
doctl kubernetes cluster Display commands for managing Kubernetes clusters

Global Flags

Option Description
--access-token, -t API V2 access token
--api-url, -u Override default API endpoint
--config, -c Specify a custom config file
Default:
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--context Specify a custom authentication context name
--http-retry-max Set maximum number of retries for requests that fail with a 429 or 500-level error
Default: 5
--http-retry-wait-max Set the minimum number of seconds to wait before retrying a failed request
Default: 30
--http-retry-wait-min Set the maximum number of seconds to wait before retrying a failed request
Default: 1
--interactive Enable interactive behavior. Defaults to true if the terminal supports it (default false)
Default: false
--output, -o Desired output format [text|json]
Default: text
--trace Show a log of network activity while performing a command
Default: false
--verbose, -v Enable verbose output
Default: false