K8s Cluster

k8s_cluster

This is a simple module that supports creating or removing K8s Clusters. This module has a dependency on ionoscloud >= 6.0.2

Example Syntax


name: Create k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  cluster_name: my-cluster-
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
register: cluster_response


name: Update k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  cluster_name: my_cluster
  k8s_cluster: ''
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: update
register: cluster


name: Delete k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  k8s_cluster: ''
  state: absent
  wait: false

Returned object

{
    "changed": true,
    "failed": false,
    "action": "create",
    "cluster": {
        "entities": null,
        "href": "https://api.ionos.com/cloudapi/v6/k8s/b08b63ff-8bee-4091-ad5f-f8296eedd93b",
        "id": "b08b63ff-8bee-4091-ad5f-f8296eedd93b",
        "metadata": {
            "created_by": "<USER_EMAIL>",
            "created_by_user_id": "<USER_ID>",
            "created_date": "2023-05-31T09:42:32+00:00",
            "etag": "28a43faaa371c59d79d86aca2d6f7792",
            "last_modified_by": "<USER_EMAIL>",
            "last_modified_by_user_id": "<USER_ID>",
            "last_modified_date": "2023-05-31T09:42:32+00:00",
            "state": "DEPLOYING"
        },
        "properties": {
            "api_subnet_allow_list": null,
            "available_upgrade_versions": null,
            "k8s_version": null,
            "maintenance_window": {
                "day_of_the_week": "Wednesday",
                "time": "12:02:00Z"
            },
            "name": "my-cluster-4",
            "s3_buckets": null,
            "viable_node_pool_versions": null
        },
        "type": "k8s"
    }
}

For more examples please check out the tests here.

state: present

  
name: Create k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  cluster_name: my-cluster-
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
register: cluster_response

Available parameters for state present:

state: absent

  
name: Delete k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  k8s_cluster: ''
  state: absent
  wait: false

Available parameters for state absent:

state: update

  
name: Update k8s cluster
ionoscloudsdk.ionoscloud.k8s_cluster:
  cluster_name: my_cluster
  k8s_cluster: ''
  maintenance_window:
    day_of_the_week: Wednesday
    time: '12:02:00'
  state: update
register: cluster

Available parameters for state update:

Last updated