get_namespace_labels
Retrieve all label key-value pairs for a specified Kubernetes namespace, with optional kubeconfig path support.
Instructions
Get labels for a specific namespace.
This function retrieves all labels associated with a Kubernetes namespace. Labels are key-value pairs that can be used to organize and select resources.
Args: namespace: The name of the namespace to get labels from. kubeconfig_path: Optional path to a kubeconfig file. If not provided, the default kubeconfig from the environment will be used.
Returns: Union[Dict[str, str], str]: Dictionary of labels on success, or error object if failed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | ||
| kubeconfig_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |