ionoscloud.k8s.Cluster
Explore with Pulumi AI
Manages a Managed Kubernetes Cluster on IonosCloud.
Example Usage
Public cluster
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const example = new ionoscloud.k8s.Cluster("example", {
name: "k8sClusterExample",
k8sVersion: "1.31.2",
maintenanceWindow: {
dayOfTheWeek: "Sunday",
time: "09:00:00Z",
},
apiSubnetAllowLists: ["1.2.3.4/32"],
s3Buckets: [{
name: "globally_unique_bucket_name",
}],
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.k8s.Cluster("example",
name="k8sClusterExample",
k8s_version="1.31.2",
maintenance_window={
"day_of_the_week": "Sunday",
"time": "09:00:00Z",
},
api_subnet_allow_lists=["1.2.3.4/32"],
s3_buckets=[{
"name": "globally_unique_bucket_name",
}])
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/k8s"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := k8s.NewCluster(ctx, "example", &k8s.ClusterArgs{
Name: pulumi.String("k8sClusterExample"),
K8sVersion: pulumi.String("1.31.2"),
MaintenanceWindow: &k8s.ClusterMaintenanceWindowArgs{
DayOfTheWeek: pulumi.String("Sunday"),
Time: pulumi.String("09:00:00Z"),
},
ApiSubnetAllowLists: pulumi.StringArray{
pulumi.String("1.2.3.4/32"),
},
S3Buckets: k8s.ClusterS3BucketArray{
&k8s.ClusterS3BucketArgs{
Name: pulumi.String("globally_unique_bucket_name"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.K8s.Cluster("example", new()
{
Name = "k8sClusterExample",
K8sVersion = "1.31.2",
MaintenanceWindow = new Ionoscloud.K8s.Inputs.ClusterMaintenanceWindowArgs
{
DayOfTheWeek = "Sunday",
Time = "09:00:00Z",
},
ApiSubnetAllowLists = new[]
{
"1.2.3.4/32",
},
S3Buckets = new[]
{
new Ionoscloud.K8s.Inputs.ClusterS3BucketArgs
{
Name = "globally_unique_bucket_name",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.k8s.Cluster;
import com.pulumi.ionoscloud.k8s.ClusterArgs;
import com.pulumi.ionoscloud.k8s.inputs.ClusterMaintenanceWindowArgs;
import com.pulumi.ionoscloud.k8s.inputs.ClusterS3BucketArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Cluster("example", ClusterArgs.builder()
.name("k8sClusterExample")
.k8sVersion("1.31.2")
.maintenanceWindow(ClusterMaintenanceWindowArgs.builder()
.dayOfTheWeek("Sunday")
.time("09:00:00Z")
.build())
.apiSubnetAllowLists("1.2.3.4/32")
.s3Buckets(ClusterS3BucketArgs.builder()
.name("globally_unique_bucket_name")
.build())
.build());
}
}
resources:
example:
type: ionoscloud:k8s:Cluster
properties:
name: k8sClusterExample
k8sVersion: 1.31.2
maintenanceWindow:
dayOfTheWeek: Sunday
time: 09:00:00Z
apiSubnetAllowLists:
- 1.2.3.4/32
s3Buckets:
- name: globally_unique_bucket_name
Private Cluster
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
const testdatacenter = new ionoscloud.compute.Datacenter("testdatacenter", {
name: "example",
location: "de/fra",
description: "Test datacenter",
});
const k8sip = new ionoscloud.compute.IPBlock("k8sip", {
location: "de/fra",
size: 1,
name: "IP Block Private K8s",
});
const example = new ionoscloud.k8s.Cluster("example", {
name: "k8sClusterExample",
k8sVersion: "1.31.2",
maintenanceWindow: {
dayOfTheWeek: "Sunday",
time: "09:00:00Z",
},
apiSubnetAllowLists: ["1.2.3.4/32"],
s3Buckets: [{
name: "globally_unique_bucket_name",
}],
location: "de/fra",
natGatewayIp: k8sip.ips[0],
nodeSubnet: "192.168.0.0/16",
"public": false,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
testdatacenter = ionoscloud.compute.Datacenter("testdatacenter",
name="example",
location="de/fra",
description="Test datacenter")
k8sip = ionoscloud.compute.IPBlock("k8sip",
location="de/fra",
size=1,
name="IP Block Private K8s")
example = ionoscloud.k8s.Cluster("example",
name="k8sClusterExample",
k8s_version="1.31.2",
maintenance_window={
"day_of_the_week": "Sunday",
"time": "09:00:00Z",
},
api_subnet_allow_lists=["1.2.3.4/32"],
s3_buckets=[{
"name": "globally_unique_bucket_name",
}],
location="de/fra",
nat_gateway_ip=k8sip.ips[0],
node_subnet="192.168.0.0/16",
public=False)
package main
import (
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/k8s"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewDatacenter(ctx, "testdatacenter", &compute.DatacenterArgs{
Name: pulumi.String("example"),
Location: pulumi.String("de/fra"),
Description: pulumi.String("Test datacenter"),
})
if err != nil {
return err
}
k8sip, err := compute.NewIPBlock(ctx, "k8sip", &compute.IPBlockArgs{
Location: pulumi.String("de/fra"),
Size: pulumi.Int(1),
Name: pulumi.String("IP Block Private K8s"),
})
if err != nil {
return err
}
_, err = k8s.NewCluster(ctx, "example", &k8s.ClusterArgs{
Name: pulumi.String("k8sClusterExample"),
K8sVersion: pulumi.String("1.31.2"),
MaintenanceWindow: &k8s.ClusterMaintenanceWindowArgs{
DayOfTheWeek: pulumi.String("Sunday"),
Time: pulumi.String("09:00:00Z"),
},
ApiSubnetAllowLists: pulumi.StringArray{
pulumi.String("1.2.3.4/32"),
},
S3Buckets: k8s.ClusterS3BucketArray{
&k8s.ClusterS3BucketArgs{
Name: pulumi.String("globally_unique_bucket_name"),
},
},
Location: pulumi.String("de/fra"),
NatGatewayIp: k8sip.Ips.ApplyT(func(ips []string) (string, error) {
return ips[0], nil
}).(pulumi.StringOutput),
NodeSubnet: pulumi.String("192.168.0.0/16"),
Public: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var testdatacenter = new Ionoscloud.Compute.Datacenter("testdatacenter", new()
{
Name = "example",
Location = "de/fra",
Description = "Test datacenter",
});
var k8sip = new Ionoscloud.Compute.IPBlock("k8sip", new()
{
Location = "de/fra",
Size = 1,
Name = "IP Block Private K8s",
});
var example = new Ionoscloud.K8s.Cluster("example", new()
{
Name = "k8sClusterExample",
K8sVersion = "1.31.2",
MaintenanceWindow = new Ionoscloud.K8s.Inputs.ClusterMaintenanceWindowArgs
{
DayOfTheWeek = "Sunday",
Time = "09:00:00Z",
},
ApiSubnetAllowLists = new[]
{
"1.2.3.4/32",
},
S3Buckets = new[]
{
new Ionoscloud.K8s.Inputs.ClusterS3BucketArgs
{
Name = "globally_unique_bucket_name",
},
},
Location = "de/fra",
NatGatewayIp = k8sip.Ips.Apply(ips => ips[0]),
NodeSubnet = "192.168.0.0/16",
Public = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.compute.Datacenter;
import com.pulumi.ionoscloud.compute.DatacenterArgs;
import com.pulumi.ionoscloud.compute.IPBlock;
import com.pulumi.ionoscloud.compute.IPBlockArgs;
import com.pulumi.ionoscloud.k8s.Cluster;
import com.pulumi.ionoscloud.k8s.ClusterArgs;
import com.pulumi.ionoscloud.k8s.inputs.ClusterMaintenanceWindowArgs;
import com.pulumi.ionoscloud.k8s.inputs.ClusterS3BucketArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testdatacenter = new Datacenter("testdatacenter", DatacenterArgs.builder()
.name("example")
.location("de/fra")
.description("Test datacenter")
.build());
var k8sip = new IPBlock("k8sip", IPBlockArgs.builder()
.location("de/fra")
.size(1)
.name("IP Block Private K8s")
.build());
var example = new Cluster("example", ClusterArgs.builder()
.name("k8sClusterExample")
.k8sVersion("1.31.2")
.maintenanceWindow(ClusterMaintenanceWindowArgs.builder()
.dayOfTheWeek("Sunday")
.time("09:00:00Z")
.build())
.apiSubnetAllowLists("1.2.3.4/32")
.s3Buckets(ClusterS3BucketArgs.builder()
.name("globally_unique_bucket_name")
.build())
.location("de/fra")
.natGatewayIp(k8sip.ips().applyValue(ips -> ips[0]))
.nodeSubnet("192.168.0.0/16")
.public_(false)
.build());
}
}
resources:
testdatacenter:
type: ionoscloud:compute:Datacenter
properties:
name: example
location: de/fra
description: Test datacenter
k8sip:
type: ionoscloud:compute:IPBlock
properties:
location: de/fra
size: 1
name: IP Block Private K8s
example:
type: ionoscloud:k8s:Cluster
properties:
name: k8sClusterExample
k8sVersion: 1.31.2
maintenanceWindow:
dayOfTheWeek: Sunday
time: 09:00:00Z
apiSubnetAllowLists:
- 1.2.3.4/32
s3Buckets:
- name: globally_unique_bucket_name
location: de/fra
natGatewayIp: ${k8sip.ips[0]}
nodeSubnet: 192.168.0.0/16
public: false
Create Cluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Cluster(name: string, args?: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
args: Optional[ClusterArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Cluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
allow_replace: Optional[bool] = None,
api_subnet_allow_lists: Optional[Sequence[str]] = None,
k8s_version: Optional[str] = None,
location: Optional[str] = None,
maintenance_window: Optional[ClusterMaintenanceWindowArgs] = None,
name: Optional[str] = None,
nat_gateway_ip: Optional[str] = None,
node_subnet: Optional[str] = None,
public: Optional[bool] = None,
s3_buckets: Optional[Sequence[ClusterS3BucketArgs]] = None)
func NewCluster(ctx *Context, name string, args *ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs? args = null, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: ionoscloud:k8s:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ionoscloudClusterResource = new Ionoscloud.K8s.Cluster("ionoscloudClusterResource", new()
{
AllowReplace = false,
ApiSubnetAllowLists = new[]
{
"string",
},
K8sVersion = "string",
Location = "string",
MaintenanceWindow = new Ionoscloud.K8s.Inputs.ClusterMaintenanceWindowArgs
{
DayOfTheWeek = "string",
Time = "string",
},
Name = "string",
NatGatewayIp = "string",
NodeSubnet = "string",
Public = false,
S3Buckets = new[]
{
new Ionoscloud.K8s.Inputs.ClusterS3BucketArgs
{
Name = "string",
},
},
});
example, err := k8s.NewCluster(ctx, "ionoscloudClusterResource", &k8s.ClusterArgs{
AllowReplace: pulumi.Bool(false),
ApiSubnetAllowLists: pulumi.StringArray{
pulumi.String("string"),
},
K8sVersion: pulumi.String("string"),
Location: pulumi.String("string"),
MaintenanceWindow: &k8s.ClusterMaintenanceWindowArgs{
DayOfTheWeek: pulumi.String("string"),
Time: pulumi.String("string"),
},
Name: pulumi.String("string"),
NatGatewayIp: pulumi.String("string"),
NodeSubnet: pulumi.String("string"),
Public: pulumi.Bool(false),
S3Buckets: k8s.ClusterS3BucketArray{
&k8s.ClusterS3BucketArgs{
Name: pulumi.String("string"),
},
},
})
var ionoscloudClusterResource = new com.ionoscloud.pulumi.ionoscloud.k8s.Cluster("ionoscloudClusterResource", com.ionoscloud.pulumi.ionoscloud.k8s.ClusterArgs.builder()
.allowReplace(false)
.apiSubnetAllowLists("string")
.k8sVersion("string")
.location("string")
.maintenanceWindow(ClusterMaintenanceWindowArgs.builder()
.dayOfTheWeek("string")
.time("string")
.build())
.name("string")
.natGatewayIp("string")
.nodeSubnet("string")
.public_(false)
.s3Buckets(ClusterS3BucketArgs.builder()
.name("string")
.build())
.build());
ionoscloud_cluster_resource = ionoscloud.k8s.Cluster("ionoscloudClusterResource",
allow_replace=False,
api_subnet_allow_lists=["string"],
k8s_version="string",
location="string",
maintenance_window={
"day_of_the_week": "string",
"time": "string",
},
name="string",
nat_gateway_ip="string",
node_subnet="string",
public=False,
s3_buckets=[{
"name": "string",
}])
const ionoscloudClusterResource = new ionoscloud.k8s.Cluster("ionoscloudClusterResource", {
allowReplace: false,
apiSubnetAllowLists: ["string"],
k8sVersion: "string",
location: "string",
maintenanceWindow: {
dayOfTheWeek: "string",
time: "string",
},
name: "string",
natGatewayIp: "string",
nodeSubnet: "string",
"public": false,
s3Buckets: [{
name: "string",
}],
});
type: ionoscloud:k8s:Cluster
properties:
allowReplace: false
apiSubnetAllowLists:
- string
k8sVersion: string
location: string
maintenanceWindow:
dayOfTheWeek: string
time: string
name: string
natGatewayIp: string
nodeSubnet: string
public: false
s3Buckets:
- name: string
Cluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Cluster resource accepts the following input properties:
- Allow
Replace bool [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.- Api
Subnet List<string>Allow Lists - [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.
- K8s
Version string - [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.
- Location string
- [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.
- Maintenance
Window Ionoscloud.Cluster Maintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- Name string
- [string] The name of the Kubernetes Cluster.
- Nat
Gateway stringIp - [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 string - [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.
- Public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- S3Buckets
List<Ionoscloud.
Cluster S3Bucket> - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- Allow
Replace bool [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.- Api
Subnet []stringAllow Lists - [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.
- K8s
Version string - [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.
- Location string
- [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.
- Maintenance
Window ClusterMaintenance Window Args - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- Name string
- [string] The name of the Kubernetes Cluster.
- Nat
Gateway stringIp - [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 string - [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.
- Public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- S3Buckets
[]Cluster
S3Bucket Args - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- allow
Replace Boolean [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.- api
Subnet List<String>Allow Lists - [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.
- k8s
Version String - [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.
- location String
- [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.
- maintenance
Window ClusterMaintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name String
- [string] The name of the Kubernetes Cluster.
- nat
Gateway StringIp - [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 String - [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.
- public_ Boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets
List<Cluster
S3Bucket> - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- allow
Replace boolean [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.- api
Subnet string[]Allow Lists - [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.
- k8s
Version string - [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.
- location string
- [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.
- maintenance
Window ClusterMaintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name string
- [string] The name of the Kubernetes Cluster.
- nat
Gateway stringIp - [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 string - [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.
- public boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets
Cluster
S3Bucket[] - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- allow_
replace bool [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.- api_
subnet_ Sequence[str]allow_ lists - [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.
- k8s_
version str - [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.
- location str
- [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.
- maintenance_
window ClusterMaintenance Window Args - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name str
- [string] The name of the Kubernetes Cluster.
- nat_
gateway_ strip - [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 str - [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.
- public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3_
buckets Sequence[ClusterS3Bucket Args] - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- allow
Replace Boolean [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.- api
Subnet List<String>Allow Lists - [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.
- k8s
Version String - [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.
- location String
- [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.
- maintenance
Window Property Map - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name String
- [string] The name of the Kubernetes Cluster.
- nat
Gateway StringIp - [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 String - [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.
- public Boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets List<Property Map>
- [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
Outputs
All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Viable
Node List<string>Pool Versions - [list] List of versions that may be used for node pools under this cluster
- Id string
- The provider-assigned unique ID for this managed resource.
- Viable
Node []stringPool Versions - [list] List of versions that may be used for node pools under this cluster
- id String
- The provider-assigned unique ID for this managed resource.
- viable
Node List<String>Pool Versions - [list] List of versions that may be used for node pools under this cluster
- id string
- The provider-assigned unique ID for this managed resource.
- viable
Node string[]Pool Versions - [list] List of versions that may be used for node pools under this cluster
- id str
- The provider-assigned unique ID for this managed resource.
- viable_
node_ Sequence[str]pool_ versions - [list] List of versions that may be used for node pools under this cluster
- id String
- The provider-assigned unique ID for this managed resource.
- viable
Node List<String>Pool Versions - [list] List of versions that may be used for node pools under this cluster
Look up Existing Cluster Resource
Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClusterState, opts?: CustomResourceOptions): Cluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allow_replace: Optional[bool] = None,
api_subnet_allow_lists: Optional[Sequence[str]] = None,
k8s_version: Optional[str] = None,
location: Optional[str] = None,
maintenance_window: Optional[ClusterMaintenanceWindowArgs] = None,
name: Optional[str] = None,
nat_gateway_ip: Optional[str] = None,
node_subnet: Optional[str] = None,
public: Optional[bool] = None,
s3_buckets: Optional[Sequence[ClusterS3BucketArgs]] = None,
viable_node_pool_versions: Optional[Sequence[str]] = None) -> Cluster
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
public static Cluster get(String name, Output<String> id, ClusterState state, CustomResourceOptions options)
resources: _: type: ionoscloud:k8s:Cluster get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allow
Replace bool [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.- Api
Subnet List<string>Allow Lists - [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.
- K8s
Version string - [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.
- Location string
- [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.
- Maintenance
Window Ionoscloud.Cluster Maintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- Name string
- [string] The name of the Kubernetes Cluster.
- Nat
Gateway stringIp - [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 string - [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.
- Public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- S3Buckets
List<Ionoscloud.
Cluster S3Bucket> - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- Viable
Node List<string>Pool Versions - [list] List of versions that may be used for node pools under this cluster
- Allow
Replace bool [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.- Api
Subnet []stringAllow Lists - [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.
- K8s
Version string - [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.
- Location string
- [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.
- Maintenance
Window ClusterMaintenance Window Args - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- Name string
- [string] The name of the Kubernetes Cluster.
- Nat
Gateway stringIp - [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 string - [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.
- Public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- S3Buckets
[]Cluster
S3Bucket Args - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- Viable
Node []stringPool Versions - [list] List of versions that may be used for node pools under this cluster
- allow
Replace Boolean [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.- api
Subnet List<String>Allow Lists - [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.
- k8s
Version String - [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.
- location String
- [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.
- maintenance
Window ClusterMaintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name String
- [string] The name of the Kubernetes Cluster.
- nat
Gateway StringIp - [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 String - [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.
- public_ Boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets
List<Cluster
S3Bucket> - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- viable
Node List<String>Pool Versions - [list] List of versions that may be used for node pools under this cluster
- allow
Replace boolean [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.- api
Subnet string[]Allow Lists - [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.
- k8s
Version string - [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.
- location string
- [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.
- maintenance
Window ClusterMaintenance Window - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name string
- [string] The name of the Kubernetes Cluster.
- nat
Gateway stringIp - [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 string - [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.
- public boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets
Cluster
S3Bucket[] - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- viable
Node string[]Pool Versions - [list] List of versions that may be used for node pools under this cluster
- allow_
replace bool [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.- api_
subnet_ Sequence[str]allow_ lists - [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.
- k8s_
version str - [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.
- location str
- [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.
- maintenance_
window ClusterMaintenance Window Args - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name str
- [string] The name of the Kubernetes Cluster.
- nat_
gateway_ strip - [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 str - [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.
- public bool
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3_
buckets Sequence[ClusterS3Bucket Args] - [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- viable_
node_ Sequence[str]pool_ versions - [list] List of versions that may be used for node pools under this cluster
- allow
Replace Boolean [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.- api
Subnet List<String>Allow Lists - [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.
- k8s
Version String - [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.
- location String
- [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.
- maintenance
Window Property Map - A maintenance window comprise of a day of the week and a time for maintenance to be allowed
- name String
- [string] The name of the Kubernetes Cluster.
- nat
Gateway StringIp - [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 String - [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.
- public Boolean
- [boolean] Indicates if the cluster is public or private. This attribute is immutable.
- s3Buckets List<Property Map>
- [list] List of IONOS Object Storage buckets configured for K8s usage. For now it contains only an IONOS Object Storage bucket used to store K8s API audit logs.
- viable
Node List<String>Pool Versions - [list] List of versions that may be used for node pools under this cluster
Supporting Types
ClusterMaintenanceWindow, ClusterMaintenanceWindowArgs
- Day
Of stringThe Week - [string] Day of the week when maintenance is allowed
- Time string
- [string] A clock time in the day when maintenance is allowed
- Day
Of stringThe Week - [string] Day of the week when maintenance is allowed
- Time string
- [string] A clock time in the day when maintenance is allowed
- day
Of StringThe Week - [string] Day of the week when maintenance is allowed
- time String
- [string] A clock time in the day when maintenance is allowed
- day
Of stringThe Week - [string] Day of the week when maintenance is allowed
- time string
- [string] A clock time in the day when maintenance is allowed
- day_
of_ strthe_ week - [string] Day of the week when maintenance is allowed
- time str
- [string] A clock time in the day when maintenance is allowed
- day
Of StringThe Week - [string] Day of the week when maintenance is allowed
- time String
- [string] A clock time in the day when maintenance is allowed
ClusterS3Bucket, ClusterS3BucketArgs
- Name string
- [string] The name of the Kubernetes Cluster.
- Name string
- [string] The name of the Kubernetes Cluster.
- name String
- [string] The name of the Kubernetes Cluster.
- name string
- [string] The name of the Kubernetes Cluster.
- name str
- [string] The name of the Kubernetes Cluster.
- name String
- [string] The name of the Kubernetes Cluster.
Import
A Kubernetes Cluster resource can be imported using its resource id
, e.g.
$ pulumi import ionoscloud:k8s/cluster:Cluster demo k8s_cluster uuid
This can be helpful when you want to import kubernetes clusters which you have already created manually or using other means, outside of pulumi.
⚠️ **_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
pulumi from doing a downgrade, as downgrading k8s_version
is not supported._**
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/pulumi-ionoscloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.