teluzia.Cloud Engineer · Day 121
CHAPTER 18 · AMAZON EKS AND HELM

Terraform provisioning for EKS

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

Terraform provisioning builds the cluster’s foundations and control room; application deployment is a later responsibility with separate prerequisites. An EKS project needs reviewed networking, cluster role, cluster settings, access configuration, compute roles/capacity, and relevant add-ons. Version and compatibility requirements must be checked. Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed. Review the actual resources managed by an EKS module or provider configuration and pin deliberate versions. Modules can create supporting infrastructure and permissions with ongoing cost. Terraform planning for Kubernetes resources also needs a usable cluster endpoint and valid access, which may require staged workflows.

Think of it this way

Terraform provisioning builds the cluster’s foundations and control room; application deployment is a later responsibility with separate prerequisites.

TOPIC 01 / 03Step by step

Infrastructure dependency order

An EKS project needs reviewed networking, cluster role, cluster settings, access configuration, compute roles/capacity, and relevant add-ons. Version and compatibility requirements must be checked. Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed. For example, network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

WORKED EXAMPLE
Network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

Plan EKS infrastructure in dependency order: suitable subnets and network paths, cluster role and permissions, cluster configuration, compute roles and capacity, access configuration, and required add-ons. Then verify the cluster endpoint and workload capacity before application deployment. Dependencies are not just file ordering; references and provider behavior determine the actual plan graph.

A prerequisite must exist before another component works. An add-on supplies selected cluster functionality. Compatibility describes supported combinations of Kubernetes, add-on, provider, module, and compute versions. Check current requirements rather than reuse a years-old example unchanged. Nodes may fail to join because of identity or connectivity even when the cluster object exists. Some modules create additional networking or permissions, so inspect their resource inventory. Provisioning a managed control plane is only one milestone. Document what must be ready for kubectl, image pulls, storage, DNS, and application AWS calls before claiming an operational cluster.

Why this matters

Network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

A common trap

Do not overlook this operational distinction: Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

Infrastructure dependency order

An EKS project needs reviewed networking, cluster role, cluster settings, access configuration, compute roles/capacity, and relevant add-ons. Version and compatibility requirements must be checked. Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed. For example, network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

WORKED EXAMPLE
Network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

Plan EKS infrastructure in dependency order: suitable subnets and network paths, cluster role and permissions, cluster configuration, compute roles and capacity, access configuration, and required add-ons. Then verify the cluster endpoint and workload capacity before application deployment. Dependencies are not just file ordering; references and provider behavior determine the actual plan graph.

A prerequisite must exist before another component works. An add-on supplies selected cluster functionality. Compatibility describes supported combinations of Kubernetes, add-on, provider, module, and compute versions. Check current requirements rather than reuse a years-old example unchanged. Nodes may fail to join because of identity or connectivity even when the cluster object exists. Some modules create additional networking or permissions, so inspect their resource inventory. Provisioning a managed control plane is only one milestone. Document what must be ready for kubectl, image pulls, storage, DNS, and application AWS calls before claiming an operational cluster.

Why this matters

Network and IAM prerequisites exist before cluster creation, and nodes must join before ordinary Pods can be scheduled.

A common trap

Do not overlook this operational distinction: Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed.

Provider and module review

Review the actual resources managed by an EKS module or provider configuration and pin deliberate versions. Modules can create supporting infrastructure and permissions with ongoing cost. Terraform planning for Kubernetes resources also needs a usable cluster endpoint and valid access, which may require staged workflows. For example, separate AWS infrastructure planning from Kubernetes resource deployment until the API is reachable with the correct identity.

WORKED EXAMPLE
Separate AWS infrastructure planning from Kubernetes resource deployment until the API is reachable with the correct identity.

Terraform first manages AWS infrastructure through the AWS provider. A Kubernetes or Helm provider then needs a real reachable cluster API and appropriate credentials. During an initial build, those prerequisites may not exist when configuration is evaluated or planning attempts API access. A staged infrastructure-then-workload workflow can make the boundary clearer and avoid assuming future outputs are already live services.

A provider implements API interaction. A module packages configuration and may create many resources. A version pin controls selected implementation changes. Inspect module defaults for public endpoints, roles, node sizing, and supporting cost. State may contain sensitive operational attributes, so protect both infrastructure and workload state. Staging simplifies prerequisite diagnosis but adds orchestration and dependency management. Verify a current reviewed plan after each stage, rather than automatically apply all remaining work because the first command succeeded. A module's popularity is not evidence that its defaults fit your account's security or cost requirements.

Why this matters

Separate AWS infrastructure planning from Kubernetes resource deployment until the API is reachable with the correct identity.

A common trap

Do not overlook this operational distinction: Terraform planning for Kubernetes resources also needs a usable cluster endpoint and valid access, which may require staged workflows.

Cost and teardown planning

Estimate control-plane, node, storage, load-balancer, transfer, and networking costs before creation. Budget alerts are delayed notifications, not hard caps. Teardown should remove Kubernetes-created external resources while the cluster still exists, then delete compute and cluster infrastructure in reviewed scope. For example, delete a practice LoadBalancer Service before destroying its cluster so controller cleanup can remove the associated external load balancer.

WORKED EXAMPLE
Delete a practice LoadBalancer Service before destroying its cluster so controller cleanup can remove the associated external load balancer.

Before creating a learning cluster, estimate control-plane, node, storage, load-balancer, transfer, and networking charges. Set bounded capacity and a planned teardown time. During cleanup, remove application-created external resources while their controllers still exist, verify their deletion, decide which data to retain, and then remove the reviewed cluster infrastructure.

An ancillary resource supports the main workload but can charge independently. Ownership identifies who may safely remove it. Retention preserves selected data after compute deletion. Budget notifications may arrive after usage and are not an immediate hard cap. A LoadBalancer Service can create AWS infrastructure outside a simple Terraform application's explicit resource list, so deleting only that list may leave costs. Conversely, broad account listings include other teams' resources. Use tags, IDs, account, and region to verify practice ownership. Teardown must preserve required data while proving unwanted ongoing resources were actually removed.

Why this matters

Delete a practice LoadBalancer Service before destroying its cluster so controller cleanup can remove the associated external load balancer.

A common trap

Do not overlook this operational distinction: Teardown should remove Kubernetes-created external resources while the cluster still exists, then delete compute and cluster infrastructure in reviewed scope.

KEEP THESE WITH YOU

Today’s takeaways

Infrastructure dependency order: An EKS project needs reviewed networking, cluster role, cluster settings, access configuration, compute roles/capacity, and relevant add-ons. Version and compatibility requirements must be checked. Avoid a one-click mental model: dependency readiness and identity affect whether the next stage can proceed.

Provider and module review: Review the actual resources managed by an EKS module or provider configuration and pin deliberate versions. Modules can create supporting infrastructure and permissions with ongoing cost. Terraform planning for Kubernetes resources also needs a usable cluster endpoint and valid access, which may require staged workflows.

Cost and teardown planning: Estimate control-plane, node, storage, load-balancer, transfer, and networking costs before creation. Budget alerts are delayed notifications, not hard caps. Teardown should remove Kubernetes-created external resources while the cluster still exists, then delete compute and cluster infrastructure in reviewed scope.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed