Designing Compute solutions in AWS - Level 3
Installing EKS CLI Tools
1h 27m

This course covers the core learning objective to meet the requirements of the 'Designing Compute solutions in AWS - Level 3' skill

Learning Objectives:

  • Evaluate and enforce secure communications when using AWS elastic load balancers using HTTPS/SSL listeners
  • Evaluate when to use a serverless architecture compared to Amazon EC2 based upon workload performance optimization
  • Evaluate how to implement fully managed container orchestration services to deploy, manage, and scale containerized applications

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
Carlos Rivas
Sr. AWS Content Creator
Learning Paths

Software Development has been my craft for over 2 decades. In recent years, I was introduced to the world of "Infrastructure as Code" and Cloud Computing.
I loved it! -- it re-sparked my interest in staying on the cutting edge of technology.

Colleagues regard me as a mentor and leader in my areas of expertise and also as the person to call when production servers crash and we need the App back online quickly.

My primary skills are:
★ Software Development ( Java, PHP, Python and others )
★ Cloud Computing Design and Implementation
★ DevOps: Continuous Delivery and Integration