Amazon EKS
This document describes the necessary steps for installing Apinizer on Amazon EKS (Elastic Kubernetes Service). In the first 6 sections, AWS EKS installation, resource creation and usage steps are described step by step from the beginning. If there is a ready EKS cluster on AWS, you can start directly from section 7.
1. Introduction
Minimum System Requirements
For Apinizer installation on AWS EKS Cluster, the total CPU Cores of Compute Nodes to be defined in the Node Group must be at least 6 cores.
If t3.medium type server is selected, 3 are required.
If you add t3.xlarge type server, 2 will be sufficient.
What is AWS EKS (Elastic Kubernetes Service)?
Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service you can use to run Kubernetes on AWS without needing to install, operate, and maintain your own Kubernetes Control Plane (Master) or nodes (Worker Nodes).
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

2. Configure EKS VPC and Subnets
What is AWS VPC and Subnet?
Amazon AWS VPC (Virtual Private Cloud) is a private virtual network within AWS. In other words, it can be called AWS's network infrastructure component. It is an advanced virtual network infrastructure developed by Amazon AWS for all components to be created on AWS to communicate with each other.
Within VPC, we can create networks, subnets, gateways specific to our own use. Connections between different networks and subnets can be provided with Route tables belonging to them.

VPC Subnet: After creating a specific network on AWS, subnets belonging to this network can be created. By following the steps below, subnets can be created on AWS VPC.

VPC and Subnets for EKS need to be set correctly and subnets need to be defined as specified in AWS documentation. If you don't know VPC and subnet definition, you can use AWS's ready template.
For details: AWS EKS VPC Documentation
Creating and Configuring AWS VPC
By following the steps below, the network structure suitable for EKS will be installed automatically.
For details: AWS CloudFormation Console

3. Configure EKS IAM Roles
What is AWS Identity and Access Management (IAM) Role?
Using AWS Identity and Access Management (IAM), you can determine who can access AWS services and resources under what conditions.
IAM is a feature of your AWS account and is provided at no additional charge. IAM is not something running like an instance or a database in terms of structure, but entirely manages permissions for us, managing all users who have access to the AWS account used, from who can access which service in what way.
IAM manages 6 main topics in terms of main concept:
- Users
- Groups
- Roles
- IAM Access Policies
- API Keys
- Password policy, MFA

For detailed information: What is AWS IAM?
Creating and Configuring AWS IAM
Go to the Roles page from the left menu and create a new Role.

In this section, we need to create two Roles. The first is the Role to be used for EKS cluster, and the second is the Role information that Worker Node Groups within EKS will use.
1. Creating the Role to be Used by EKS Cluster
To create a role, the operations in the given images should be performed in order.




Continue on the incoming page without entering any key-value information.

The IAM role to be used by the EKS cluster should be created. This role should contain the necessary permissions for the EKS cluster to access AWS services.
2. Creating the Role to be Used by EKS Cluster Worker Node Groups


The following Policies should be selected for this Role.

The IAM role to be used by Worker Node Groups should be created. This role should contain the necessary permissions for worker nodes to access AWS services (EC2, EBS, ELB, etc.).
4. Installing EKS Master Node
Creating and Configuring AWS EKS (Elastic Kubernetes Service)
After completing the above steps, AWS EKS installation can be started.
Continue the process by typing EKS in the search section.


Select the cluster name, the kubernetes version we want to use, and the IAM role we created earlier.
Select cluster name, Kubernetes version and IAM role.

Select VPC and subnets. It is recommended to select at least 2 subnets for EKS.



Select CloudWatch Log Group or create a new log group. This section can be configured as desired.

Finally, the defined information is displayed. At this stage, no error is seen. Start creating the cluster by saying Create.


The EKS Cluster is being created. This process takes approximately 5 minutes. While this process continues, we can download and configure the necessary tools to access and manage EKS from our Client computer.
5. Installing and Configuring AWS CLI and kubectl
Download the necessary tools from the addresses below. Since Windows will be used as the Client computer in this document, versions suitable for Windows are downloaded.
AWS CLI Installation
After installing the downloaded .msi tool, configure it according to your Cluster information as follows.
For details: AWS CLI Getting Started Guide
Access Key and Secret Key information are obtained from IAM Console.

Go to Access information by clicking the Manage access keys button from the incoming screen.


Access Key and Secret information are displayed in the window below. This information should be saved somewhere before closing the window.

aws configure
Start the configuration process by entering the Access Key and Secret information recorded earlier.

KUBECTL Installation
Kubectl should be downloaded to match the cluster version.
For details: AWS EKS kubectl Installation Guide
Kubectl is downloaded for Windows and added to PATH.
# Example Configuration Command
aws eks update-kubeconfig --region [EKS_Region] --name [EKS_Cluster_Name]
Here, region information can be obtained from the top menu as seen in the image below. Similarly, the cluster name can be obtained by going to the EKS page.
The section we need is eu-central-1.


To check cluster status:
aws eks --region eu-central-1 describe-cluster --name apinizer-eks-cluster1 --query cluster.status
If multiple clusters are managed, kubeconfig information should be updated as follows:
aws eks --region eu-central-1 update-kubeconfig --name apinizer-eks-cluster2
6. Creating EKS Worker Nodes
This section describes the creation of Worker Nodes for EKS. Go to AWS Console again and apply the following steps.
Create a new node group with the "Add Node Group" option from EKS Console.

For node group:
- Node group name
- IAM role (worker node role created earlier)
- Instance type (e.g.: t3.medium, t3.xlarge)
- Disk size
are selected.


Minimum, maximum and desired node numbers are determined for node group.


Subnets are selected and SSH key pair is determined.

Finally, the defined information is displayed. If no error is seen at this stage, start creating the cluster by saying Create.


This process takes approximately 5 minutes. After the installation is completed and activated, deployment etc. operations can be done with the previously configured kubectl.
The image showing that Node Group installation is completed is below:


7. EKS Installation Test and Sample Deployment
From this stage, checking the kubernetes cluster with kubectl whose installation and definitions were made earlier and testing it with a sample nginx application is described.
AWS EKS Environment Test
Kubernetes cluster resources should be checked by following the commands below.
aws eks --region eu-central-1 describe-cluster --name apinizer-eks-cluster --query cluster.status
aws eks --region eu-central-1 update-kubeconfig --name apinizer-eks-cluster
kubectl get nodes
