Deploying workloads on EKS in AWS - Time & Space Complexity
When deploying workloads on EKS, it is important to understand how the time to deploy grows as you add more workloads.
We want to know how the number of deployments affects the total time and operations needed.
Analyze the time complexity of the following operation sequence.
aws eks create-cluster --name my-cluster --role-arn role-arn --resources-vpc-config subnetIds=subnet-123,subnet-456
aws eks create-nodegroup --cluster-name my-cluster --nodegroup-name nodegroup1 --subnets subnet-123 subnet-456 --instance-types t3.medium
aws eks update-kubeconfig --name my-cluster
kubectl apply -f workload1.yaml
kubectl apply -f workload2.yaml
kubectl apply -f workloadN.yaml
This sequence creates an EKS cluster, adds a node group, configures access, and deploys multiple workloads.
Identify the API calls, resource provisioning, data transfers that repeat.
- Primary operation: Applying each workload manifest with
kubectl apply. - How many times: Once per workload, so it repeats for each workload deployed.
Each workload requires a separate apply operation, so as you add more workloads, the number of operations grows directly with the number of workloads.
| Input Size (n) | Approx. Api Calls/Operations |
|---|---|
| 10 | 10 apply operations |
| 100 | 100 apply operations |
| 1000 | 1000 apply operations |
Pattern observation: The total operations increase in a straight line as workloads increase.
Time Complexity: O(n)
This means the time to deploy grows directly in proportion to the number of workloads you deploy.
[X] Wrong: "Deploying multiple workloads happens all at once, so time stays the same no matter how many workloads."
[OK] Correct: Each workload requires its own deployment step, so more workloads mean more steps and more time.
Understanding how deployment time grows with workload count helps you plan and explain scaling in cloud environments confidently.
"What if we deployed all workloads using a single combined manifest file? How would the time complexity change?"