Skip to content

DescribeCluster

Source: src/AWS/EKS/DescribeCluster.ts

Runtime binding for eks:DescribeCluster.

Reads the bound cluster’s live control-plane state — status, Kubernetes API endpoint, certificateAuthority data, version, and network config. The building block for constructing a kubeconfig at runtime. The cluster name is injected from the bound Cluster and eks:DescribeCluster is granted on the cluster’s ARN. Provide the implementation with Effect.provide(AWS.EKS.DescribeClusterHttp).

// init
const describeCluster = yield* AWS.EKS.DescribeCluster(cluster);
// runtime
const { cluster: live } = yield* describeCluster();
const endpoint = live?.endpoint;
const caData = live?.certificateAuthority?.data;