1. Home
  2. Training Library
  3. Containers (DVA-C01)

Installing EKS CLI Tools


Microservices & Elastic Container Service (ECS)
Elastic Container Registry (ECR)

The course is part of this learning path

Installing EKS CLI Tools
1h 7m

This course provides detail on the AWS Container services relevant to the Developer - Associate exam, covering ECS, ECR, and EKS

Want more? Try a lab playground or do a Lab Challenge!

Learning Objectives

  • Learn about microservices and the benefits that a microservice-based architecture or application has over a monolithic application 
  • Understand the difference between containers and virtual machines
  • Learn how to create your own containers and run them within ECS and deploy them either serverlessly or on EC2 instances
  • Understand what the Elastic Container Registry is used for and its components
  • Understand what the Elastic Kubernetes Service is used for and its components
  • Understand how EKS implements and deploys clusters into a VPC 
  • Learn how to use, control, manage and measure an EKS Kubernetes cluster deployed application



Okay, welcome back. In this demonstration, we're going to set up our tool line to allow us to communicate and create our EKS clusters. So there are three tools that we're going to install. The first is kubectl. The second is the AWS IAM authenticator, and the third one is a helper utility called eksctl. So let's now discuss each of these three tools. So those unfamiliar with kubectl, kubectl is a command line interface, for running commands against Kubernetes clusters. The AWS IAM authenticator is a tool that allows you to use AWS IAM credentials to authenticate against Kubernetes clusters. And eksctl provides a nice abstraction for creating clusters. It's a command line interface tool, and provides a very simple method for bringing clusters up. 

As we'll see later on, all you need to do to bring up a EKS cluster is run eksctl create cluster, and underneath it will take care of all of the wiring up of the various, individual components. Okay, let's begin the installation. So the first thing we'll do, is we'll navigate to the getting started with Amazon EKS guide that AWS provides. Navigating down, we'll jump to the instructions for installing kubectl. As you can see, Amazon has provided operating system specific binaries for kubectl. Since I'm running on a Mac, I can use the MacOS version, or simply I can copy this command here. We'll jump into the terminal. I'll quickly do a directory listing. That's empty. I'll paste the command that I just copied, and this will download the version specific for MacOS. Okay, that's finished. We'll do a directory listing again, and you can see that we've downloaded the binary. Next, we'll add execute permissions to it. So, we do so by running chmod + x, and then the binary. 

Do a directory listing again, and you can see now that it's got the execute permissions. From here, we want to move or copy the binary kubectl into our /usr/local/bin/ directory. And to ensure that we run this particular version of kubectl, we need to update our path variable. So we'll prepend the directory that we just copied it into, to the path environment variable, and then, we can simply run the command, we'll query the version of it. We only want the client version portion. And here we see we've got version 1.10.3. Now, it's very important that you run with the 1.10 or greater version of kubectl, as this particular version is designed to integrate with the AWS IAM authenticator, which we'll install next. So that's a good start. Okay, we'll jump back to the AWS documentation. And the next thing we'll do is install the AWS IAM authenticator. Again, AWS provides operating system versions for this particular binary, and again, because we're running on MacOS, I'll just copy this command here. I'll jump back into my terminal, paste the command, and this will download the AWS IAM authenticator locally. I'll do a directory listing. We can see we've downloaded the AWS IAM authenticator.

 I'll add execute permissions to it. Again, that's now executable. We'll again copy it into /usr/local/bin/. Because we updated the path environment variable previously, we know that this will run when we request for it. So now we can test it by running AWS IAM authenticator, with the help parameter. And here you can see that this particular binary has run successfully. And, finally, to install the eksctl utility, we can do a brew install weaveworks/tap/eksctl So here you can see that I'm being informed that I've already got this installed as expected, but I can upgrade it, by running brew upgrade eksctl, which I'll do. Okay, so that's completed successfully, so we can now test it out. Eksctl and we can run it with the parameter help. And again, you can see that that's completed, so the binary has been successfully installed.

 Okay, the next prerequisite that we need to ensure has been installed is the AWS CLI. So we can simply run aws iam get user, to see whether we have the AWS CLI set up. So it's installed on this machined, but I haven't yet configured the credentials that it operates under, so I'll do that in the background. So here, I'll run, export AWS_PROFILE with the profile that I've got configured, and if I rerun that command, I can see now that I'm authenticated against my AWS account. So everything is configured locally. I can now go back to the eksctl command, run help again. I can see that there's a get to check for particular resources. So one final thing we'll do in this demonstration is to run eksctl get clusters, and this should return back empty, because I don't have any EKS clusters set up. Okay, so that succeeded, and as expected has come back with no clusters found. Okay, that completes this demonstration, in which we set up our three utilities that we're going to use to set up our EKS clusters. Go ahead and close this demonstration, and we'll see you shortly in the next one.

About the Author
Learning Paths

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, GCP, Azure), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).