scaleway.k8s.v1 package

Submodules

scaleway.k8s.v1.api module

class scaleway.k8s.v1.api.K8SV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage Kubernetes Kapsule and Kosmos clusters.

add_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, acls: Optional[List[ACLRuleRequest]] = None) AddClusterACLRulesResponse

Add new ACLs. Add new ACL rules for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be added. :param region: Region to target. If none is passed will use default region from the config. :param acls: ACLs to add. :return: AddClusterACLRulesResponse

Usage:

result = api.add_cluster_acl_rules(
    cluster_id="example",
)
auth_external_node(*, pool_id: str, region: Optional[str] = None) ExternalNodeAuth

Authenticate Kosmos external node. Creates a newer Kosmos node and returns its token. This method is not intended to be called by end users but rather programmatically by the node-installer. :param pool_id: Pool the node will be attached to. :param region: Region to target. If none is passed will use default region from the config. :return: ExternalNodeAuth

Usage:

result = api.auth_external_node(
    pool_id="example",
)
create_cluster(*, type_: str, description: str, version: str, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, cni: CNI, pools: Optional[List[CreateClusterRequestPoolConfig]] = None, autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig] = None, auto_upgrade: Optional[CreateClusterRequestAutoUpgrade] = None, feature_gates: Optional[List[str]] = None, admission_plugins: Optional[List[str]] = None, open_id_connect_config: Optional[CreateClusterRequestOpenIDConnectConfig] = None, apiserver_cert_sans: Optional[List[str]] = None, private_network_id: Optional[str] = None) Cluster

Create a new Cluster. Create a new Kubernetes cluster in a Scaleway region. :param type_: Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16). :param description: Cluster description. :param version: Kubernetes version of the cluster. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID in which the cluster will be created. One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param project_id: Project ID in which the cluster will be created. One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param name: Cluster name. :param tags: Tags associated with the cluster. :param cni: Container Network Interface (CNI) plugin running in the cluster. :param pools: Pools created along with the cluster. :param autoscaler_config: Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/). :param auto_upgrade: Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version. :param feature_gates: List of feature gates to enable. :param admission_plugins: List of admission plugins to enable. :param open_id_connect_config: OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. :param apiserver_cert_sans: Additional Subject Alternative Names for the Kubernetes API server certificate. :param private_network_id: Private network ID for internal cluster communication (cannot be changed later). :return: Cluster

Usage:

result = api.create_cluster(
    type="example",
    description="example",
    version="example",
    cni=CNI.unknown_cni,
)
create_external_node(*, pool_id: str, region: Optional[str] = None) ExternalNode

Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is not intended to be called by end users but rather programmatically by the kapsule-node-agent. :param pool_id: :param region: Region to target. If none is passed will use default region from the config. :return: ExternalNode

Usage:

result = api.create_external_node(
    pool_id="example",
)
create_pool(*, region: Optional[str] = None, cluster_id: str, node_type: str, autoscaling: bool, size: int, name: Optional[str] = None, placement_group_id: Optional[str] = None, min_size: Optional[int] = None, autohealing: bool, public_ip_disabled: bool, max_size: Optional[int] = None, container_runtime: Optional[Runtime] = None, tags: Optional[List[str]] = None, kubelet_args: Optional[Dict[str, str]] = None, upgrade_policy: Optional[CreatePoolRequestUpgradePolicy] = None, zone: Optional[str] = None, root_volume_type: Optional[PoolVolumeType] = None, root_volume_size: Optional[int] = None) Pool

Create a new Pool in a Cluster. Create a new pool in a specific Kubernetes cluster. :param region: Region to target. If none is passed will use default region from the config. :param cluster_id: Cluster ID to which the pool will be attached. :param node_type: Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster. :param autoscaling: Defines whether the autoscaling feature is enabled for the pool. :param size: Size (number of nodes) of the pool. :param name: Pool name. :param placement_group_id: Placement group ID in which all the nodes of the pool will be created. :param min_size: Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. :param autohealing: Defines whether the autohealing feature is enabled for the pool. :param public_ip_disabled: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. :param max_size: Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. :param container_runtime: Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24. :param tags: Tags associated with the pool. :param kubelet_args: Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: Pool upgrade policy. :param zone: Zone in which the pool’s nodes will be spawned. :param root_volume_type: Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster. :param root_volume_size: System volume disk size. :return: Pool

Usage:

result = api.create_pool(
    cluster_id="example",
    node_type="example",
    autoscaling=False,
    size=1,
    autohealing=False,
    public_ip_disabled=False,
)
delete_acl_rule(*, acl_id: str, region: Optional[str] = None) None

Delete an existing ACL. :param acl_id: ID of the ACL rule to delete. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = api.delete_acl_rule(
    acl_id="example",
)
delete_cluster(*, cluster_id: str, with_additional_resources: bool, region: Optional[str] = None) Cluster

Delete a Cluster. Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster. :param cluster_id: ID of the cluster to delete. :param with_additional_resources: Defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.delete_cluster(
    cluster_id="example",
    with_additional_resources=False,
)
delete_node(*, node_id: str, skip_drain: bool, replace: bool, region: Optional[str] = None) Node

Delete a Node in a Cluster. Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to replace. :param skip_drain: Skip draining node from its workload (Note: this parameter is currently inactive). :param replace: Add a new node after the deletion of this node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.delete_node(
    node_id="example",
    skip_drain=False,
    replace=False,
)
delete_pool(*, pool_id: str, region: Optional[str] = None) Pool

Delete a Pool in a Cluster. Delete a specific pool from a cluster. Note that all the pool’s nodes will also be deleted. :param pool_id: ID of the pool to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.delete_pool(
    pool_id="example",
)
get_cluster(*, cluster_id: str, region: Optional[str] = None) Cluster

Get a Cluster. Retrieve information about a specific Kubernetes cluster. :param cluster_id: ID of the requested cluster. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.get_cluster(
    cluster_id="example",
)
get_node(*, node_id: str, region: Optional[str] = None) Node

Get a Node in a Cluster. Retrieve details about a specific Kubernetes Node. :param node_id: ID of the requested node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.get_node(
    node_id="example",
)
get_node_metadata(*, region: Optional[str] = None) NodeMetadata

Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node. This method is not intended to be called by end users but rather programmatically by the node-installer. :param region: Region to target. If none is passed will use default region from the config. :return: NodeMetadata

Usage:

result = api.get_node_metadata()
get_pool(*, pool_id: str, region: Optional[str] = None) Pool

Get a Pool in a Cluster. Retrieve details about a specific pool in a Kubernetes cluster. :param pool_id: ID of the requested pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.get_pool(
    pool_id="example",
)
get_version(*, version_name: str, region: Optional[str] = None) Version

Get a Version. Retrieve a specific Kubernetes version and its details. :param version_name: Requested version name. :param region: Region to target. If none is passed will use default region from the config. :return: Version

Usage:

result = api.get_version(
    version_name="example",
)
list_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListClusterACLRulesResponse

List ACLs. List ACLs for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be listed. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number for the returned ACLs. :param page_size: Maximum number of ACLs per page. :return: ListClusterACLRulesResponse

Usage:

result = api.list_cluster_acl_rules(
    cluster_id="example",
)
list_cluster_acl_rules_all(*, cluster_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ACLRule]

List ACLs. List ACLs for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be listed. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number for the returned ACLs. :param page_size: Maximum number of ACLs per page. :return: List[ACLRule]

Usage:

result = api.list_cluster_acl_rules_all(
    cluster_id="example",
)
list_cluster_available_types(*, cluster_id: str, region: Optional[str] = None) ListClusterAvailableTypesResponse

List available cluster types for a cluster. List the cluster types that a specific Kubernetes cluster is allowed to switch to. :param cluster_id: Cluster ID for which the available Kubernetes types will be listed. :param region: Region to target. If none is passed will use default region from the config. :return: ListClusterAvailableTypesResponse

Usage:

result = api.list_cluster_available_types(
    cluster_id="example",
)
list_cluster_available_versions(*, cluster_id: str, region: Optional[str] = None) ListClusterAvailableVersionsResponse

List available versions for a Cluster. List the versions that a specific Kubernetes cluster is allowed to upgrade to. Results will include every patch version greater than the current patch, as well as one minor version ahead of the current version. Any upgrade skipping a minor version will not work. :param cluster_id: Cluster ID for which the available Kubernetes versions will be listed. :param region: Region to target. If none is passed will use default region from the config. :return: ListClusterAvailableVersionsResponse

Usage:

result = api.list_cluster_available_versions(
    cluster_id="example",
)
list_cluster_types(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListClusterTypesResponse

List cluster types. List available cluster types and their technical details. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number, from the paginated results, to return for cluster-types. :param page_size: Maximum number of clusters per page. :return: ListClusterTypesResponse

Usage:

result = api.list_cluster_types()
list_cluster_types_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ClusterType]

List cluster types. List available cluster types and their technical details. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number, from the paginated results, to return for cluster-types. :param page_size: Maximum number of clusters per page. :return: List[ClusterType]

Usage:

result = api.list_cluster_types_all()
list_clusters(*, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListClustersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[ClusterStatus] = None, type_: Optional[str] = None, private_network_id: Optional[str] = None) ListClustersResponse

List Clusters. List all existing Kubernetes clusters in a specific region. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID on which to filter the returned clusters. :param project_id: Project ID on which to filter the returned clusters. :param order_by: Sort order of returned clusters. :param page: Page number to return for clusters, from the paginated results. :param page_size: Maximum number of clusters per page. :param name: Name to filter on, only clusters containing this substring in their name will be returned. :param status: Status to filter on, only clusters with this status will be returned. :param type_: Type to filter on, only clusters with this type will be returned. :param private_network_id: Private Network ID to filter on, only clusters within this Private Network will be returned. :return: ListClustersResponse

Usage:

result = api.list_clusters()
list_clusters_all(*, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListClustersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[ClusterStatus] = None, type_: Optional[str] = None, private_network_id: Optional[str] = None) List[Cluster]

List Clusters. List all existing Kubernetes clusters in a specific region. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID on which to filter the returned clusters. :param project_id: Project ID on which to filter the returned clusters. :param order_by: Sort order of returned clusters. :param page: Page number to return for clusters, from the paginated results. :param page_size: Maximum number of clusters per page. :param name: Name to filter on, only clusters containing this substring in their name will be returned. :param status: Status to filter on, only clusters with this status will be returned. :param type_: Type to filter on, only clusters with this type will be returned. :param private_network_id: Private Network ID to filter on, only clusters within this Private Network will be returned. :return: List[Cluster]

Usage:

result = api.list_clusters_all()
list_nodes(*, cluster_id: str, region: Optional[str] = None, pool_id: Optional[str] = None, order_by: Optional[ListNodesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[NodeStatus] = None) ListNodesResponse

List Nodes in a Cluster. List all the existing nodes for a specific Kubernetes cluster. :param cluster_id: Cluster ID from which the nodes will be listed from. :param region: Region to target. If none is passed will use default region from the config. :param pool_id: Pool ID on which to filter the returned nodes. :param order_by: Sort order of the returned nodes. :param page: Page number for the returned nodes. :param page_size: Maximum number of nodes per page. :param name: Name to filter on, only nodes containing this substring in their name will be returned. :param status: Status to filter on, only nodes with this status will be returned. :return: ListNodesResponse

Usage:

result = api.list_nodes(
    cluster_id="example",
)
list_nodes_all(*, cluster_id: str, region: Optional[str] = None, pool_id: Optional[str] = None, order_by: Optional[ListNodesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[NodeStatus] = None) List[Node]

List Nodes in a Cluster. List all the existing nodes for a specific Kubernetes cluster. :param cluster_id: Cluster ID from which the nodes will be listed from. :param region: Region to target. If none is passed will use default region from the config. :param pool_id: Pool ID on which to filter the returned nodes. :param order_by: Sort order of the returned nodes. :param page: Page number for the returned nodes. :param page_size: Maximum number of nodes per page. :param name: Name to filter on, only nodes containing this substring in their name will be returned. :param status: Status to filter on, only nodes with this status will be returned. :return: List[Node]

Usage:

result = api.list_nodes_all(
    cluster_id="example",
)
list_pools(*, cluster_id: str, region: Optional[str] = None, order_by: Optional[ListPoolsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[PoolStatus] = None) ListPoolsResponse

List Pools in a Cluster. List all the existing pools for a specific Kubernetes cluster. :param cluster_id: ID of the cluster whose pools will be listed. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of returned pools. :param page: Page number for the returned pools. :param page_size: Maximum number of pools per page. :param name: Name to filter on, only pools containing this substring in their name will be returned. :param status: Status to filter on, only pools with this status will be returned. :return: ListPoolsResponse

Usage:

result = api.list_pools(
    cluster_id="example",
)
list_pools_all(*, cluster_id: str, region: Optional[str] = None, order_by: Optional[ListPoolsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[PoolStatus] = None) List[Pool]

List Pools in a Cluster. List all the existing pools for a specific Kubernetes cluster. :param cluster_id: ID of the cluster whose pools will be listed. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of returned pools. :param page: Page number for the returned pools. :param page_size: Maximum number of pools per page. :param name: Name to filter on, only pools containing this substring in their name will be returned. :param status: Status to filter on, only pools with this status will be returned. :return: List[Pool]

Usage:

result = api.list_pools_all(
    cluster_id="example",
)
list_versions(*, region: Optional[str] = None) ListVersionsResponse

List all available Versions. List all available versions for the creation of a new Kubernetes cluster. :param region: Region to target. If none is passed will use default region from the config. :return: ListVersionsResponse

Usage:

result = api.list_versions()
migrate_cluster_to_sbscsi(*, cluster_id: str, region: Optional[str] = None) Cluster

Migrate a cluster to SBS CSI. Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. :param cluster_id: Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.migrate_cluster_to_sbscsi(
    cluster_id="example",
)
reboot_node(*, node_id: str, region: Optional[str] = None) Node

Reboot a Node in a Cluster. Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to reboot. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.reboot_node(
    node_id="example",
)
replace_node(*, node_id: str, region: Optional[str] = None) Node

Replace a Node in a Cluster. Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to replace. :param region: Region to target. If none is passed will use default region from the config. :return: Node :deprecated

Usage:

result = api.replace_node(
    node_id="example",
)
reset_cluster_admin_token(*, cluster_id: str, region: Optional[str] = None) None

Reset the admin token of a Cluster. Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster. :param cluster_id: Cluster ID on which the admin token will be renewed. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = api.reset_cluster_admin_token(
    cluster_id="example",
)
set_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, acls: Optional[List[ACLRuleRequest]] = None) SetClusterACLRulesResponse

Set new ACLs. Set new ACL rules for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be set. :param region: Region to target. If none is passed will use default region from the config. :param acls: ACLs to set. :return: SetClusterACLRulesResponse

Usage:

result = api.set_cluster_acl_rules(
    cluster_id="example",
)
set_cluster_type(*, cluster_id: str, type_: str, region: Optional[str] = None) Cluster

Change the Cluster type. Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the type field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster). :param cluster_id: ID of the cluster to migrate from one type to another. :param type_: Type of the cluster. Note that some migrations are not possible (please refer to product documentation). :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.set_cluster_type(
    cluster_id="example",
    type="example",
)
update_cluster(*, cluster_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig] = None, auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade] = None, feature_gates: Optional[List[str]] = None, admission_plugins: Optional[List[str]] = None, open_id_connect_config: Optional[UpdateClusterRequestOpenIDConnectConfig] = None, apiserver_cert_sans: Optional[List[str]] = None) Cluster

Update a Cluster. Update information on a specific Kubernetes cluster. You can update details such as its name, description, tags and configuration. To upgrade a cluster, you will need to use the dedicated endpoint. :param cluster_id: ID of the cluster to update. :param region: Region to target. If none is passed will use default region from the config. :param name: New external name for the cluster. :param description: New description for the cluster. :param tags: New tags associated with the cluster. :param autoscaler_config: New autoscaler config for the cluster. :param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields need to be set. :param feature_gates: List of feature gates to enable. :param admission_plugins: List of admission plugins to enable. :param open_id_connect_config: OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. :param apiserver_cert_sans: Additional Subject Alternative Names for the Kubernetes API server certificate. :return: Cluster

Usage:

result = api.update_cluster(
    cluster_id="example",
)
update_pool(*, pool_id: str, region: Optional[str] = None, autoscaling: Optional[bool] = None, size: Optional[int] = None, min_size: Optional[int] = None, max_size: Optional[int] = None, autohealing: Optional[bool] = None, tags: Optional[List[str]] = None, kubelet_args: Optional[Dict[str, str]] = None, upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy] = None) Pool

Update a Pool in a Cluster. Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. :param pool_id: ID of the pool to update. :param region: Region to target. If none is passed will use default region from the config. :param autoscaling: New value for the pool autoscaling enablement. :param size: New desired pool size. :param min_size: New minimum size for the pool. :param max_size: New maximum size for the pool. :param autohealing: New value for the pool autohealing enablement. :param tags: New tags associated with the pool. :param kubelet_args: New Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: New upgrade policy for the pool. :return: Pool

Usage:

result = api.update_pool(
    pool_id="example",
)
upgrade_cluster(*, cluster_id: str, version: str, upgrade_pools: bool, region: Optional[str] = None) Cluster

Upgrade a Cluster. Upgrade a specific Kubernetes cluster and possibly its associated pools to a specific and supported Kubernetes version. :param cluster_id: ID of the cluster to upgrade. :param version: New Kubernetes version of the cluster. Note that the version should either be a higher patch version of the same minor version or the direct minor version after the current one. :param upgrade_pools: Defines whether pools will also be upgraded once the control plane is upgraded. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.upgrade_cluster(
    cluster_id="example",
    version="example",
    upgrade_pools=False,
)
upgrade_pool(*, pool_id: str, version: str, region: Optional[str] = None) Pool

Upgrade a Pool in a Cluster. Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster’s version. :param pool_id: ID of the pool to upgrade. :param version: New Kubernetes version for the pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.upgrade_pool(
    pool_id="example",
    version="example",
)
wait_for_cluster(*, cluster_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Cluster, bool]] = None) Cluster

Get a Cluster. Retrieve information about a specific Kubernetes cluster. :param cluster_id: ID of the requested cluster. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.get_cluster(
    cluster_id="example",
)
wait_for_node(*, node_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Node, bool]] = None) Node

Get a Node in a Cluster. Retrieve details about a specific Kubernetes Node. :param node_id: ID of the requested node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.get_node(
    node_id="example",
)
wait_for_pool(*, pool_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Pool, bool]] = None) Pool

Get a Pool in a Cluster. Retrieve details about a specific pool in a Kubernetes cluster. :param pool_id: ID of the requested pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.get_pool(
    pool_id="example",
)

scaleway.k8s.v1.content module

scaleway.k8s.v1.content.CLUSTER_TRANSIENT_STATUSES: List[ClusterStatus] = [<ClusterStatus.CREATING: 'creating'>, <ClusterStatus.DELETING: 'deleting'>, <ClusterStatus.UPDATING: 'updating'>]

Lists transient statutes of the enum ClusterStatus.

scaleway.k8s.v1.content.NODE_TRANSIENT_STATUSES: List[NodeStatus] = [<NodeStatus.CREATING: 'creating'>, <NodeStatus.DELETING: 'deleting'>, <NodeStatus.REBOOTING: 'rebooting'>, <NodeStatus.UPGRADING: 'upgrading'>, <NodeStatus.STARTING: 'starting'>, <NodeStatus.REGISTERING: 'registering'>]

Lists transient statutes of the enum NodeStatus.

scaleway.k8s.v1.content.POOL_TRANSIENT_STATUSES: List[PoolStatus] = [<PoolStatus.DELETING: 'deleting'>, <PoolStatus.SCALING: 'scaling'>, <PoolStatus.UPGRADING: 'upgrading'>]

Lists transient statutes of the enum PoolStatus.

scaleway.k8s.v1.marshalling module

scaleway.k8s.v1.marshalling.marshal_ACLRuleRequest(request: ACLRuleRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_AddClusterACLRulesRequest(request: AddClusterACLRulesRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequest(request: CreateClusterRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequestAutoUpgrade(request: CreateClusterRequestAutoUpgrade, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequestAutoscalerConfig(request: CreateClusterRequestAutoscalerConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequestOpenIDConnectConfig(request: CreateClusterRequestOpenIDConnectConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequestPoolConfig(request: CreateClusterRequestPoolConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreateClusterRequestPoolConfigUpgradePolicy(request: CreateClusterRequestPoolConfigUpgradePolicy, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreatePoolRequest(request: CreatePoolRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_CreatePoolRequestUpgradePolicy(request: CreatePoolRequestUpgradePolicy, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_MaintenanceWindow(request: MaintenanceWindow, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_SetClusterACLRulesRequest(request: SetClusterACLRulesRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_SetClusterTypeRequest(request: SetClusterTypeRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdateClusterRequest(request: UpdateClusterRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdateClusterRequestAutoUpgrade(request: UpdateClusterRequestAutoUpgrade, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdateClusterRequestAutoscalerConfig(request: UpdateClusterRequestAutoscalerConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdateClusterRequestOpenIDConnectConfig(request: UpdateClusterRequestOpenIDConnectConfig, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdatePoolRequest(request: UpdatePoolRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpdatePoolRequestUpgradePolicy(request: UpdatePoolRequestUpgradePolicy, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpgradeClusterRequest(request: UpgradeClusterRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.marshal_UpgradePoolRequest(request: UpgradePoolRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.k8s.v1.marshalling.unmarshal_ACLRule(data: Any) ACLRule
scaleway.k8s.v1.marshalling.unmarshal_AddClusterACLRulesResponse(data: Any) AddClusterACLRulesResponse
scaleway.k8s.v1.marshalling.unmarshal_Cluster(data: Any) Cluster
scaleway.k8s.v1.marshalling.unmarshal_ClusterAutoUpgrade(data: Any) ClusterAutoUpgrade
scaleway.k8s.v1.marshalling.unmarshal_ClusterAutoscalerConfig(data: Any) ClusterAutoscalerConfig
scaleway.k8s.v1.marshalling.unmarshal_ClusterOpenIDConnectConfig(data: Any) ClusterOpenIDConnectConfig
scaleway.k8s.v1.marshalling.unmarshal_ClusterType(data: Any) ClusterType
scaleway.k8s.v1.marshalling.unmarshal_ExternalNode(data: Any) ExternalNode
scaleway.k8s.v1.marshalling.unmarshal_ExternalNodeAuth(data: Any) ExternalNodeAuth
scaleway.k8s.v1.marshalling.unmarshal_ExternalNodeCoreV1Taint(data: Any) ExternalNodeCoreV1Taint
scaleway.k8s.v1.marshalling.unmarshal_ListClusterACLRulesResponse(data: Any) ListClusterACLRulesResponse
scaleway.k8s.v1.marshalling.unmarshal_ListClusterAvailableTypesResponse(data: Any) ListClusterAvailableTypesResponse
scaleway.k8s.v1.marshalling.unmarshal_ListClusterAvailableVersionsResponse(data: Any) ListClusterAvailableVersionsResponse
scaleway.k8s.v1.marshalling.unmarshal_ListClusterTypesResponse(data: Any) ListClusterTypesResponse
scaleway.k8s.v1.marshalling.unmarshal_ListClustersResponse(data: Any) ListClustersResponse
scaleway.k8s.v1.marshalling.unmarshal_ListNodesResponse(data: Any) ListNodesResponse
scaleway.k8s.v1.marshalling.unmarshal_ListPoolsResponse(data: Any) ListPoolsResponse
scaleway.k8s.v1.marshalling.unmarshal_ListVersionsResponse(data: Any) ListVersionsResponse
scaleway.k8s.v1.marshalling.unmarshal_MaintenanceWindow(data: Any) MaintenanceWindow
scaleway.k8s.v1.marshalling.unmarshal_Node(data: Any) Node
scaleway.k8s.v1.marshalling.unmarshal_NodeMetadata(data: Any) NodeMetadata
scaleway.k8s.v1.marshalling.unmarshal_NodeMetadataCoreV1Taint(data: Any) NodeMetadataCoreV1Taint
scaleway.k8s.v1.marshalling.unmarshal_Pool(data: Any) Pool
scaleway.k8s.v1.marshalling.unmarshal_PoolUpgradePolicy(data: Any) PoolUpgradePolicy
scaleway.k8s.v1.marshalling.unmarshal_SetClusterACLRulesResponse(data: Any) SetClusterACLRulesResponse
scaleway.k8s.v1.marshalling.unmarshal_Version(data: Any) Version

scaleway.k8s.v1.types module

class scaleway.k8s.v1.types.ACLRule(id: 'str', description: 'str', ip: 'Optional[str]', scaleway_ranges: 'Optional[bool]')

Bases: object

description: str

Description of the ACL.

id: str

ID of the ACL rule.

ip: Optional[str]
scaleway_ranges: Optional[bool]
class scaleway.k8s.v1.types.ACLRuleRequest(description: 'str', ip: 'Optional[str]', scaleway_ranges: 'Optional[bool]')

Bases: object

description: str

Description of the ACL.

ip: Optional[str]
scaleway_ranges: Optional[bool]
class scaleway.k8s.v1.types.AddClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', acls: 'Optional[List[ACLRuleRequest]]')

Bases: object

acls: Optional[List[ACLRuleRequest]]

ACLs to add.

cluster_id: str

ID of the cluster whose ACLs will be added.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.AddClusterACLRulesResponse(rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

ACLs that were added.

class scaleway.k8s.v1.types.AuthExternalNodeRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

Pool the node will be attached to.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.AutoscalerEstimator(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BINPACKING = 'binpacking'
UNKNOWN_ESTIMATOR = 'unknown_estimator'
class scaleway.k8s.v1.types.AutoscalerExpander(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

LEAST_WASTE = 'least_waste'
MOST_PODS = 'most_pods'
PRICE = 'price'
PRIORITY = 'priority'
RANDOM = 'random'
UNKNOWN_EXPANDER = 'unknown_expander'
class scaleway.k8s.v1.types.CNI(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CALICO = 'calico'
CILIUM = 'cilium'
FLANNEL = 'flannel'
KILO = 'kilo'
NONE = 'none'
UNKNOWN_CNI = 'unknown_cni'
WEAVE = 'weave'
class scaleway.k8s.v1.types.Cluster(id: 'str', type_: 'str', name: 'str', status: 'ClusterStatus', version: 'str', region: 'Region', organization_id: 'str', project_id: 'str', tags: 'List[str]', cni: 'CNI', description: 'str', cluster_url: 'str', dns_wildcard: 'str', upgrade_available: 'bool', feature_gates: 'List[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', autoscaler_config: 'Optional[ClusterAutoscalerConfig]', auto_upgrade: 'Optional[ClusterAutoUpgrade]', admission_plugins: 'List[str]', apiserver_cert_sans: 'List[str]', open_id_connect_config: 'Optional[ClusterOpenIDConnectConfig]', private_network_id: 'Optional[str]', commitment_ends_at: 'Optional[datetime]', sbs_csi_enabled: 'Optional[bool]', acl_available: 'Optional[bool]')

Bases: object

acl_available: Optional[bool]

Defines whether ACL is available on the cluster.

admission_plugins: List[str]

List of enabled admission plugins.

apiserver_cert_sans: List[str]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[ClusterAutoUpgrade]

Auto upgrade configuration of the cluster.

autoscaler_config: Optional[ClusterAutoscalerConfig]

Autoscaler config for the cluster.

cluster_url: str

Kubernetes API server URL of the cluster.

cni: CNI

Container Network Interface (CNI) plugin running in the cluster.

commitment_ends_at: Optional[datetime]

Date on which it will be possible to switch to a smaller offer.

created_at: Optional[datetime]

Date on which the cluster was created.

description: str

Cluster description.

dns_wildcard: str

Wildcard DNS resolving all the ready cluster nodes.

feature_gates: List[str]

List of enabled feature gates.

id: str

Cluster ID.

name: str

Cluster name.

open_id_connect_config: Optional[ClusterOpenIDConnectConfig]

This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

organization_id: str

ID of the Organization owning the cluster.

private_network_id: Optional[str]

Private network ID for internal cluster communication.

project_id: str

ID of the Project owning the cluster.

region: str

Region in which the cluster is deployed.

sbs_csi_enabled: Optional[bool]

Defines whether the SBS-enabled CSI starting from v0.3 is installed on the cluster.

status: ClusterStatus

Status of the cluster.

tags: List[str]

Tags associated with the cluster.

type_: str

Cluster type.

updated_at: Optional[datetime]

Date on which the cluster was last updated.

upgrade_available: bool

Defines whether a new Kubernetes version is available.

version: str

Kubernetes version of the cluster.

class scaleway.k8s.v1.types.ClusterAutoUpgrade(enabled: 'bool', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enabled: bool

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.types.ClusterAutoscalerConfig(scale_down_disabled: 'bool', scale_down_delay_after_add: 'str', estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', ignore_daemonsets_utilization: 'bool', balance_similar_node_groups: 'bool', expendable_pods_priority_cutoff: 'int', scale_down_unneeded_time: 'str', scale_down_utilization_threshold: 'float', max_graceful_termination_sec: 'int')

Bases: object

balance_similar_node_groups: bool

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: int

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: bool

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: int

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: str

How long after scale up that scale down evaluation resumes.

scale_down_disabled: bool

Disable the cluster autoscaler.

scale_down_unneeded_time: str

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: float

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.types.ClusterOpenIDConnectConfig(issuer_url: 'str', client_id: 'str', username_claim: 'str', username_prefix: 'str', groups_claim: 'List[str]', groups_prefix: 'str', required_claim: 'List[str]')

Bases: object

client_id: str

A client ID that all tokens must be issued for.

groups_claim: List[str]

JWT claim to use as the user’s group.

groups_prefix: str

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: str

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: List[str]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: str

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: str

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.types.ClusterStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
POOL_REQUIRED = 'pool_required'
READY = 'ready'
UNKNOWN = 'unknown'
UPDATING = 'updating'
class scaleway.k8s.v1.types.ClusterType(name: 'str', availability: 'ClusterTypeAvailability', max_nodes: 'int', sla: 'float', resiliency: 'ClusterTypeResiliency', memory: 'int', dedicated: 'bool', audit_logs_supported: 'bool', max_etcd_size: 'int', commitment_delay: 'Optional[str]')

Bases: object

audit_logs_supported: bool

True if the offer allows activation of the audit log functionality. Please note that audit logs are sent to Cockpit.

availability: ClusterTypeAvailability

Cluster type availability.

commitment_delay: Optional[str]

Time period during which you can no longer switch to a lower offer.

dedicated: bool

Returns information if this offer uses dedicated resources.

max_etcd_size: int

Maximum amount of data that can be stored in etcd for the offer.

max_nodes: int

Maximum number of nodes supported by the offer.

memory: int

Max RAM allowed for the control plane.

name: str

Cluster type name.

resiliency: ClusterTypeResiliency

Resiliency offered by the offer.

sla: float

Value of the Service Level Agreement of the offer.

class scaleway.k8s.v1.types.ClusterTypeAvailability(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AVAILABLE = 'available'
SCARCE = 'scarce'
SHORTAGE = 'shortage'
class scaleway.k8s.v1.types.ClusterTypeResiliency(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

HIGH_AVAILABILITY = 'high_availability'
STANDARD = 'standard'
UNKNOWN_RESILIENCY = 'unknown_resiliency'
class scaleway.k8s.v1.types.CreateClusterRequest(type_: 'str', description: 'str', version: 'str', region: 'Optional[Region]', name: 'Optional[str]', tags: 'Optional[List[str]]', cni: 'CNI', pools: 'Optional[List[CreateClusterRequestPoolConfig]]', autoscaler_config: 'Optional[CreateClusterRequestAutoscalerConfig]', auto_upgrade: 'Optional[CreateClusterRequestAutoUpgrade]', feature_gates: 'Optional[List[str]]', admission_plugins: 'Optional[List[str]]', open_id_connect_config: 'Optional[CreateClusterRequestOpenIDConnectConfig]', apiserver_cert_sans: 'Optional[List[str]]', private_network_id: 'Optional[str]', project_id: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

admission_plugins: Optional[List[str]]

List of admission plugins to enable.

apiserver_cert_sans: Optional[List[str]]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[CreateClusterRequestAutoUpgrade]

Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version.

autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig]

Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/).

cni: CNI

Container Network Interface (CNI) plugin running in the cluster.

description: str

Cluster description.

feature_gates: Optional[List[str]]

List of feature gates to enable.

name: Optional[str]

Cluster name.

open_id_connect_config: Optional[CreateClusterRequestOpenIDConnectConfig]

OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

organization_id: Optional[str]
pools: Optional[List[CreateClusterRequestPoolConfig]]

Pools created along with the cluster.

private_network_id: Optional[str]

Private network ID for internal cluster communication (cannot be changed later).

project_id: Optional[str]
region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

Tags associated with the cluster.

type_: str

Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16).

version: str

Kubernetes version of the cluster.

class scaleway.k8s.v1.types.CreateClusterRequestAutoUpgrade(enable: 'bool', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enable: bool

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.types.CreateClusterRequestAutoscalerConfig(estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', scale_down_disabled: 'Optional[bool]', scale_down_delay_after_add: 'Optional[str]', ignore_daemonsets_utilization: 'Optional[bool]', balance_similar_node_groups: 'Optional[bool]', expendable_pods_priority_cutoff: 'Optional[int]', scale_down_unneeded_time: 'Optional[str]', scale_down_utilization_threshold: 'Optional[float]', max_graceful_termination_sec: 'Optional[int]')

Bases: object

balance_similar_node_groups: Optional[bool]

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: Optional[int]

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: Optional[bool]

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: Optional[int]

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: Optional[str]

How long after scale up that scale down evaluation resumes.

scale_down_disabled: Optional[bool]

Disable the cluster autoscaler.

scale_down_unneeded_time: Optional[str]

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: Optional[float]

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.types.CreateClusterRequestOpenIDConnectConfig(issuer_url: 'str', client_id: 'str', username_claim: 'Optional[str]', username_prefix: 'Optional[str]', groups_claim: 'Optional[List[str]]', groups_prefix: 'Optional[str]', required_claim: 'Optional[List[str]]')

Bases: object

client_id: str

A client ID that all tokens must be issued for.

groups_claim: Optional[List[str]]

JWT claim to use as the user’s group.

groups_prefix: Optional[str]

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: str

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: Optional[List[str]]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: Optional[str]

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: Optional[str]

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.types.CreateClusterRequestPoolConfig(name: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', container_runtime: 'Runtime', placement_group_id: 'Optional[str]', min_size: 'Optional[int]', max_size: 'Optional[int]', autohealing: 'bool', tags: 'List[str]', kubelet_args: 'Dict[str, str]', zone: 'Zone', root_volume_type: 'PoolVolumeType', public_ip_disabled: 'bool', upgrade_policy: 'Optional[CreateClusterRequestPoolConfigUpgradePolicy]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

container_runtime: Runtime

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

kubelet_args: Dict[str, str]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: Optional[int]

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: str

Name of the pool.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: PoolVolumeType

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

tags: List[str]

Tags associated with the pool.

upgrade_policy: Optional[CreateClusterRequestPoolConfigUpgradePolicy]

Pool upgrade policy.

zone: str

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.types.CreateClusterRequestPoolConfigUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]

The maximum number of nodes to be created during the upgrade.

max_unavailable: Optional[int]

The maximum number of nodes that can be not ready at the same time.

class scaleway.k8s.v1.types.CreateExternalNodeRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str
region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.CreatePoolRequest(region: 'Optional[Region]', cluster_id: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', name: 'Optional[str]', placement_group_id: 'Optional[str]', min_size: 'Optional[int]', autohealing: 'bool', public_ip_disabled: 'bool', max_size: 'Optional[int]', container_runtime: 'Optional[Runtime]', tags: 'Optional[List[str]]', kubelet_args: 'Optional[Dict[str, str]]', upgrade_policy: 'Optional[CreatePoolRequestUpgradePolicy]', zone: 'Optional[Zone]', root_volume_type: 'Optional[PoolVolumeType]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

cluster_id: str

Cluster ID to which the pool will be attached.

container_runtime: Optional[Runtime]

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

kubelet_args: Optional[Dict[str, str]]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: Optional[int]

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: Optional[str]

Pool name.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: Optional[PoolVolumeType]

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

tags: Optional[List[str]]

Tags associated with the pool.

upgrade_policy: Optional[CreatePoolRequestUpgradePolicy]

Pool upgrade policy.

zone: Optional[str]

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.types.CreatePoolRequestUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]
max_unavailable: Optional[int]
class scaleway.k8s.v1.types.DeleteACLRuleRequest(acl_id: 'str', region: 'Optional[Region]')

Bases: object

acl_id: str

ID of the ACL rule to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.DeleteClusterRequest(cluster_id: 'str', with_additional_resources: 'bool', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

with_additional_resources: bool

Defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted.

class scaleway.k8s.v1.types.DeleteNodeRequest(node_id: 'str', skip_drain: 'bool', replace: 'bool', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to replace.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

replace: bool

Add a new node after the deletion of this node.

skip_drain: bool

Skip draining node from its workload (Note: this parameter is currently inactive).

class scaleway.k8s.v1.types.DeletePoolRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the pool to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ExternalNode(id: 'str', name: 'str', cluster_url: 'str', pool_version: 'str', cluster_ca: 'str', kube_token: 'str', kubelet_config: 'str', external_ip: 'str', containerd_version: 'str', runc_version: 'str', cni_plugins_version: 'str', node_labels: 'Dict[str, str]', node_taints: 'List[ExternalNodeCoreV1Taint]')

Bases: object

cluster_ca: str
cluster_url: str
cni_plugins_version: str
containerd_version: str
external_ip: str
id: str
kube_token: str
kubelet_config: str
name: str
node_labels: Dict[str, str]
node_taints: List[ExternalNodeCoreV1Taint]
pool_version: str
runc_version: str
class scaleway.k8s.v1.types.ExternalNodeAuth(node_secret_key: 'str', metadata_url: 'str')

Bases: object

metadata_url: str
node_secret_key: str
class scaleway.k8s.v1.types.ExternalNodeCoreV1Taint(key: 'str', value: 'str', effect: 'str')

Bases: object

effect: str
key: str
value: str
class scaleway.k8s.v1.types.GetClusterKubeConfigRequest(cluster_id: 'str', region: 'Optional[Region]', redacted: 'Optional[bool]')

Bases: object

cluster_id: str

Cluster ID for which to download the kubeconfig.

redacted: Optional[bool]

Hide the legacy token from the kubeconfig.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.GetClusterRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the requested cluster.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.GetNodeMetadataRequest(region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.GetNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the requested node.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.GetPoolRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the requested pool.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.GetVersionRequest(version_name: 'str', region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

version_name: str

Requested version name.

class scaleway.k8s.v1.types.ListClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

cluster_id: str

ID of the cluster whose ACLs will be listed.

page: Optional[int]

Page number for the returned ACLs.

page_size: Optional[int]

Maximum number of ACLs per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ListClusterACLRulesResponse(total_count: 'int', rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

Paginated returned ACLs.

total_count: int

Total number of ACLs that exist for the cluster.

class scaleway.k8s.v1.types.ListClusterAvailableTypesRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the available Kubernetes types will be listed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ListClusterAvailableTypesResponse(cluster_types: 'List[ClusterType]', total_count: 'int')

Bases: object

cluster_types: List[ClusterType]

Available cluster types for the cluster.

total_count: int

Total number of types.

class scaleway.k8s.v1.types.ListClusterAvailableVersionsRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the available Kubernetes versions will be listed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ListClusterAvailableVersionsResponse(versions: 'List[Version]')

Bases: object

versions: List[Version]

Available Kubernetes versions for the cluster.

class scaleway.k8s.v1.types.ListClusterTypesRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]

Page number, from the paginated results, to return for cluster-types.

page_size: Optional[int]

Maximum number of clusters per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ListClusterTypesResponse(total_count: 'int', cluster_types: 'List[ClusterType]')

Bases: object

cluster_types: List[ClusterType]

Paginated returned cluster-types.

total_count: int

Total number of cluster-types.

class scaleway.k8s.v1.types.ListClustersRequest(region: 'Optional[Region]', organization_id: 'Optional[str]', project_id: 'Optional[str]', order_by: 'Optional[ListClustersRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[ClusterStatus]', type_: 'Optional[str]', private_network_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name to filter on, only clusters containing this substring in their name will be returned.

order_by: Optional[ListClustersRequestOrderBy]

Sort order of returned clusters.

organization_id: Optional[str]

Organization ID on which to filter the returned clusters.

page: Optional[int]

Page number to return for clusters, from the paginated results.

page_size: Optional[int]

Maximum number of clusters per page.

private_network_id: Optional[str]

Private Network ID to filter on, only clusters within this Private Network will be returned.

project_id: Optional[str]

Project ID on which to filter the returned clusters.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[ClusterStatus]

Status to filter on, only clusters with this status will be returned.

type_: Optional[str]

Type to filter on, only clusters with this type will be returned.

class scaleway.k8s.v1.types.ListClustersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
VERSION_ASC = 'version_asc'
VERSION_DESC = 'version_desc'
class scaleway.k8s.v1.types.ListClustersResponse(total_count: 'int', clusters: 'List[Cluster]')

Bases: object

clusters: List[Cluster]

Paginated returned clusters.

total_count: int

Total number of clusters.

class scaleway.k8s.v1.types.ListNodesRequest(cluster_id: 'str', region: 'Optional[Region]', pool_id: 'Optional[str]', order_by: 'Optional[ListNodesRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[NodeStatus]')

Bases: object

cluster_id: str

Cluster ID from which the nodes will be listed from.

name: Optional[str]

Name to filter on, only nodes containing this substring in their name will be returned.

order_by: Optional[ListNodesRequestOrderBy]

Sort order of the returned nodes.

page: Optional[int]

Page number for the returned nodes.

page_size: Optional[int]

Maximum number of nodes per page.

pool_id: Optional[str]

Pool ID on which to filter the returned nodes.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[NodeStatus]

Status to filter on, only nodes with this status will be returned.

class scaleway.k8s.v1.types.ListNodesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.k8s.v1.types.ListNodesResponse(total_count: 'int', nodes: 'List[Node]')

Bases: object

nodes: List[Node]

Paginated returned nodes.

total_count: int

Total number of nodes.

class scaleway.k8s.v1.types.ListPoolsRequest(cluster_id: 'str', region: 'Optional[Region]', order_by: 'Optional[ListPoolsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[PoolStatus]')

Bases: object

cluster_id: str

ID of the cluster whose pools will be listed.

name: Optional[str]

Name to filter on, only pools containing this substring in their name will be returned.

order_by: Optional[ListPoolsRequestOrderBy]

Sort order of returned pools.

page: Optional[int]

Page number for the returned pools.

page_size: Optional[int]

Maximum number of pools per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[PoolStatus]

Status to filter on, only pools with this status will be returned.

class scaleway.k8s.v1.types.ListPoolsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
VERSION_ASC = 'version_asc'
VERSION_DESC = 'version_desc'
class scaleway.k8s.v1.types.ListPoolsResponse(total_count: 'int', pools: 'List[Pool]')

Bases: object

pools: List[Pool]

Paginated returned pools.

total_count: int

Total number of pools that exists for the cluster.

class scaleway.k8s.v1.types.ListVersionsRequest(region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ListVersionsResponse(versions: 'List[Version]')

Bases: object

versions: List[Version]

Available Kubernetes versions.

class scaleway.k8s.v1.types.MaintenanceWindow(start_hour: 'int', day: 'MaintenanceWindowDayOfTheWeek')

Bases: object

day: MaintenanceWindowDayOfTheWeek

Day of the week for the maintenance window.

start_hour: int

Start time of the two-hour maintenance window.

class scaleway.k8s.v1.types.MaintenanceWindowDayOfTheWeek(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ANY = 'any'
FRIDAY = 'friday'
MONDAY = 'monday'
SATURDAY = 'saturday'
SUNDAY = 'sunday'
THURSDAY = 'thursday'
TUESDAY = 'tuesday'
WEDNESDAY = 'wednesday'
class scaleway.k8s.v1.types.MigrateClusterToSBSCSIRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.Node(id: 'str', pool_id: 'str', cluster_id: 'str', provider_id: 'str', region: 'Region', name: 'str', public_ip_v4: 'Optional[str]', public_ip_v6: 'Optional[str]', conditions: 'Optional[Dict[str, str]]', status: 'NodeStatus', error_message: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

cluster_id: str

Cluster ID of the node.

conditions: Optional[Dict[str, str]]

Conditions of the node. These conditions contain the Node Problem Detector conditions, as well as some in house conditions.

created_at: Optional[datetime]

Date on which the node was created.

error_message: Optional[str]

Details of the error, if any occurred when managing the node.

id: str

Node ID.

name: str

Name of the node.

pool_id: str

Pool ID of the node.

provider_id: str

Underlying instance ID. It is prefixed by instance type and location information (see https://pkg.go.dev/k8s.io/api/core/v1#NodeSpec.ProviderID).

public_ip_v4: Optional[str]

Public IPv4 address of the node.

public_ip_v6: Optional[str]

Public IPv6 address of the node.

region: str

Cluster region of the node.

status: NodeStatus

Status of the node.

updated_at: Optional[datetime]

Date on which the node was last updated.

class scaleway.k8s.v1.types.NodeMetadata(id: 'str', name: 'str', cluster_url: 'str', cluster_ca: 'str', credential_provider_config: 'str', pool_version: 'str', kubelet_config: 'str', node_labels: 'Dict[str, str]', node_taints: 'List[NodeMetadataCoreV1Taint]', has_gpu: 'bool', external_ip: 'str', repo_uri: 'str')

Bases: object

cluster_ca: str
cluster_url: str
credential_provider_config: str
external_ip: str
has_gpu: bool
id: str
kubelet_config: str
name: str
node_labels: Dict[str, str]
node_taints: List[NodeMetadataCoreV1Taint]
pool_version: str
repo_uri: str
class scaleway.k8s.v1.types.NodeMetadataCoreV1Taint(key: 'str', value: 'str', effect: 'str')

Bases: object

effect: str
key: str
value: str
class scaleway.k8s.v1.types.NodeStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
CREATION_ERROR = 'creation_error'
DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
NOT_READY = 'not_ready'
READY = 'ready'
REBOOTING = 'rebooting'
REGISTERING = 'registering'
STARTING = 'starting'
UNKNOWN = 'unknown'
UPGRADING = 'upgrading'
class scaleway.k8s.v1.types.Pool(id: 'str', cluster_id: 'str', name: 'str', status: 'PoolStatus', version: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', min_size: 'int', max_size: 'int', container_runtime: 'Runtime', autohealing: 'bool', tags: 'List[str]', kubelet_args: 'Dict[str, str]', zone: 'Zone', root_volume_type: 'PoolVolumeType', public_ip_disabled: 'bool', region: 'Region', placement_group_id: 'Optional[str]', upgrade_policy: 'Optional[PoolUpgradePolicy]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

cluster_id: str

Cluster ID of the pool.

container_runtime: Runtime

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

created_at: Optional[datetime]

Date on which the pool was created.

id: str

Pool ID.

kubelet_args: Dict[str, str]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: int

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: int

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: str

Pool name.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

region: str

Cluster region of the pool.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: PoolVolumeType

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

status: PoolStatus

Pool status.

tags: List[str]

Tags associated with the pool.

updated_at: Optional[datetime]

Date on which the pool was last updated.

upgrade_policy: Optional[PoolUpgradePolicy]

Pool upgrade policy.

version: str

Pool version.

zone: str

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.types.PoolStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
READY = 'ready'
SCALING = 'scaling'
UNKNOWN = 'unknown'
UPGRADING = 'upgrading'
WARNING = 'warning'
class scaleway.k8s.v1.types.PoolUpgradePolicy(max_unavailable: 'int', max_surge: 'int')

Bases: object

max_surge: int
max_unavailable: int
class scaleway.k8s.v1.types.PoolVolumeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

B_SSD = 'b_ssd'
DEFAULT_VOLUME_TYPE = 'default_volume_type'
L_SSD = 'l_ssd'
SBS_15K = 'sbs_15k'
SBS_5K = 'sbs_5k'
class scaleway.k8s.v1.types.RebootNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to reboot.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ReplaceNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to replace.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.ResetClusterAdminTokenRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID on which the admin token will be renewed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.Runtime(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CONTAINERD = 'containerd'
CRIO = 'crio'
DOCKER = 'docker'
UNKNOWN_RUNTIME = 'unknown_runtime'
class scaleway.k8s.v1.types.SetClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', acls: 'Optional[List[ACLRuleRequest]]')

Bases: object

acls: Optional[List[ACLRuleRequest]]

ACLs to set.

cluster_id: str

ID of the cluster whose ACLs will be set.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.types.SetClusterACLRulesResponse(rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

ACLs that were set.

class scaleway.k8s.v1.types.SetClusterTypeRequest(cluster_id: 'str', type_: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to migrate from one type to another.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

type_: str

Type of the cluster. Note that some migrations are not possible (please refer to product documentation).

class scaleway.k8s.v1.types.UpdateClusterRequest(cluster_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]', autoscaler_config: 'Optional[UpdateClusterRequestAutoscalerConfig]', auto_upgrade: 'Optional[UpdateClusterRequestAutoUpgrade]', feature_gates: 'Optional[List[str]]', admission_plugins: 'Optional[List[str]]', open_id_connect_config: 'Optional[UpdateClusterRequestOpenIDConnectConfig]', apiserver_cert_sans: 'Optional[List[str]]')

Bases: object

admission_plugins: Optional[List[str]]

List of admission plugins to enable.

apiserver_cert_sans: Optional[List[str]]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade]

New auto upgrade configuration for the cluster. Note that all fields need to be set.

autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig]

New autoscaler config for the cluster.

cluster_id: str

ID of the cluster to update.

description: Optional[str]

New description for the cluster.

feature_gates: Optional[List[str]]

List of feature gates to enable.

name: Optional[str]

New external name for the cluster.

open_id_connect_config: Optional[UpdateClusterRequestOpenIDConnectConfig]

OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

New tags associated with the cluster.

class scaleway.k8s.v1.types.UpdateClusterRequestAutoUpgrade(enable: 'Optional[bool]', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enable: Optional[bool]

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.types.UpdateClusterRequestAutoscalerConfig(estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', scale_down_disabled: 'Optional[bool]', scale_down_delay_after_add: 'Optional[str]', ignore_daemonsets_utilization: 'Optional[bool]', balance_similar_node_groups: 'Optional[bool]', expendable_pods_priority_cutoff: 'Optional[int]', scale_down_unneeded_time: 'Optional[str]', scale_down_utilization_threshold: 'Optional[float]', max_graceful_termination_sec: 'Optional[int]')

Bases: object

balance_similar_node_groups: Optional[bool]

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: Optional[int]

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: Optional[bool]

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: Optional[int]

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: Optional[str]

How long after scale up that scale down evaluation resumes.

scale_down_disabled: Optional[bool]

Disable the cluster autoscaler.

scale_down_unneeded_time: Optional[str]

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: Optional[float]

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.types.UpdateClusterRequestOpenIDConnectConfig(issuer_url: 'Optional[str]', client_id: 'Optional[str]', username_claim: 'Optional[str]', username_prefix: 'Optional[str]', groups_claim: 'Optional[List[str]]', groups_prefix: 'Optional[str]', required_claim: 'Optional[List[str]]')

Bases: object

client_id: Optional[str]

A client ID that all tokens must be issued for.

groups_claim: Optional[List[str]]

JWT claim to use as the user’s group.

groups_prefix: Optional[str]

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: Optional[str]

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: Optional[List[str]]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: Optional[str]

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: Optional[str]

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.types.UpdatePoolRequest(pool_id: 'str', region: 'Optional[Region]', autoscaling: 'Optional[bool]', size: 'Optional[int]', min_size: 'Optional[int]', max_size: 'Optional[int]', autohealing: 'Optional[bool]', tags: 'Optional[List[str]]', kubelet_args: 'Optional[Dict[str, str]]', upgrade_policy: 'Optional[UpdatePoolRequestUpgradePolicy]')

Bases: object

autohealing: Optional[bool]

New value for the pool autohealing enablement.

autoscaling: Optional[bool]

New value for the pool autoscaling enablement.

kubelet_args: Optional[Dict[str, str]]

New Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

New maximum size for the pool.

min_size: Optional[int]

New minimum size for the pool.

pool_id: str

ID of the pool to update.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

size: Optional[int]

New desired pool size.

tags: Optional[List[str]]

New tags associated with the pool.

upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy]

New upgrade policy for the pool.

class scaleway.k8s.v1.types.UpdatePoolRequestUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]
max_unavailable: Optional[int]
class scaleway.k8s.v1.types.UpgradeClusterRequest(cluster_id: 'str', version: 'str', upgrade_pools: 'bool', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to upgrade.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

upgrade_pools: bool

Defines whether pools will also be upgraded once the control plane is upgraded.

version: str

New Kubernetes version of the cluster. Note that the version should either be a higher patch version of the same minor version or the direct minor version after the current one.

class scaleway.k8s.v1.types.UpgradePoolRequest(pool_id: 'str', version: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the pool to upgrade.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

version: str

New Kubernetes version for the pool.

class scaleway.k8s.v1.types.Version(name: 'str', label: 'str', region: 'Region', available_cnis: 'List[CNI]', available_container_runtimes: 'List[Runtime]', available_feature_gates: 'List[str]', available_admission_plugins: 'List[str]', available_kubelet_args: 'Dict[str, str]')

Bases: object

available_admission_plugins: List[str]

Supported admission plugins for this version.

available_cnis: List[CNI]

Supported Container Network Interface (CNI) plugins for this version.

available_container_runtimes: List[Runtime]

Supported container runtimes for this version.

available_feature_gates: List[str]

Supported feature gates for this version.

available_kubelet_args: Dict[str, str]

Supported kubelet arguments for this version.

label: str

Label of the Kubernetes version.

name: str

Name of the Kubernetes version.

region: str

Region in which this version is available.

Module contents

class scaleway.k8s.v1.ACLRule(id: 'str', description: 'str', ip: 'Optional[str]', scaleway_ranges: 'Optional[bool]')

Bases: object

description: str

Description of the ACL.

id: str

ID of the ACL rule.

ip: Optional[str]
scaleway_ranges: Optional[bool]
class scaleway.k8s.v1.ACLRuleRequest(description: 'str', ip: 'Optional[str]', scaleway_ranges: 'Optional[bool]')

Bases: object

description: str

Description of the ACL.

ip: Optional[str]
scaleway_ranges: Optional[bool]
class scaleway.k8s.v1.AddClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', acls: 'Optional[List[ACLRuleRequest]]')

Bases: object

acls: Optional[List[ACLRuleRequest]]

ACLs to add.

cluster_id: str

ID of the cluster whose ACLs will be added.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.AddClusterACLRulesResponse(rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

ACLs that were added.

class scaleway.k8s.v1.AuthExternalNodeRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

Pool the node will be attached to.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.AutoscalerEstimator(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

BINPACKING = 'binpacking'
UNKNOWN_ESTIMATOR = 'unknown_estimator'
class scaleway.k8s.v1.AutoscalerExpander(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

LEAST_WASTE = 'least_waste'
MOST_PODS = 'most_pods'
PRICE = 'price'
PRIORITY = 'priority'
RANDOM = 'random'
UNKNOWN_EXPANDER = 'unknown_expander'
class scaleway.k8s.v1.CNI(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CALICO = 'calico'
CILIUM = 'cilium'
FLANNEL = 'flannel'
KILO = 'kilo'
NONE = 'none'
UNKNOWN_CNI = 'unknown_cni'
WEAVE = 'weave'
class scaleway.k8s.v1.Cluster(id: 'str', type_: 'str', name: 'str', status: 'ClusterStatus', version: 'str', region: 'Region', organization_id: 'str', project_id: 'str', tags: 'List[str]', cni: 'CNI', description: 'str', cluster_url: 'str', dns_wildcard: 'str', upgrade_available: 'bool', feature_gates: 'List[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', autoscaler_config: 'Optional[ClusterAutoscalerConfig]', auto_upgrade: 'Optional[ClusterAutoUpgrade]', admission_plugins: 'List[str]', apiserver_cert_sans: 'List[str]', open_id_connect_config: 'Optional[ClusterOpenIDConnectConfig]', private_network_id: 'Optional[str]', commitment_ends_at: 'Optional[datetime]', sbs_csi_enabled: 'Optional[bool]', acl_available: 'Optional[bool]')

Bases: object

acl_available: Optional[bool]

Defines whether ACL is available on the cluster.

admission_plugins: List[str]

List of enabled admission plugins.

apiserver_cert_sans: List[str]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[ClusterAutoUpgrade]

Auto upgrade configuration of the cluster.

autoscaler_config: Optional[ClusterAutoscalerConfig]

Autoscaler config for the cluster.

cluster_url: str

Kubernetes API server URL of the cluster.

cni: CNI

Container Network Interface (CNI) plugin running in the cluster.

commitment_ends_at: Optional[datetime]

Date on which it will be possible to switch to a smaller offer.

created_at: Optional[datetime]

Date on which the cluster was created.

description: str

Cluster description.

dns_wildcard: str

Wildcard DNS resolving all the ready cluster nodes.

feature_gates: List[str]

List of enabled feature gates.

id: str

Cluster ID.

name: str

Cluster name.

open_id_connect_config: Optional[ClusterOpenIDConnectConfig]

This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

organization_id: str

ID of the Organization owning the cluster.

private_network_id: Optional[str]

Private network ID for internal cluster communication.

project_id: str

ID of the Project owning the cluster.

region: str

Region in which the cluster is deployed.

sbs_csi_enabled: Optional[bool]

Defines whether the SBS-enabled CSI starting from v0.3 is installed on the cluster.

status: ClusterStatus

Status of the cluster.

tags: List[str]

Tags associated with the cluster.

type_: str

Cluster type.

updated_at: Optional[datetime]

Date on which the cluster was last updated.

upgrade_available: bool

Defines whether a new Kubernetes version is available.

version: str

Kubernetes version of the cluster.

class scaleway.k8s.v1.ClusterAutoUpgrade(enabled: 'bool', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enabled: bool

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.ClusterAutoscalerConfig(scale_down_disabled: 'bool', scale_down_delay_after_add: 'str', estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', ignore_daemonsets_utilization: 'bool', balance_similar_node_groups: 'bool', expendable_pods_priority_cutoff: 'int', scale_down_unneeded_time: 'str', scale_down_utilization_threshold: 'float', max_graceful_termination_sec: 'int')

Bases: object

balance_similar_node_groups: bool

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: int

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: bool

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: int

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: str

How long after scale up that scale down evaluation resumes.

scale_down_disabled: bool

Disable the cluster autoscaler.

scale_down_unneeded_time: str

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: float

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.ClusterOpenIDConnectConfig(issuer_url: 'str', client_id: 'str', username_claim: 'str', username_prefix: 'str', groups_claim: 'List[str]', groups_prefix: 'str', required_claim: 'List[str]')

Bases: object

client_id: str

A client ID that all tokens must be issued for.

groups_claim: List[str]

JWT claim to use as the user’s group.

groups_prefix: str

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: str

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: List[str]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: str

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: str

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.ClusterStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
POOL_REQUIRED = 'pool_required'
READY = 'ready'
UNKNOWN = 'unknown'
UPDATING = 'updating'
class scaleway.k8s.v1.ClusterType(name: 'str', availability: 'ClusterTypeAvailability', max_nodes: 'int', sla: 'float', resiliency: 'ClusterTypeResiliency', memory: 'int', dedicated: 'bool', audit_logs_supported: 'bool', max_etcd_size: 'int', commitment_delay: 'Optional[str]')

Bases: object

audit_logs_supported: bool

True if the offer allows activation of the audit log functionality. Please note that audit logs are sent to Cockpit.

availability: ClusterTypeAvailability

Cluster type availability.

commitment_delay: Optional[str]

Time period during which you can no longer switch to a lower offer.

dedicated: bool

Returns information if this offer uses dedicated resources.

max_etcd_size: int

Maximum amount of data that can be stored in etcd for the offer.

max_nodes: int

Maximum number of nodes supported by the offer.

memory: int

Max RAM allowed for the control plane.

name: str

Cluster type name.

resiliency: ClusterTypeResiliency

Resiliency offered by the offer.

sla: float

Value of the Service Level Agreement of the offer.

class scaleway.k8s.v1.ClusterTypeAvailability(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AVAILABLE = 'available'
SCARCE = 'scarce'
SHORTAGE = 'shortage'
class scaleway.k8s.v1.ClusterTypeResiliency(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

HIGH_AVAILABILITY = 'high_availability'
STANDARD = 'standard'
UNKNOWN_RESILIENCY = 'unknown_resiliency'
class scaleway.k8s.v1.CreateClusterRequest(type_: 'str', description: 'str', version: 'str', region: 'Optional[Region]', name: 'Optional[str]', tags: 'Optional[List[str]]', cni: 'CNI', pools: 'Optional[List[CreateClusterRequestPoolConfig]]', autoscaler_config: 'Optional[CreateClusterRequestAutoscalerConfig]', auto_upgrade: 'Optional[CreateClusterRequestAutoUpgrade]', feature_gates: 'Optional[List[str]]', admission_plugins: 'Optional[List[str]]', open_id_connect_config: 'Optional[CreateClusterRequestOpenIDConnectConfig]', apiserver_cert_sans: 'Optional[List[str]]', private_network_id: 'Optional[str]', project_id: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

admission_plugins: Optional[List[str]]

List of admission plugins to enable.

apiserver_cert_sans: Optional[List[str]]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[CreateClusterRequestAutoUpgrade]

Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version.

autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig]

Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/).

cni: CNI

Container Network Interface (CNI) plugin running in the cluster.

description: str

Cluster description.

feature_gates: Optional[List[str]]

List of feature gates to enable.

name: Optional[str]

Cluster name.

open_id_connect_config: Optional[CreateClusterRequestOpenIDConnectConfig]

OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

organization_id: Optional[str]
pools: Optional[List[CreateClusterRequestPoolConfig]]

Pools created along with the cluster.

private_network_id: Optional[str]

Private network ID for internal cluster communication (cannot be changed later).

project_id: Optional[str]
region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

Tags associated with the cluster.

type_: str

Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16).

version: str

Kubernetes version of the cluster.

class scaleway.k8s.v1.CreateClusterRequestAutoUpgrade(enable: 'bool', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enable: bool

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.CreateClusterRequestAutoscalerConfig(estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', scale_down_disabled: 'Optional[bool]', scale_down_delay_after_add: 'Optional[str]', ignore_daemonsets_utilization: 'Optional[bool]', balance_similar_node_groups: 'Optional[bool]', expendable_pods_priority_cutoff: 'Optional[int]', scale_down_unneeded_time: 'Optional[str]', scale_down_utilization_threshold: 'Optional[float]', max_graceful_termination_sec: 'Optional[int]')

Bases: object

balance_similar_node_groups: Optional[bool]

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: Optional[int]

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: Optional[bool]

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: Optional[int]

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: Optional[str]

How long after scale up that scale down evaluation resumes.

scale_down_disabled: Optional[bool]

Disable the cluster autoscaler.

scale_down_unneeded_time: Optional[str]

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: Optional[float]

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.CreateClusterRequestOpenIDConnectConfig(issuer_url: 'str', client_id: 'str', username_claim: 'Optional[str]', username_prefix: 'Optional[str]', groups_claim: 'Optional[List[str]]', groups_prefix: 'Optional[str]', required_claim: 'Optional[List[str]]')

Bases: object

client_id: str

A client ID that all tokens must be issued for.

groups_claim: Optional[List[str]]

JWT claim to use as the user’s group.

groups_prefix: Optional[str]

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: str

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: Optional[List[str]]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: Optional[str]

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: Optional[str]

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.CreateClusterRequestPoolConfig(name: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', container_runtime: 'Runtime', placement_group_id: 'Optional[str]', min_size: 'Optional[int]', max_size: 'Optional[int]', autohealing: 'bool', tags: 'List[str]', kubelet_args: 'Dict[str, str]', zone: 'Zone', root_volume_type: 'PoolVolumeType', public_ip_disabled: 'bool', upgrade_policy: 'Optional[CreateClusterRequestPoolConfigUpgradePolicy]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

container_runtime: Runtime

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

kubelet_args: Dict[str, str]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: Optional[int]

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: str

Name of the pool.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: PoolVolumeType

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

tags: List[str]

Tags associated with the pool.

upgrade_policy: Optional[CreateClusterRequestPoolConfigUpgradePolicy]

Pool upgrade policy.

zone: str

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.CreateClusterRequestPoolConfigUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]

The maximum number of nodes to be created during the upgrade.

max_unavailable: Optional[int]

The maximum number of nodes that can be not ready at the same time.

class scaleway.k8s.v1.CreateExternalNodeRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str
region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.CreatePoolRequest(region: 'Optional[Region]', cluster_id: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', name: 'Optional[str]', placement_group_id: 'Optional[str]', min_size: 'Optional[int]', autohealing: 'bool', public_ip_disabled: 'bool', max_size: 'Optional[int]', container_runtime: 'Optional[Runtime]', tags: 'Optional[List[str]]', kubelet_args: 'Optional[Dict[str, str]]', upgrade_policy: 'Optional[CreatePoolRequestUpgradePolicy]', zone: 'Optional[Zone]', root_volume_type: 'Optional[PoolVolumeType]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

cluster_id: str

Cluster ID to which the pool will be attached.

container_runtime: Optional[Runtime]

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

kubelet_args: Optional[Dict[str, str]]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: Optional[int]

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: Optional[str]

Pool name.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: Optional[PoolVolumeType]

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

tags: Optional[List[str]]

Tags associated with the pool.

upgrade_policy: Optional[CreatePoolRequestUpgradePolicy]

Pool upgrade policy.

zone: Optional[str]

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.CreatePoolRequestUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]
max_unavailable: Optional[int]
class scaleway.k8s.v1.DeleteACLRuleRequest(acl_id: 'str', region: 'Optional[Region]')

Bases: object

acl_id: str

ID of the ACL rule to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.DeleteClusterRequest(cluster_id: 'str', with_additional_resources: 'bool', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

with_additional_resources: bool

Defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted.

class scaleway.k8s.v1.DeleteNodeRequest(node_id: 'str', skip_drain: 'bool', replace: 'bool', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to replace.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

replace: bool

Add a new node after the deletion of this node.

skip_drain: bool

Skip draining node from its workload (Note: this parameter is currently inactive).

class scaleway.k8s.v1.DeletePoolRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the pool to delete.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ExternalNode(id: 'str', name: 'str', cluster_url: 'str', pool_version: 'str', cluster_ca: 'str', kube_token: 'str', kubelet_config: 'str', external_ip: 'str', containerd_version: 'str', runc_version: 'str', cni_plugins_version: 'str', node_labels: 'Dict[str, str]', node_taints: 'List[ExternalNodeCoreV1Taint]')

Bases: object

cluster_ca: str
cluster_url: str
cni_plugins_version: str
containerd_version: str
external_ip: str
id: str
kube_token: str
kubelet_config: str
name: str
node_labels: Dict[str, str]
node_taints: List[ExternalNodeCoreV1Taint]
pool_version: str
runc_version: str
class scaleway.k8s.v1.ExternalNodeAuth(node_secret_key: 'str', metadata_url: 'str')

Bases: object

metadata_url: str
node_secret_key: str
class scaleway.k8s.v1.ExternalNodeCoreV1Taint(key: 'str', value: 'str', effect: 'str')

Bases: object

effect: str
key: str
value: str
class scaleway.k8s.v1.GetClusterKubeConfigRequest(cluster_id: 'str', region: 'Optional[Region]', redacted: 'Optional[bool]')

Bases: object

cluster_id: str

Cluster ID for which to download the kubeconfig.

redacted: Optional[bool]

Hide the legacy token from the kubeconfig.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.GetClusterRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the requested cluster.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.GetNodeMetadataRequest(region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.GetNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the requested node.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.GetPoolRequest(pool_id: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the requested pool.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.GetVersionRequest(version_name: 'str', region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

version_name: str

Requested version name.

class scaleway.k8s.v1.K8SV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage Kubernetes Kapsule and Kosmos clusters.

add_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, acls: Optional[List[ACLRuleRequest]] = None) AddClusterACLRulesResponse

Add new ACLs. Add new ACL rules for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be added. :param region: Region to target. If none is passed will use default region from the config. :param acls: ACLs to add. :return: AddClusterACLRulesResponse

Usage:

result = api.add_cluster_acl_rules(
    cluster_id="example",
)
auth_external_node(*, pool_id: str, region: Optional[str] = None) ExternalNodeAuth

Authenticate Kosmos external node. Creates a newer Kosmos node and returns its token. This method is not intended to be called by end users but rather programmatically by the node-installer. :param pool_id: Pool the node will be attached to. :param region: Region to target. If none is passed will use default region from the config. :return: ExternalNodeAuth

Usage:

result = api.auth_external_node(
    pool_id="example",
)
create_cluster(*, type_: str, description: str, version: str, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, name: Optional[str] = None, tags: Optional[List[str]] = None, cni: CNI, pools: Optional[List[CreateClusterRequestPoolConfig]] = None, autoscaler_config: Optional[CreateClusterRequestAutoscalerConfig] = None, auto_upgrade: Optional[CreateClusterRequestAutoUpgrade] = None, feature_gates: Optional[List[str]] = None, admission_plugins: Optional[List[str]] = None, open_id_connect_config: Optional[CreateClusterRequestOpenIDConnectConfig] = None, apiserver_cert_sans: Optional[List[str]] = None, private_network_id: Optional[str] = None) Cluster

Create a new Cluster. Create a new Kubernetes cluster in a Scaleway region. :param type_: Type of the cluster (possible values are kapsule, multicloud, kapsule-dedicated-8, kapsule-dedicated-16). :param description: Cluster description. :param version: Kubernetes version of the cluster. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID in which the cluster will be created. One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param project_id: Project ID in which the cluster will be created. One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param name: Cluster name. :param tags: Tags associated with the cluster. :param cni: Container Network Interface (CNI) plugin running in the cluster. :param pools: Pools created along with the cluster. :param autoscaler_config: Autoscaler configuration for the cluster. It allows you to set (to an extent) your preferred autoscaler configuration, which is an implementation of the cluster-autoscaler (https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/). :param auto_upgrade: Auto upgrade configuration of the cluster. This configuration enables to set a specific 2-hour time window in which the cluster can be automatically updated to the latest patch version. :param feature_gates: List of feature gates to enable. :param admission_plugins: List of admission plugins to enable. :param open_id_connect_config: OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. :param apiserver_cert_sans: Additional Subject Alternative Names for the Kubernetes API server certificate. :param private_network_id: Private network ID for internal cluster communication (cannot be changed later). :return: Cluster

Usage:

result = api.create_cluster(
    type="example",
    description="example",
    version="example",
    cni=CNI.unknown_cni,
)
create_external_node(*, pool_id: str, region: Optional[str] = None) ExternalNode

Create a Kosmos node. Retrieve metadata for a Kosmos node. This method is not intended to be called by end users but rather programmatically by the kapsule-node-agent. :param pool_id: :param region: Region to target. If none is passed will use default region from the config. :return: ExternalNode

Usage:

result = api.create_external_node(
    pool_id="example",
)
create_pool(*, region: Optional[str] = None, cluster_id: str, node_type: str, autoscaling: bool, size: int, name: Optional[str] = None, placement_group_id: Optional[str] = None, min_size: Optional[int] = None, autohealing: bool, public_ip_disabled: bool, max_size: Optional[int] = None, container_runtime: Optional[Runtime] = None, tags: Optional[List[str]] = None, kubelet_args: Optional[Dict[str, str]] = None, upgrade_policy: Optional[CreatePoolRequestUpgradePolicy] = None, zone: Optional[str] = None, root_volume_type: Optional[PoolVolumeType] = None, root_volume_size: Optional[int] = None) Pool

Create a new Pool in a Cluster. Create a new pool in a specific Kubernetes cluster. :param region: Region to target. If none is passed will use default region from the config. :param cluster_id: Cluster ID to which the pool will be attached. :param node_type: Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster. :param autoscaling: Defines whether the autoscaling feature is enabled for the pool. :param size: Size (number of nodes) of the pool. :param name: Pool name. :param placement_group_id: Placement group ID in which all the nodes of the pool will be created. :param min_size: Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. :param autohealing: Defines whether the autohealing feature is enabled for the pool. :param public_ip_disabled: Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway. :param max_size: Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool. :param container_runtime: Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24. :param tags: Tags associated with the pool. :param kubelet_args: Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: Pool upgrade policy. :param zone: Zone in which the pool’s nodes will be spawned. :param root_volume_type: Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster. :param root_volume_size: System volume disk size. :return: Pool

Usage:

result = api.create_pool(
    cluster_id="example",
    node_type="example",
    autoscaling=False,
    size=1,
    autohealing=False,
    public_ip_disabled=False,
)
delete_acl_rule(*, acl_id: str, region: Optional[str] = None) None

Delete an existing ACL. :param acl_id: ID of the ACL rule to delete. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = api.delete_acl_rule(
    acl_id="example",
)
delete_cluster(*, cluster_id: str, with_additional_resources: bool, region: Optional[str] = None) Cluster

Delete a Cluster. Delete a specific Kubernetes cluster and all its associated pools and nodes. Note that this method will not delete any Load Balancer or Block Volume that are associated with the cluster. :param cluster_id: ID of the cluster to delete. :param with_additional_resources: Defines whether all volumes (including retain volume type), empty Private Networks and Load Balancers with a name starting with the cluster ID will also be deleted. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.delete_cluster(
    cluster_id="example",
    with_additional_resources=False,
)
delete_node(*, node_id: str, skip_drain: bool, replace: bool, region: Optional[str] = None) Node

Delete a Node in a Cluster. Delete a specific Node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to replace. :param skip_drain: Skip draining node from its workload (Note: this parameter is currently inactive). :param replace: Add a new node after the deletion of this node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.delete_node(
    node_id="example",
    skip_drain=False,
    replace=False,
)
delete_pool(*, pool_id: str, region: Optional[str] = None) Pool

Delete a Pool in a Cluster. Delete a specific pool from a cluster. Note that all the pool’s nodes will also be deleted. :param pool_id: ID of the pool to delete. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.delete_pool(
    pool_id="example",
)
get_cluster(*, cluster_id: str, region: Optional[str] = None) Cluster

Get a Cluster. Retrieve information about a specific Kubernetes cluster. :param cluster_id: ID of the requested cluster. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.get_cluster(
    cluster_id="example",
)
get_node(*, node_id: str, region: Optional[str] = None) Node

Get a Node in a Cluster. Retrieve details about a specific Kubernetes Node. :param node_id: ID of the requested node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.get_node(
    node_id="example",
)
get_node_metadata(*, region: Optional[str] = None) NodeMetadata

Fetch node metadata. Rerieve metadata to instantiate a Kapsule/Kosmos node. This method is not intended to be called by end users but rather programmatically by the node-installer. :param region: Region to target. If none is passed will use default region from the config. :return: NodeMetadata

Usage:

result = api.get_node_metadata()
get_pool(*, pool_id: str, region: Optional[str] = None) Pool

Get a Pool in a Cluster. Retrieve details about a specific pool in a Kubernetes cluster. :param pool_id: ID of the requested pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.get_pool(
    pool_id="example",
)
get_version(*, version_name: str, region: Optional[str] = None) Version

Get a Version. Retrieve a specific Kubernetes version and its details. :param version_name: Requested version name. :param region: Region to target. If none is passed will use default region from the config. :return: Version

Usage:

result = api.get_version(
    version_name="example",
)
list_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListClusterACLRulesResponse

List ACLs. List ACLs for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be listed. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number for the returned ACLs. :param page_size: Maximum number of ACLs per page. :return: ListClusterACLRulesResponse

Usage:

result = api.list_cluster_acl_rules(
    cluster_id="example",
)
list_cluster_acl_rules_all(*, cluster_id: str, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ACLRule]

List ACLs. List ACLs for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be listed. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number for the returned ACLs. :param page_size: Maximum number of ACLs per page. :return: List[ACLRule]

Usage:

result = api.list_cluster_acl_rules_all(
    cluster_id="example",
)
list_cluster_available_types(*, cluster_id: str, region: Optional[str] = None) ListClusterAvailableTypesResponse

List available cluster types for a cluster. List the cluster types that a specific Kubernetes cluster is allowed to switch to. :param cluster_id: Cluster ID for which the available Kubernetes types will be listed. :param region: Region to target. If none is passed will use default region from the config. :return: ListClusterAvailableTypesResponse

Usage:

result = api.list_cluster_available_types(
    cluster_id="example",
)
list_cluster_available_versions(*, cluster_id: str, region: Optional[str] = None) ListClusterAvailableVersionsResponse

List available versions for a Cluster. List the versions that a specific Kubernetes cluster is allowed to upgrade to. Results will include every patch version greater than the current patch, as well as one minor version ahead of the current version. Any upgrade skipping a minor version will not work. :param cluster_id: Cluster ID for which the available Kubernetes versions will be listed. :param region: Region to target. If none is passed will use default region from the config. :return: ListClusterAvailableVersionsResponse

Usage:

result = api.list_cluster_available_versions(
    cluster_id="example",
)
list_cluster_types(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListClusterTypesResponse

List cluster types. List available cluster types and their technical details. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number, from the paginated results, to return for cluster-types. :param page_size: Maximum number of clusters per page. :return: ListClusterTypesResponse

Usage:

result = api.list_cluster_types()
list_cluster_types_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ClusterType]

List cluster types. List available cluster types and their technical details. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number, from the paginated results, to return for cluster-types. :param page_size: Maximum number of clusters per page. :return: List[ClusterType]

Usage:

result = api.list_cluster_types_all()
list_clusters(*, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListClustersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[ClusterStatus] = None, type_: Optional[str] = None, private_network_id: Optional[str] = None) ListClustersResponse

List Clusters. List all existing Kubernetes clusters in a specific region. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID on which to filter the returned clusters. :param project_id: Project ID on which to filter the returned clusters. :param order_by: Sort order of returned clusters. :param page: Page number to return for clusters, from the paginated results. :param page_size: Maximum number of clusters per page. :param name: Name to filter on, only clusters containing this substring in their name will be returned. :param status: Status to filter on, only clusters with this status will be returned. :param type_: Type to filter on, only clusters with this type will be returned. :param private_network_id: Private Network ID to filter on, only clusters within this Private Network will be returned. :return: ListClustersResponse

Usage:

result = api.list_clusters()
list_clusters_all(*, region: Optional[str] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, order_by: Optional[ListClustersRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[ClusterStatus] = None, type_: Optional[str] = None, private_network_id: Optional[str] = None) List[Cluster]

List Clusters. List all existing Kubernetes clusters in a specific region. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Organization ID on which to filter the returned clusters. :param project_id: Project ID on which to filter the returned clusters. :param order_by: Sort order of returned clusters. :param page: Page number to return for clusters, from the paginated results. :param page_size: Maximum number of clusters per page. :param name: Name to filter on, only clusters containing this substring in their name will be returned. :param status: Status to filter on, only clusters with this status will be returned. :param type_: Type to filter on, only clusters with this type will be returned. :param private_network_id: Private Network ID to filter on, only clusters within this Private Network will be returned. :return: List[Cluster]

Usage:

result = api.list_clusters_all()
list_nodes(*, cluster_id: str, region: Optional[str] = None, pool_id: Optional[str] = None, order_by: Optional[ListNodesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[NodeStatus] = None) ListNodesResponse

List Nodes in a Cluster. List all the existing nodes for a specific Kubernetes cluster. :param cluster_id: Cluster ID from which the nodes will be listed from. :param region: Region to target. If none is passed will use default region from the config. :param pool_id: Pool ID on which to filter the returned nodes. :param order_by: Sort order of the returned nodes. :param page: Page number for the returned nodes. :param page_size: Maximum number of nodes per page. :param name: Name to filter on, only nodes containing this substring in their name will be returned. :param status: Status to filter on, only nodes with this status will be returned. :return: ListNodesResponse

Usage:

result = api.list_nodes(
    cluster_id="example",
)
list_nodes_all(*, cluster_id: str, region: Optional[str] = None, pool_id: Optional[str] = None, order_by: Optional[ListNodesRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[NodeStatus] = None) List[Node]

List Nodes in a Cluster. List all the existing nodes for a specific Kubernetes cluster. :param cluster_id: Cluster ID from which the nodes will be listed from. :param region: Region to target. If none is passed will use default region from the config. :param pool_id: Pool ID on which to filter the returned nodes. :param order_by: Sort order of the returned nodes. :param page: Page number for the returned nodes. :param page_size: Maximum number of nodes per page. :param name: Name to filter on, only nodes containing this substring in their name will be returned. :param status: Status to filter on, only nodes with this status will be returned. :return: List[Node]

Usage:

result = api.list_nodes_all(
    cluster_id="example",
)
list_pools(*, cluster_id: str, region: Optional[str] = None, order_by: Optional[ListPoolsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[PoolStatus] = None) ListPoolsResponse

List Pools in a Cluster. List all the existing pools for a specific Kubernetes cluster. :param cluster_id: ID of the cluster whose pools will be listed. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of returned pools. :param page: Page number for the returned pools. :param page_size: Maximum number of pools per page. :param name: Name to filter on, only pools containing this substring in their name will be returned. :param status: Status to filter on, only pools with this status will be returned. :return: ListPoolsResponse

Usage:

result = api.list_pools(
    cluster_id="example",
)
list_pools_all(*, cluster_id: str, region: Optional[str] = None, order_by: Optional[ListPoolsRequestOrderBy] = None, page: Optional[int] = None, page_size: Optional[int] = None, name: Optional[str] = None, status: Optional[PoolStatus] = None) List[Pool]

List Pools in a Cluster. List all the existing pools for a specific Kubernetes cluster. :param cluster_id: ID of the cluster whose pools will be listed. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of returned pools. :param page: Page number for the returned pools. :param page_size: Maximum number of pools per page. :param name: Name to filter on, only pools containing this substring in their name will be returned. :param status: Status to filter on, only pools with this status will be returned. :return: List[Pool]

Usage:

result = api.list_pools_all(
    cluster_id="example",
)
list_versions(*, region: Optional[str] = None) ListVersionsResponse

List all available Versions. List all available versions for the creation of a new Kubernetes cluster. :param region: Region to target. If none is passed will use default region from the config. :return: ListVersionsResponse

Usage:

result = api.list_versions()
migrate_cluster_to_sbscsi(*, cluster_id: str, region: Optional[str] = None) Cluster

Migrate a cluster to SBS CSI. Enable the latest CSI compatible with Scaleway Block Storage (SBS) and migrate all existing PersistentVolumes/VolumeSnapshotContents to SBS. :param cluster_id: Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.migrate_cluster_to_sbscsi(
    cluster_id="example",
)
reboot_node(*, node_id: str, region: Optional[str] = None) Node

Reboot a Node in a Cluster. Reboot a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to reboot. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.reboot_node(
    node_id="example",
)
replace_node(*, node_id: str, region: Optional[str] = None) Node

Replace a Node in a Cluster. Replace a specific Node. The node will first be cordoned (scheduling will be disabled on it). The existing pods on the node will then be drained and rescheduled onto another schedulable node. Note that when there is not enough space to reschedule all the pods (such as in a one-node cluster), disruption of your applications can be expected. :param node_id: ID of the node to replace. :param region: Region to target. If none is passed will use default region from the config. :return: Node :deprecated

Usage:

result = api.replace_node(
    node_id="example",
)
reset_cluster_admin_token(*, cluster_id: str, region: Optional[str] = None) None

Reset the admin token of a Cluster. Reset the admin token for a specific Kubernetes cluster. This will revoke the old admin token (which will not be usable afterwards) and create a new one. Note that you will need to download kubeconfig again to keep interacting with the cluster. :param cluster_id: Cluster ID on which the admin token will be renewed. :param region: Region to target. If none is passed will use default region from the config.

Usage:

result = api.reset_cluster_admin_token(
    cluster_id="example",
)
set_cluster_acl_rules(*, cluster_id: str, region: Optional[str] = None, acls: Optional[List[ACLRuleRequest]] = None) SetClusterACLRulesResponse

Set new ACLs. Set new ACL rules for a specific cluster. :param cluster_id: ID of the cluster whose ACLs will be set. :param region: Region to target. If none is passed will use default region from the config. :param acls: ACLs to set. :return: SetClusterACLRulesResponse

Usage:

result = api.set_cluster_acl_rules(
    cluster_id="example",
)
set_cluster_type(*, cluster_id: str, type_: str, region: Optional[str] = None) Cluster

Change the Cluster type. Change the type of a specific Kubernetes cluster. To see the possible values you can enter for the type field, [list available cluster types](#path-clusters-list-available-cluster-types-for-a-cluster). :param cluster_id: ID of the cluster to migrate from one type to another. :param type_: Type of the cluster. Note that some migrations are not possible (please refer to product documentation). :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.set_cluster_type(
    cluster_id="example",
    type="example",
)
update_cluster(*, cluster_id: str, region: Optional[str] = None, name: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig] = None, auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade] = None, feature_gates: Optional[List[str]] = None, admission_plugins: Optional[List[str]] = None, open_id_connect_config: Optional[UpdateClusterRequestOpenIDConnectConfig] = None, apiserver_cert_sans: Optional[List[str]] = None) Cluster

Update a Cluster. Update information on a specific Kubernetes cluster. You can update details such as its name, description, tags and configuration. To upgrade a cluster, you will need to use the dedicated endpoint. :param cluster_id: ID of the cluster to update. :param region: Region to target. If none is passed will use default region from the config. :param name: New external name for the cluster. :param description: New description for the cluster. :param tags: New tags associated with the cluster. :param autoscaler_config: New autoscaler config for the cluster. :param auto_upgrade: New auto upgrade configuration for the cluster. Note that all fields need to be set. :param feature_gates: List of feature gates to enable. :param admission_plugins: List of admission plugins to enable. :param open_id_connect_config: OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server. :param apiserver_cert_sans: Additional Subject Alternative Names for the Kubernetes API server certificate. :return: Cluster

Usage:

result = api.update_cluster(
    cluster_id="example",
)
update_pool(*, pool_id: str, region: Optional[str] = None, autoscaling: Optional[bool] = None, size: Optional[int] = None, min_size: Optional[int] = None, max_size: Optional[int] = None, autohealing: Optional[bool] = None, tags: Optional[List[str]] = None, kubelet_args: Optional[Dict[str, str]] = None, upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy] = None) Pool

Update a Pool in a Cluster. Update the attributes of a specific pool, such as its desired size, autoscaling settings, and tags. :param pool_id: ID of the pool to update. :param region: Region to target. If none is passed will use default region from the config. :param autoscaling: New value for the pool autoscaling enablement. :param size: New desired pool size. :param min_size: New minimum size for the pool. :param max_size: New maximum size for the pool. :param autohealing: New value for the pool autohealing enablement. :param tags: New tags associated with the pool. :param kubelet_args: New Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: New upgrade policy for the pool. :return: Pool

Usage:

result = api.update_pool(
    pool_id="example",
)
upgrade_cluster(*, cluster_id: str, version: str, upgrade_pools: bool, region: Optional[str] = None) Cluster

Upgrade a Cluster. Upgrade a specific Kubernetes cluster and possibly its associated pools to a specific and supported Kubernetes version. :param cluster_id: ID of the cluster to upgrade. :param version: New Kubernetes version of the cluster. Note that the version should either be a higher patch version of the same minor version or the direct minor version after the current one. :param upgrade_pools: Defines whether pools will also be upgraded once the control plane is upgraded. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.upgrade_cluster(
    cluster_id="example",
    version="example",
    upgrade_pools=False,
)
upgrade_pool(*, pool_id: str, version: str, region: Optional[str] = None) Pool

Upgrade a Pool in a Cluster. Upgrade the Kubernetes version of a specific pool. Note that it only works if the targeted version matches the cluster’s version. :param pool_id: ID of the pool to upgrade. :param version: New Kubernetes version for the pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.upgrade_pool(
    pool_id="example",
    version="example",
)
wait_for_cluster(*, cluster_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Cluster, bool]] = None) Cluster

Get a Cluster. Retrieve information about a specific Kubernetes cluster. :param cluster_id: ID of the requested cluster. :param region: Region to target. If none is passed will use default region from the config. :return: Cluster

Usage:

result = api.get_cluster(
    cluster_id="example",
)
wait_for_node(*, node_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Node, bool]] = None) Node

Get a Node in a Cluster. Retrieve details about a specific Kubernetes Node. :param node_id: ID of the requested node. :param region: Region to target. If none is passed will use default region from the config. :return: Node

Usage:

result = api.get_node(
    node_id="example",
)
wait_for_pool(*, pool_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Pool, bool]] = None) Pool

Get a Pool in a Cluster. Retrieve details about a specific pool in a Kubernetes cluster. :param pool_id: ID of the requested pool. :param region: Region to target. If none is passed will use default region from the config. :return: Pool

Usage:

result = api.get_pool(
    pool_id="example",
)
class scaleway.k8s.v1.ListClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

cluster_id: str

ID of the cluster whose ACLs will be listed.

page: Optional[int]

Page number for the returned ACLs.

page_size: Optional[int]

Maximum number of ACLs per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ListClusterACLRulesResponse(total_count: 'int', rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

Paginated returned ACLs.

total_count: int

Total number of ACLs that exist for the cluster.

class scaleway.k8s.v1.ListClusterAvailableTypesRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the available Kubernetes types will be listed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ListClusterAvailableTypesResponse(cluster_types: 'List[ClusterType]', total_count: 'int')

Bases: object

cluster_types: List[ClusterType]

Available cluster types for the cluster.

total_count: int

Total number of types.

class scaleway.k8s.v1.ListClusterAvailableVersionsRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the available Kubernetes versions will be listed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ListClusterAvailableVersionsResponse(versions: 'List[Version]')

Bases: object

versions: List[Version]

Available Kubernetes versions for the cluster.

class scaleway.k8s.v1.ListClusterTypesRequest(region: 'Optional[Region]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]

Page number, from the paginated results, to return for cluster-types.

page_size: Optional[int]

Maximum number of clusters per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ListClusterTypesResponse(total_count: 'int', cluster_types: 'List[ClusterType]')

Bases: object

cluster_types: List[ClusterType]

Paginated returned cluster-types.

total_count: int

Total number of cluster-types.

class scaleway.k8s.v1.ListClustersRequest(region: 'Optional[Region]', organization_id: 'Optional[str]', project_id: 'Optional[str]', order_by: 'Optional[ListClustersRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[ClusterStatus]', type_: 'Optional[str]', private_network_id: 'Optional[str]')

Bases: object

name: Optional[str]

Name to filter on, only clusters containing this substring in their name will be returned.

order_by: Optional[ListClustersRequestOrderBy]

Sort order of returned clusters.

organization_id: Optional[str]

Organization ID on which to filter the returned clusters.

page: Optional[int]

Page number to return for clusters, from the paginated results.

page_size: Optional[int]

Maximum number of clusters per page.

private_network_id: Optional[str]

Private Network ID to filter on, only clusters within this Private Network will be returned.

project_id: Optional[str]

Project ID on which to filter the returned clusters.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[ClusterStatus]

Status to filter on, only clusters with this status will be returned.

type_: Optional[str]

Type to filter on, only clusters with this type will be returned.

class scaleway.k8s.v1.ListClustersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
VERSION_ASC = 'version_asc'
VERSION_DESC = 'version_desc'
class scaleway.k8s.v1.ListClustersResponse(total_count: 'int', clusters: 'List[Cluster]')

Bases: object

clusters: List[Cluster]

Paginated returned clusters.

total_count: int

Total number of clusters.

class scaleway.k8s.v1.ListNodesRequest(cluster_id: 'str', region: 'Optional[Region]', pool_id: 'Optional[str]', order_by: 'Optional[ListNodesRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[NodeStatus]')

Bases: object

cluster_id: str

Cluster ID from which the nodes will be listed from.

name: Optional[str]

Name to filter on, only nodes containing this substring in their name will be returned.

order_by: Optional[ListNodesRequestOrderBy]

Sort order of the returned nodes.

page: Optional[int]

Page number for the returned nodes.

page_size: Optional[int]

Maximum number of nodes per page.

pool_id: Optional[str]

Pool ID on which to filter the returned nodes.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[NodeStatus]

Status to filter on, only nodes with this status will be returned.

class scaleway.k8s.v1.ListNodesRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.k8s.v1.ListNodesResponse(total_count: 'int', nodes: 'List[Node]')

Bases: object

nodes: List[Node]

Paginated returned nodes.

total_count: int

Total number of nodes.

class scaleway.k8s.v1.ListPoolsRequest(cluster_id: 'str', region: 'Optional[Region]', order_by: 'Optional[ListPoolsRequestOrderBy]', page: 'Optional[int]', page_size: 'Optional[int]', name: 'Optional[str]', status: 'Optional[PoolStatus]')

Bases: object

cluster_id: str

ID of the cluster whose pools will be listed.

name: Optional[str]

Name to filter on, only pools containing this substring in their name will be returned.

order_by: Optional[ListPoolsRequestOrderBy]

Sort order of returned pools.

page: Optional[int]

Page number for the returned pools.

page_size: Optional[int]

Maximum number of pools per page.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

status: Optional[PoolStatus]

Status to filter on, only pools with this status will be returned.

class scaleway.k8s.v1.ListPoolsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
NAME_ASC = 'name_asc'
NAME_DESC = 'name_desc'
STATUS_ASC = 'status_asc'
STATUS_DESC = 'status_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
VERSION_ASC = 'version_asc'
VERSION_DESC = 'version_desc'
class scaleway.k8s.v1.ListPoolsResponse(total_count: 'int', pools: 'List[Pool]')

Bases: object

pools: List[Pool]

Paginated returned pools.

total_count: int

Total number of pools that exists for the cluster.

class scaleway.k8s.v1.ListVersionsRequest(region: 'Optional[Region]')

Bases: object

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ListVersionsResponse(versions: 'List[Version]')

Bases: object

versions: List[Version]

Available Kubernetes versions.

class scaleway.k8s.v1.MaintenanceWindow(start_hour: 'int', day: 'MaintenanceWindowDayOfTheWeek')

Bases: object

day: MaintenanceWindowDayOfTheWeek

Day of the week for the maintenance window.

start_hour: int

Start time of the two-hour maintenance window.

class scaleway.k8s.v1.MaintenanceWindowDayOfTheWeek(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ANY = 'any'
FRIDAY = 'friday'
MONDAY = 'monday'
SATURDAY = 'saturday'
SUNDAY = 'sunday'
THURSDAY = 'thursday'
TUESDAY = 'tuesday'
WEDNESDAY = 'wednesday'
class scaleway.k8s.v1.MigrateClusterToSBSCSIRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID for which the latest CSI compatible with Scaleway Block Storage will be enabled.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.Node(id: 'str', pool_id: 'str', cluster_id: 'str', provider_id: 'str', region: 'Region', name: 'str', public_ip_v4: 'Optional[str]', public_ip_v6: 'Optional[str]', conditions: 'Optional[Dict[str, str]]', status: 'NodeStatus', error_message: 'Optional[str]', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]')

Bases: object

cluster_id: str

Cluster ID of the node.

conditions: Optional[Dict[str, str]]

Conditions of the node. These conditions contain the Node Problem Detector conditions, as well as some in house conditions.

created_at: Optional[datetime]

Date on which the node was created.

error_message: Optional[str]

Details of the error, if any occurred when managing the node.

id: str

Node ID.

name: str

Name of the node.

pool_id: str

Pool ID of the node.

provider_id: str

Underlying instance ID. It is prefixed by instance type and location information (see https://pkg.go.dev/k8s.io/api/core/v1#NodeSpec.ProviderID).

public_ip_v4: Optional[str]

Public IPv4 address of the node.

public_ip_v6: Optional[str]

Public IPv6 address of the node.

region: str

Cluster region of the node.

status: NodeStatus

Status of the node.

updated_at: Optional[datetime]

Date on which the node was last updated.

class scaleway.k8s.v1.NodeMetadata(id: 'str', name: 'str', cluster_url: 'str', cluster_ca: 'str', credential_provider_config: 'str', pool_version: 'str', kubelet_config: 'str', node_labels: 'Dict[str, str]', node_taints: 'List[NodeMetadataCoreV1Taint]', has_gpu: 'bool', external_ip: 'str', repo_uri: 'str')

Bases: object

cluster_ca: str
cluster_url: str
credential_provider_config: str
external_ip: str
has_gpu: bool
id: str
kubelet_config: str
name: str
node_labels: Dict[str, str]
node_taints: List[NodeMetadataCoreV1Taint]
pool_version: str
repo_uri: str
class scaleway.k8s.v1.NodeMetadataCoreV1Taint(key: 'str', value: 'str', effect: 'str')

Bases: object

effect: str
key: str
value: str
class scaleway.k8s.v1.NodeStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATING = 'creating'
CREATION_ERROR = 'creation_error'
DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
NOT_READY = 'not_ready'
READY = 'ready'
REBOOTING = 'rebooting'
REGISTERING = 'registering'
STARTING = 'starting'
UNKNOWN = 'unknown'
UPGRADING = 'upgrading'
class scaleway.k8s.v1.Pool(id: 'str', cluster_id: 'str', name: 'str', status: 'PoolStatus', version: 'str', node_type: 'str', autoscaling: 'bool', size: 'int', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', min_size: 'int', max_size: 'int', container_runtime: 'Runtime', autohealing: 'bool', tags: 'List[str]', kubelet_args: 'Dict[str, str]', zone: 'Zone', root_volume_type: 'PoolVolumeType', public_ip_disabled: 'bool', region: 'Region', placement_group_id: 'Optional[str]', upgrade_policy: 'Optional[PoolUpgradePolicy]', root_volume_size: 'Optional[int]')

Bases: object

autohealing: bool

Defines whether the autohealing feature is enabled for the pool.

autoscaling: bool

Defines whether the autoscaling feature is enabled for the pool.

cluster_id: str

Cluster ID of the pool.

container_runtime: Runtime

Customization of the container runtime is available for each pool. Note that docker has been deprecated since version 1.20 and will be removed by version 1.24.

created_at: Optional[datetime]

Date on which the pool was created.

id: str

Pool ID.

kubelet_args: Dict[str, str]

Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: int

Defines the maximum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

min_size: int

Defines the minimum size of the pool. Note that this field is only used when autoscaling is enabled on the pool.

name: str

Pool name.

node_type: str

Node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). ‘external’ is a special node type used to provision instances from other cloud providers in a Kosmos Cluster.

placement_group_id: Optional[str]

Placement group ID in which all the nodes of the pool will be created.

public_ip_disabled: bool

Defines if the public IP should be removed from Nodes. To use this feature, your Cluster must have an attached Private Network set up with a Public Gateway.

region: str

Cluster region of the pool.

root_volume_size: Optional[int]

System volume disk size.

root_volume_type: PoolVolumeType

Defines the system volume disk type. Two different types of volume (volume_type) are provided: l_ssd is a local block storage which means your system is stored locally on your node’s hypervisor. b_ssd is a remote block storage which means your system is stored on a centralized and resilient cluster.

size: int

Size (number of nodes) of the pool.

status: PoolStatus

Pool status.

tags: List[str]

Tags associated with the pool.

updated_at: Optional[datetime]

Date on which the pool was last updated.

upgrade_policy: Optional[PoolUpgradePolicy]

Pool upgrade policy.

version: str

Pool version.

zone: str

Zone in which the pool’s nodes will be spawned.

class scaleway.k8s.v1.PoolStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETED = 'deleted'
DELETING = 'deleting'
LOCKED = 'locked'
READY = 'ready'
SCALING = 'scaling'
UNKNOWN = 'unknown'
UPGRADING = 'upgrading'
WARNING = 'warning'
class scaleway.k8s.v1.PoolUpgradePolicy(max_unavailable: 'int', max_surge: 'int')

Bases: object

max_surge: int
max_unavailable: int
class scaleway.k8s.v1.PoolVolumeType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

B_SSD = 'b_ssd'
DEFAULT_VOLUME_TYPE = 'default_volume_type'
L_SSD = 'l_ssd'
SBS_15K = 'sbs_15k'
SBS_5K = 'sbs_5k'
class scaleway.k8s.v1.RebootNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to reboot.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ReplaceNodeRequest(node_id: 'str', region: 'Optional[Region]')

Bases: object

node_id: str

ID of the node to replace.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.ResetClusterAdminTokenRequest(cluster_id: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

Cluster ID on which the admin token will be renewed.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.Runtime(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CONTAINERD = 'containerd'
CRIO = 'crio'
DOCKER = 'docker'
UNKNOWN_RUNTIME = 'unknown_runtime'
class scaleway.k8s.v1.SetClusterACLRulesRequest(cluster_id: 'str', region: 'Optional[Region]', acls: 'Optional[List[ACLRuleRequest]]')

Bases: object

acls: Optional[List[ACLRuleRequest]]

ACLs to set.

cluster_id: str

ID of the cluster whose ACLs will be set.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.k8s.v1.SetClusterACLRulesResponse(rules: 'List[ACLRule]')

Bases: object

rules: List[ACLRule]

ACLs that were set.

class scaleway.k8s.v1.SetClusterTypeRequest(cluster_id: 'str', type_: 'str', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to migrate from one type to another.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

type_: str

Type of the cluster. Note that some migrations are not possible (please refer to product documentation).

class scaleway.k8s.v1.UpdateClusterRequest(cluster_id: 'str', region: 'Optional[Region]', name: 'Optional[str]', description: 'Optional[str]', tags: 'Optional[List[str]]', autoscaler_config: 'Optional[UpdateClusterRequestAutoscalerConfig]', auto_upgrade: 'Optional[UpdateClusterRequestAutoUpgrade]', feature_gates: 'Optional[List[str]]', admission_plugins: 'Optional[List[str]]', open_id_connect_config: 'Optional[UpdateClusterRequestOpenIDConnectConfig]', apiserver_cert_sans: 'Optional[List[str]]')

Bases: object

admission_plugins: Optional[List[str]]

List of admission plugins to enable.

apiserver_cert_sans: Optional[List[str]]

Additional Subject Alternative Names for the Kubernetes API server certificate.

auto_upgrade: Optional[UpdateClusterRequestAutoUpgrade]

New auto upgrade configuration for the cluster. Note that all fields need to be set.

autoscaler_config: Optional[UpdateClusterRequestAutoscalerConfig]

New autoscaler config for the cluster.

cluster_id: str

ID of the cluster to update.

description: Optional[str]

New description for the cluster.

feature_gates: Optional[List[str]]

List of feature gates to enable.

name: Optional[str]

New external name for the cluster.

open_id_connect_config: Optional[UpdateClusterRequestOpenIDConnectConfig]

OpenID Connect configuration of the cluster. This configuration enables to update the OpenID Connect configuration of the Kubernetes API server.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

New tags associated with the cluster.

class scaleway.k8s.v1.UpdateClusterRequestAutoUpgrade(enable: 'Optional[bool]', maintenance_window: 'Optional[MaintenanceWindow]')

Bases: object

enable: Optional[bool]

Defines whether auto upgrade is enabled for the cluster.

maintenance_window: Optional[MaintenanceWindow]

Maintenance window of the cluster auto upgrades.

class scaleway.k8s.v1.UpdateClusterRequestAutoscalerConfig(estimator: 'AutoscalerEstimator', expander: 'AutoscalerExpander', scale_down_disabled: 'Optional[bool]', scale_down_delay_after_add: 'Optional[str]', ignore_daemonsets_utilization: 'Optional[bool]', balance_similar_node_groups: 'Optional[bool]', expendable_pods_priority_cutoff: 'Optional[int]', scale_down_unneeded_time: 'Optional[str]', scale_down_utilization_threshold: 'Optional[float]', max_graceful_termination_sec: 'Optional[int]')

Bases: object

balance_similar_node_groups: Optional[bool]

Detect similar node groups and balance the number of nodes between them.

estimator: AutoscalerEstimator

Type of resource estimator to be used in scale up.

expander: AutoscalerExpander

Type of node group expander to be used in scale up.

expendable_pods_priority_cutoff: Optional[int]

Pods with priority below cutoff will be expendable. They can be killed without any consideration during scale down and they won’t cause scale up. Pods with null priority (PodPriority disabled) are non expendable.

ignore_daemonsets_utilization: Optional[bool]

Ignore DaemonSet pods when calculating resource utilization for scaling down.

max_graceful_termination_sec: Optional[int]

Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node.

scale_down_delay_after_add: Optional[str]

How long after scale up that scale down evaluation resumes.

scale_down_disabled: Optional[bool]

Disable the cluster autoscaler.

scale_down_unneeded_time: Optional[str]

How long a node should be unneeded before it is eligible to be scaled down.

scale_down_utilization_threshold: Optional[float]

Node utilization level, defined as a sum of requested resources divided by capacity, below which a node can be considered for scale down.

class scaleway.k8s.v1.UpdateClusterRequestOpenIDConnectConfig(issuer_url: 'Optional[str]', client_id: 'Optional[str]', username_claim: 'Optional[str]', username_prefix: 'Optional[str]', groups_claim: 'Optional[List[str]]', groups_prefix: 'Optional[str]', required_claim: 'Optional[List[str]]')

Bases: object

client_id: Optional[str]

A client ID that all tokens must be issued for.

groups_claim: Optional[List[str]]

JWT claim to use as the user’s group.

groups_prefix: Optional[str]

Prefix prepended to group claims to prevent name collision (such as system: groups). For example, the value oidc: will create group names like oidc:engineering and oidc:infra.

issuer_url: Optional[str]

URL of the provider which allows the API server to discover public signing keys. Only URLs using the https:// scheme are accepted. This is typically the provider’s discovery URL without a path, for example “https://accounts.google.com” or “https://login.salesforce.com”.

required_claim: Optional[List[str]]

Multiple key=value pairs describing a required claim in the ID token. If set, the claims are verified to be present in the ID token with a matching value.

username_claim: Optional[str]

JWT claim to use as the user name. The default is sub, which is expected to be the end user’s unique identifier. Admins can choose other claims, such as email or name, depending on their provider. However, claims other than email will be prefixed with the issuer URL to prevent name collision.

username_prefix: Optional[str]

Prefix prepended to username claims to prevent name collision (such as system: users). For example, the value oidc: will create usernames like oidc:jane.doe. If this flag is not provided and username_claim is a value other than email, the prefix defaults to ( Issuer URL )# where ( Issuer URL ) is the value of issuer_url. The value - can be used to disable all prefixing.

class scaleway.k8s.v1.UpdatePoolRequest(pool_id: 'str', region: 'Optional[Region]', autoscaling: 'Optional[bool]', size: 'Optional[int]', min_size: 'Optional[int]', max_size: 'Optional[int]', autohealing: 'Optional[bool]', tags: 'Optional[List[str]]', kubelet_args: 'Optional[Dict[str, str]]', upgrade_policy: 'Optional[UpdatePoolRequestUpgradePolicy]')

Bases: object

autohealing: Optional[bool]

New value for the pool autohealing enablement.

autoscaling: Optional[bool]

New value for the pool autoscaling enablement.

kubelet_args: Optional[Dict[str, str]]

New Kubelet arguments to be used by this pool. Note that this feature is experimental.

max_size: Optional[int]

New maximum size for the pool.

min_size: Optional[int]

New minimum size for the pool.

pool_id: str

ID of the pool to update.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

size: Optional[int]

New desired pool size.

tags: Optional[List[str]]

New tags associated with the pool.

upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy]

New upgrade policy for the pool.

class scaleway.k8s.v1.UpdatePoolRequestUpgradePolicy(max_unavailable: 'Optional[int]', max_surge: 'Optional[int]')

Bases: object

max_surge: Optional[int]
max_unavailable: Optional[int]
class scaleway.k8s.v1.UpgradeClusterRequest(cluster_id: 'str', version: 'str', upgrade_pools: 'bool', region: 'Optional[Region]')

Bases: object

cluster_id: str

ID of the cluster to upgrade.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

upgrade_pools: bool

Defines whether pools will also be upgraded once the control plane is upgraded.

version: str

New Kubernetes version of the cluster. Note that the version should either be a higher patch version of the same minor version or the direct minor version after the current one.

class scaleway.k8s.v1.UpgradePoolRequest(pool_id: 'str', version: 'str', region: 'Optional[Region]')

Bases: object

pool_id: str

ID of the pool to upgrade.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

version: str

New Kubernetes version for the pool.

class scaleway.k8s.v1.Version(name: 'str', label: 'str', region: 'Region', available_cnis: 'List[CNI]', available_container_runtimes: 'List[Runtime]', available_feature_gates: 'List[str]', available_admission_plugins: 'List[str]', available_kubelet_args: 'Dict[str, str]')

Bases: object

available_admission_plugins: List[str]

Supported admission plugins for this version.

available_cnis: List[CNI]

Supported Container Network Interface (CNI) plugins for this version.

available_container_runtimes: List[Runtime]

Supported container runtimes for this version.

available_feature_gates: List[str]

Supported feature gates for this version.

available_kubelet_args: Dict[str, str]

Supported kubelet arguments for this version.

label: str

Label of the Kubernetes version.

name: str

Name of the Kubernetes version.

region: str

Region in which this version is available.