KubernetesCompute Class
Kubernetes Compute resource.
- Inheritance
-
azure.ai.ml.entities._compute.compute.ComputeKubernetesCompute
Constructor
KubernetesCompute(*, namespace: str = 'default', properties: Dict[str, Any] | None = None, identity: IdentityConfiguration | None = None, **kwargs: Any)
Parameters
Name | Description |
---|---|
namespace
Required
|
The namespace of the KubernetesCompute. Defaults to "default". |
properties
Required
|
The properties of the Kubernetes compute resource. |
identity
Required
|
The identities that are associated with the compute cluster. |
Keyword-Only Parameters
Name | Description |
---|---|
namespace
|
Default value: default
|
properties
Required
|
|
identity
Required
|
|
Examples
Creating a KubernetesCompute object.
from azure.ai.ml.entities import KubernetesCompute
k8s_compute = KubernetesCompute(
identity=IdentityConfiguration(
type="UserAssigned",
user_assigned_identities=[
ManagedIdentityConfiguration(
resource_id="/subscriptions/1234567-abcd-ef12-1234-12345/resourcegroups/our_rg_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/our-agent-aks"
)
],
),
)
Methods
dump |
Dump the compute content into a file in yaml format. |
dump
Dump the compute content into a file in yaml format.
dump(dest: str | PathLike | IO, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
dest
Required
|
The destination to receive this compute's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.'. |
Attributes
base_path
created_on
The compute resource creation timestamp.
Returns
Type | Description |
---|---|
The compute resource creation timestamp. |
creation_context
The creation context of the resource.
Returns
Type | Description |
---|---|
The creation metadata for the resource. |
id
The resource ID.
Returns
Type | Description |
---|---|
The global ID of the resource, an Azure Resource Manager (ARM) ID. |
provisioning_errors
The compute resource provisioning errors.
Returns
Type | Description |
---|---|
The compute resource provisioning errors. |
provisioning_state
The compute resource's provisioning state.
Returns
Type | Description |
---|---|
The compute resource's provisioning state. |
type
Azure SDK for Python