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 and 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 is created in the nyc1 region, using the latest Kubernetes version.

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

Flags

Option Description
--1-clicks A comma-separated list of 1-click applications to install on the Kubernetes cluster. Use the doctl kubernetes 1-click list command for a list of available 1-click applications.
--auto-upgrade Enables automatic upgrades to new patch releases during the cluster’s maintenance window. Defaults to false. To enable automatic upgrade, supply --auto-upgrade=true.
Default: false
--count The number of nodes in the default node pool (incompatible with –node-pool)
Default: 3
--ha Creates the cluster with a highly-available control plane. Defaults to 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. The syntax format is: 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

A 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: The name of the node pool, which must be unique in the cluster
  • size: The machine size of the nodes to use. Use the doctl kubernetes options sizes command for a list of available options.
  • count: The number of nodes to create
  • tag: A comma-separated list of tags to apply to nodes in the pool
  • label: A 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: Enables cluster auto-scaling on the node pool (boolean)
  • min-nodes: The minimum number of nodes that the cluster can be auto-scaled to.
  • max-nodes: The maximum number of nodes that can be auto-scaled to.
--region A slug indicating which region to create the cluster in. Use the doctl kubernetes options regions command for a list of options (required)
Default: nyc1
--set-current-context Sets the current kubectl context to that of the new cluster
Default: true
--size The machine size to use when creating nodes in the default node pool (incompatible with –node-pool). Use the doctl kubernetes options sizes command for a list of possible values.
Default: s-1vcpu-2gb
--surge-upgrade Enables surge-upgrade for the cluster
Default: true
--tag A 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 Adds a configuration context for the new cluster to your kubectl
Default: true
--version A slug indicating which Kubernetes version to use when creating the cluster. Use the doctl kubernetes options versions command for a list of options
Default: latest
--vpc-uuid The UUID of a VPC network to create the cluster in. Must be the UUID of a valid VPC in the same region specified for the cluster. If a VPC is not specified, the cluster is placed in the default VPC network for the region.
--wait Instructs the terminal to wait for the action to complete before returning control to the user
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