Parameter | Choices | Default | Comments |
---|---|---|---|
auto_upgrade (bool) |
False | A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. | |
client_override_options (dict) |
Client override options (developer use). For example, can be used to override the DigitalOcean API endpoint for an internal test suite. If provided, these options will knock out existing options. | ||
ha (bool) |
False | A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. | |
maintenance_policy (dict) |
An object specifying the maintenance window policy for the Kubernetes cluster. | ||
module_override_options (dict) |
Module override options (developer use). Can be used to override module options to support experimental or future options. If provided, these options will knock out existing options. | ||
name (str) |
A human-readable name for a Kubernetes cluster. | ||
node_pools (list) |
An object specifying the details of the worker nodes available to the Kubernetes cluster. | ||
region (str) |
The slug identifier for the region where the Kubernetes cluster is located. | ||
state (str) |
|
present | State of the resource, present to create, absent to destroy. |
surge_upgrade (bool) |
False | A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes. | |
tags (list) |
An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged k8s and k8s:$K8S_CLUSTER_ID . |
||
timeout (int) |
300 | Polling timeout in seconds. | |
token (str) |
DigitalOcean API token. There are several environment variables which can be used to provide this value. DIGITALOCEAN_ACCESS_TOKEN , DIGITALOCEAN_TOKEN , DO_API_TOKEN , DO_API_KEY , DO_OAUTH_TOKEN and OAUTH_TOKEN |
||
version (str) |
The slug identifier for the version of Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the latest version within it will be used
(e.g. "1.14.6-do.1").
If set to "latest", the latest published version will be used. See the /v2/kubernetes/options endpoint to find all currently available versions. |
||
vpc_uuid (str) |
A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned. |
- name: Create Kubernetes cluster
digitalocean.cloud.kubernetes_cluster:
token: "{{ token }}"
state: present
name: prod-cluster-01
region: nyc1
version: "1.18.6-do.0"
node_pools:
- size: s-1vcpu-2gb
name: worker-pool
count: 3
Key | Returned | Description |
---|---|---|
error (dict) |
failure |
DigitalOcean API error.
Sample:
|
kubernetes_cluster (dict) |
always |
Kubernetes cluster information.
Sample:
|
msg (str) |
always |
Kubernetes cluster result information.
Sample:
|