Amazon EKS on Windows

MouliVeera
3 min readAug 5, 2021

Amazon Elastic Kubernetes Service (Amazon EKS) gives you the flexibility to start, run, and scale Kubernetes applications in the AWS Cloud or on-premises.

EKS makes it easy to standardize operations across every environment. You can run fully managed EKS clusters on AWS.

Follow for more information: https://aws.amazon.com/eks/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc&eks-blogs.sort-by=item.additionalFields.createdDate&eks-blogs.sort-order=desc

Install AWS CLI:

To access Amazon EKS, we need to configure AWS CLI. Follow the instructions.

  1. Download the appropriate MSI installer:

AWS CLI MSI installer for Windows (64-bit): https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi

AWS CLI MSI installer for Windows (32-bit): https://s3.amazonaws.com/aws-cli/AWSCLI32PY3.msi

AWS CLI combined setup file for Windows: https://s3.amazonaws.com/aws-cli/AWSCLISetup.exe (includes both the 32-bit and 64-bit MSI installers, and automatically installs the correct version)

2. Double click on the .exe file install the package on your Windows machine.

By default, the AWS CLI version 1 installs to C:\Program Files\Amazon\AWSCLI (64-bit version) or C:\Program Files (x86)\Amazon\AWSCLI (32-bit version).

3. To confirm the installation, use the aws --version command at a command prompt (open the Start menu and search for cmd to start a command prompt).

C:\> aws --version
aws-cli/1.19.3 Python/3.7.4 Windows/10 botocore/1.13

Ref: https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html

We are done with AWS CLI installation now.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Let's configure AWS CLI To access AWS resources.

Run:

aws ConfigureAccess Key:XXXXX #Enter your IAM Access key
SecretKEY: XXXXX #Enter your IAM Secret key
Default region: #us-east-1 or leave it black to use the default.
Output format: #table or leave it black to use the default.

Ref: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Its time for setting up The Kubernetes command-line tool[kubectl]

  1. Install kubectl using the link https://dl.k8s.io/release/v1.22.0/bin/windows/amd64/kubectl.exe

Or if you have curl installed in your workstation, use this command:

curl -LO https://dl.k8s.io/release/v1.22.0/bin/windows/amd64/kubectl.exe

2. It downloads packages into your Downloads . Create a directory calledkube and move the package to that directory.

3. Add the binary to your PATH [Which allows you to run kubectl commands from anywhere in your work station]
Note: PATH Location: ~/Downloads/kube

Go to Advanced System settings>Environment Variables and edit the path

Ref: https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/

3. Check kubectl command working status.
4. Open new PowerShell windows and run “kubectl — version

If it results in kubectl version details; we are done with kubectl setup.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Now you need to set up EKS to access Kubernetes resources using kubectl commands.

aws eks --region <REGION> update-kubeconfig --name <CLUSTER-NAME>
  • Use the below commands to check the context details:
kubect config get-contexts
  • Use the below commands to rename the contexts as per our convenience.
kubectl config rename-context <OLD_CONTEXT> <NEW_CONTEXT>

Thanks.

--

--

MouliVeera

Mouli is a seasoned DevOps Engineer with expertise in designing and optimising CI/CD pipelines, containerisation with Docker and Kubernetes.