Skip to content

The repository tech-challenge-eks contains configuration files for creating an cluster EKS on AWS.

License

Notifications You must be signed in to change notification settings

team-tech-challenge/tech-challenge-eks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tech-challenge-eks

Maintenance MIT License Terraform GitHub Actions

The repository tech-challenge-eks contains configuration files for creating an cluster EKS on AWS.

Table of Contents

Requirements

The following tools are required to run the project:

Name Version
terraform >= 1.7.5
aws >= 3.0
kubectl >= 1.31.0
kustomize >= 5.4.2

Installation

  1. Clone the repository:
git clone https://github.com/team-tech-challenge/tech-challenge-eks.git
  1. Change to the directory:
cd tech-challenge-eks
  1. Change to the directory project Terraform:
cd iac
  1. Initialize Terraform:
terraform init -upgrade -backend-config="bucket=${BUCKET_NAME}" -backend-config="key=${PROJECT_NAME}/terraform.tfstate" -backend-config="region=us-east-1"
  1. Create the Terraform plan:
terraform plan -var-file="terraform.tfvars"
  1. Validate the Terraform plan:
terraform validate -var-file="terraform.tfvars"
  1. Apply the Terraform plan:

WARNING: The command will create the resources on AWS

⚠️ To execute terraform apply, you need to execute it in GitHub Actions.

Usage

Your need install the AWS CLI and configure the credentials.

  1. Download the AWS CLI:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
  1. Unzip the file:
unzip awscliv2.zip
  1. Install the AWS CLI:
sudo ./aws/install
  1. Configure the AWS CLI:
aws configure
  1. Download o Kubeconfig file:
aws eks --region us-east-1 update-kubeconfig --name ${CLUSTER_NAME} --profile ${PROFILE_NAME}

Kubernetes

Example commands to use in the management of the cluster:

  1. Check the nodes:
kubectl get nodes
  1. Check the pods:
kubectl get pods -A
  1. Check the services:
kubectl get svc -A
  1. Check the deployments:
kubectl get deployments -A
  1. Check the namespaces:
kubectl get namespaces
  1. Check the configmaps:
kubectl get configmaps -A
  1. Check the secrets:
kubectl get secrets -A
  1. Execute in the port-forward:
kubectl port-forward svc/${SERVICE_NAME} ${PORT_LOCAL}:${PORT_SERVICE} -n ${NAMESPACE}
  1. Execute in the logs:
kubectl logs -f ${POD_NAME} -n ${NAMESPACE}
  1. Execute in the exec:
kubectl exec -it ${POD_NAME} -n ${NAMESPACE} -- /bin/bash
  1. Execute in the describe:
kubectl describe ${RESOURCE} ${RESOURCE_NAME} -n ${NAMESPACE}

License

This project is licensed under the MIT License. See the LICENSE file for more details.


References


About

The repository tech-challenge-eks contains configuration files for creating an cluster EKS on AWS.

Topics

Resources

License

Stars

Watchers

Forks

Languages