What the EKS SDK Actually Manages
Amazon EKS runs the Kubernetes control plane for you. The EKS SDK is how your code creates and operates that AWS-managed piece - but it stops at a hard boundary that trips up almost everyone new to it.
Busque em todas as páginas da documentação
Amazon EKS runs the Kubernetes control plane for you. The EKS SDK is how your code creates and operates that AWS-managed piece - but it stops at a hard boundary that trips up almost everyone new to it.
This page draws that boundary clearly, so every other page in this section reads as "which side of the line is this operation on?"
@aws-sdk/client-eks, boto3 eks) manages the AWS-facing shell of a Kubernetes cluster: the managed control plane, managed node groups, Fargate profiles, add-ons, access entries, and the IAM/OIDC plumbing.kubectl or a Kubernetes client, never the AWS SDK.A Kubernetes cluster has two halves. The control plane is the brain: the API server, etcd, the scheduler, and the controllers. The data plane is the muscle: the worker nodes that actually run your containers.
With self-managed Kubernetes you own both halves. With EKS, AWS runs the control plane as a managed service across multiple Availability Zones, patches it, and scales it. You never SSH into it. You reach it only through its Kubernetes API endpoint.
The EKS SDK is the API for the AWS envelope around that control plane. It answers questions like "does a cluster exist," "what version is it," "how many worker nodes, and of what type," "which AWS add-ons are installed," and "which AWS principals may talk to the cluster." It does not answer "what is deployed on the cluster."
Here is the single call that creates the whole managed control plane.
# --- Python (boto3) ---
import boto3
eks = boto3.client("eks", region_name="us-east-1")
resp = eks.create_cluster(
name="platform",
roleArn="arn:aws:iam::111122223333:role/eksClusterRole",
version="1.30",
resourcesVpcConfig={
"subnetIds": ["subnet-0aaa", "subnet-0bbb"],
"endpointPublicAccess": True,
},
)
print(resp["cluster"]["status"]) # CREATING// --- TypeScript (AWS SDK v3) ---
import { EKSClient, CreateClusterCommand } from "@aws-sdk/client-eks";
const eks = new EKSClient({ region: "us-east-1" });
const resp = await eks.send(new CreateClusterCommand({
name: "platform",
roleArn: "arn:aws:iam::111122223333:role/eksClusterRole",
version: "1.30",
resourcesVpcConfig: {
subnetIds: ["subnet-0aaa", "subnet-0bbb"],
endpointPublicAccess: true,
},
}));
console.log(resp.cluster?.status); // CREATINGNotice the inputs: an IAM role, a Kubernetes version, and VPC networking. Every parameter is about the AWS environment the control plane lives in. Nothing here describes a workload.
CreateCluster returns almost immediately with status: CREATING, but the control plane takes several minutes to become reachable. That gap is why the SDK ships waiters: cluster_active in boto3, waitUntilClusterActive in SDK v3. You call the create, then block on the waiter until the status flips to ACTIVE.
# --- Python (boto3) ---
eks.get_waiter("cluster_active").wait(name="platform")
info = eks.describe_cluster(name="platform")["cluster"]
print(info["endpoint"]) # https://XXXX.gr7.us-east-1.eks.amazonaws.com
print(info["identity"]["oidc"]["issuer"]) # OIDC issuer URL for IRSA// --- TypeScript (AWS SDK v3) ---
import { waitUntilClusterActive, DescribeClusterCommand } from "@aws-sdk/client-eks";
await waitUntilClusterActive({ client: eks, maxWaitTime: 900 }, { name: "platform" });
const info = (await eks.send(new DescribeClusterCommand({ name: "platform" }))).cluster;
console.log(info?.endpoint); // https://XXXX.gr7.us-east-1.eks.amazonaws.com
console.log(info?.identity?.oidc?.issuer); // OIDC issuer URL for IRSADescribeCluster is the bridge between the two planes. It hands back three things you need to cross the boundary: the API endpoint, the base64 certificateAuthority.data, and the identity.oidc.issuer. The first two build a kubeconfig so kubectl can authenticate to the cluster; the third is the trust anchor for IRSA (covered on its own page).
This is the crucial mental picture. The SDK gets you to the front door - it provisions the cluster and tells you its address - but walking through the door to create a Deployment means switching tools to kubectl or a Kubernetes client library. That handoff usually looks like this, and note it is a plain shell snippet, not an SDK call:
# Build a kubeconfig entry from the cluster the SDK just created,
# then everything past this line is the Kubernetes API, not AWS.
aws eks update-kubeconfig --name platform --region us-east-1
kubectl apply -f deployment.yaml # this NEVER goes through the EKS SDKWhere exactly does the line fall? A short inventory settles most questions.
| Operation | Plane | Tool |
|---|---|---|
| Create/upgrade the cluster | AWS control plane | EKS SDK (CreateCluster, UpdateClusterVersion) |
| Add/scale worker nodes | AWS control plane | EKS SDK (CreateNodegroup, UpdateNodegroupConfig) |
| Run pods serverlessly | AWS control plane | EKS SDK (CreateFargateProfile) |
| Install VPC CNI, CoreDNS, kube-proxy | AWS control plane | EKS SDK (CreateAddon) |
| Grant an IAM principal cluster access | AWS control plane | EKS SDK (CreateAccessEntry) |
| Deploy an app, scale replicas | Kubernetes data plane | kubectl / Kubernetes client |
| Create a Service or Ingress | Kubernetes data plane | kubectl / Kubernetes client |
| Read pod logs, exec into a pod | Kubernetes data plane | kubectl |
A handful of operations straddle the line, which is where confusion peaks. Access entries are set with the EKS SDK but govern who can call the Kubernetes API - AWS-side configuration of a Kubernetes-side permission. Add-ons are installed with the SDK but result in real Pods (like the CNI DaemonSet) running in the data plane. IRSA is set up partly with the IAM SDK (an OIDC provider and a role) and partly with kubectl (annotating a service account). Each of these gets its own page precisely because it lives on the seam.
The practical rule: if the thing you want to change would still exist if you deleted every workload - the cluster itself, its nodes, its add-ons, its access list - the EKS SDK owns it. If it only exists because you deployed it, the Kubernetes API owns it, and the AWS SDK cannot see it.
CreateDeployment in @aws-sdk/client-eks. Workloads go through the Kubernetes API via kubectl or a client library.CREATING; the control plane needs several minutes. Wait on cluster_active / waitUntilClusterActive before using it.kubectl. Access entries moved that concern onto the EKS SDK, but the legacy path was pure Kubernetes.The AWS-managed shell of a Kubernetes cluster - control plane, node groups, Fargate profiles, add-ons, access entries, and IAM/OIDC wiring - but nothing inside the Kubernetes API.
No. Deployments live behind the Kubernetes API server. Use kubectl or a Kubernetes client library. The EKS SDK has no operation for in-cluster objects.
Provisioning a multi-AZ control plane takes minutes. The call returns CREATING immediately; you wait on the cluster_active waiter (waitUntilClusterActive in v3) until it reports ACTIVE.
Read endpoint and certificateAuthority.data from DescribeCluster, or run aws eks update-kubeconfig --name <cluster>. That kubeconfig is what lets kubectl cross into the data plane.
identity.oidc.issuer from DescribeCluster is the trust anchor for IAM Roles for Service Accounts (IRSA), which lets a pod assume an IAM role. It is covered on its own page.
Both, which is why they straddle the line. You install them with the EKS SDK (CreateAddon), but the result is real Pods - like the VPC CNI DaemonSet - running in the data plane.
Yes. Access entries (CreateAccessEntry, AssociateAccessPolicy) let you grant IAM principals Kubernetes access from the EKS SDK, replacing the older kubectl-edited aws-auth ConfigMap.
For repeatable environments, IaC (CloudFormation, CDK, Terraform, or eksctl) is the better home for the definition. Use the SDK for runtime operations and automation on top of an existing cluster.
No. It can tell you about node groups and Fargate profiles, but the pods scheduled onto them are only visible through the Kubernetes API, not the AWS API.
Ask whether the thing would survive deleting every workload. If yes (cluster, nodes, add-ons, access), it is EKS SDK. If it only exists because you deployed it, it is the Kubernetes API.
Stack versions: This page was written for boto3 1.43.x (Python 3.10+) and the AWS SDK for JavaScript v3 (Node.js 18+).
Revisado por Chris St. John·Última atualização: 23 de jul. de 2026