KubernetesCompute Class
Kubernetes Compute resource.
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
|
Default value: None
|
|
identity
|
Default value: None
|
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
creation_context
The creation context of the resource.
Returns
| Type | Description |
|---|---|
|
The creation metadata for the resource. |