Simple Nginx website using EKS

Step 1: Create an IAM user for admin priviliges

Step 2: Launch an EC2 instance in your desired region and ssh into the instance.

Step 3: Install eksctl and kubectl using the links below:

Step 4: Use eksctl to provision an EKS cluster with three worker nodes in your region

$ eksctl create cluster –name myeks1 –version 1.16 –region eu-central-1 –nodegroup-name my-workers –node-type t3.micro –nodes 1 –nodes-min 1 –nodes-max 1 –managed

Alternatively, you can create a cluster using a config file instead of flags.

First, create cluster.yaml file:

kind: ClusterConfig

name: basic-cluster
region: eu-central-1


  • name: my-workers
    instanceType: t3.micro
    desiredCapacity: 3
    volumeSize: 20
    allow: true # will use ~/.ssh/ as the default ssh key
  • name: my-workers2
    instanceType: t2.micro
    desiredCapacity: 2
    volumeSize: 10
    publicKeyPath: ~/.ssh/

Next, run this command:

  eksctl create cluster -f cluster.yaml

If you needed to use an existing VPC, you can use a config file like this:

kind: ClusterConfig

name: cluster-in-existing-vpc
region: eu-central-1

eu-central-1a: { id: subnet-a45bf2cd }
eu-central-1b: { id: subnet-23945c58 }


  • name: my-workers
    labels: { role: workers }
    instanceType: t3.micro
    desiredCapacity: 3
    privateNetworking: true

Step 5 – Use the following command to view your cluster

eksctl get cluster

Step 6 – The following command will enable you to connect to your cluster. It allows kubectl to connect to the EKS cluster:

aws eks update-kubeconfig –name wordpress –region eu-central-1

Step 7 – sudo yum install git

Step 8 – git clonse

Step 9 – cd Course_EKS-Basics

Step 10 – kubectl apply -f ./nginx-svc.yaml

Step 11 – kubectl get service

Step 12 – kubectl apply -f ./nginx-deployment.yaml

Step 13 – kubectl get deployment

Step 14 – kubectl get pod

Step 15 – kubectl get rs

Step 16 – kubectl get node

Lastly, you can get access to your website using the loadbalancer DNS name.

No token or token has expired.