Kubernetes Cluster
Creates and manages IonosCloud Kubernetes Clusters.
Manages a Managed Kubernetes Cluster on IonosCloud.
Example Usage
Public cluster
Private Cluster
Argument Reference
The following arguments are supported:
name
- (Required)[string] The name of the Kubernetes Cluster.k8s_version
- (Optional)[string] The desired Kubernetes Version. For supported values, please check the API documentation. Downgrades are not supported. The provider will ignore downgrades of patch level.maintenance_window
- (Optional) A maintenance window comprise of a day of the week and a time for maintenance to be allowedtime
- (Required)[string] A clock time in the day when maintenance is allowedday_of_the_week
- (Required)[string] Day of the week when maintenance is allowed
viable_node_pool_versions
- (Computed)[list] List of versions that may be used for node pools under this clusterapi_subnet_allow_list
- (Optional)[list] Access to the K8s API server is restricted to these CIDRs. Cluster-internal traffic is not affected by this restriction. If no allowlist is specified, access is not restricted. If an IP without subnet mask is provided, the default value will be used: 32 for IPv4 and 128 for IPv6.s3_buckets
- (Optional)[list] List of S3 bucket configured for K8s usage. For now it contains only an S3 bucket used to store K8s API audit logs.public
- (Optional)[boolean] Indicates if the cluster is public or private. This attribute is immutable.nat_gateway_ip
- (Optional)[string] The NAT gateway IP of the cluster if the cluster is private. This attribute is immutable. Must be a reserved IP in the same location as the cluster's location. This attribute is mandatory if the cluster is private.node_subnet
- (Optional)[string] The node subnet of the cluster, if the cluster is private. This attribute is optional and immutable. Must be a valid CIDR notation for an IPv4 network prefix of 16 bits length.location
- (Optional)[string] This attribute is mandatory if the cluster is private. The location must be enabled for your contract, or you must have a data center at that location. This property is not adjustable.allow_replace
- (Optional)[bool] When set to true, allows the update of immutable fields by first destroying and then re-creating the cluster.
⚠️ Warning: allow_replace
- lets you update immutable fields, but it first destroys and then re-creates the cluster in order to do it. Set the field to true only if you know what you are doing.
Import
A Kubernetes Cluster resource can be imported using its resource id
, e.g.
This can be helpful when you want to import kubernetes clusters which you have already created manually or using other means, outside of terraform.
⚠️ Warning: **During a maintenance window, k8s can update your k8s_version
if the old one reaches end of life. This upgrade will not be shown in the plan, as we prevent terraform from doing a downgrade, as downgrading k8s_version
is not supported.
Last updated