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

OptionDescription
--1-clicksComma-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-upgradeA 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
--countNumber of nodes in the default node pool (incompatible with –node-pool)
Default: 3
--help, -hHelp for this command
--maintenance-windowSets 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.
--regionCluster region. Possible values: see doctl kubernetes options regions (required)
Default: nyc1
--set-current-contextBoolean that specifies whether to set the current kubectl context to that of the new cluster
Default: true
--sizeMachine 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-upgradeBoolean specifying whether to enable surge-upgrade for the cluster
Default: true
--tagComma-separated list of tags to apply to the cluster, in addition to the default tags of k8s and k8s:$K8S_CLUSTER_ID.
--update-kubeconfigBoolean that specifies whether to add a configuration context for the new cluster to your kubectl
Default: true
--versionKubernetes version. Possible values: see doctl kubernetes options versions
Default: latest
--vpc-uuidKubernetes UUID. Must be the UUID of a valid VPC in the same region specified for the cluster.
--waitBoolean that specifies whether to wait for cluster creation to complete before returning control to the terminal
Default: true
CommandDescription
doctl kubernetes clusterDisplay commands for managing Kubernetes clusters

Global Flags

OptionDescription
--access-token, -tAPI V2 access token
--api-url, -uOverride default API endpoint
--config, -cSpecify 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
--contextSpecify a custom authentication context name
--output, -oDesired output format [text|json]
Default: text
--traceShow a log of network activity while performing a command
Default: false
--verbose, -vEnable verbose output
Default: false