Skip to main content

cluster_user

Creates, updates, deletes, gets or lists a cluster_user resource.

Overview

Namecluster_user
TypeResource
Iddigitalocean.kubernetes.cluster_user

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object with a key called kubernetes_cluster_user
containing the username and in-cluster groups that it belongs to.

NameDatatypeDescription
groupsarrayA list of in-cluster groups that the user belongs to.
usernamestring (email)The username for the cluster admin user. (example: sammy@digitalocean.com)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
kubernetes_get_cluster_userselectcluster_idTo show information the user associated with a Kubernetes cluster, send a GET
request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/user.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_idstring (uuid)A unique ID that can be used to reference a Kubernetes cluster. (example: bd5f5959-5e1e-4205-a714-a914373942af)

SELECT examples

To show information the user associated with a Kubernetes cluster, send a GET
request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/user.

SELECT
groups,
username
FROM digitalocean.kubernetes.cluster_user
WHERE cluster_id = '{{ cluster_id }}' -- required;