Deploy an EKS Cluster

Use Terraform to deploy an EKS cluster.
The repository EKS folder contains a Terraform plan that deploys a Kubernetes cluster in Amazon's Elastic Kubernetes Service (EKS). This cluster meets the minimum requirements to support a CN-Series firewall and can span multiple availability zones for maximum redundancy and scalability.
  1. Configure the AWS CLI with your credentials.
    $ aws configure
    AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: ENTER
  2. Create a
    terraform.tfvars
    file and add the following variables and their associated values.
    location = ""                  # The AWS region
    ssh_key = ""                  # The contents of your SSH public key
  3. Initialize the Terraform providers.
    terraform init
  4. Validate the Terraform plan.
    terraform plan
  5. Apply the Terraform plan.
    $ terraform apply
  6. Update the kubeconfig file with the new cluster's information.
    $ aws eks update-kubeconfig --name $(terraform output eks_cluster_name)
  7. Verify the cluster nodes have been built and their status is Ready.
    $ kubectl get nodes
    NAME STATUS ROLES AGE VERSION ip-192-168-42-180.us-west-2.compute.internal Ready <none> 42m v1.14.9 ip-192-168-67-38.us-west-2.compute.internal Ready <none> 42m v1.14.9

Recommended For You