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 |
- Clone the repository:
git clone https://github.com/team-tech-challenge/tech-challenge-eks.git- Change to the directory:
cd tech-challenge-eks- Change to the directory project Terraform:
cd iac- Initialize Terraform:
terraform init -upgrade -backend-config="bucket=${BUCKET_NAME}" -backend-config="key=${PROJECT_NAME}/terraform.tfstate" -backend-config="region=us-east-1"- Create the Terraform plan:
terraform plan -var-file="terraform.tfvars"- Validate the Terraform plan:
terraform validate -var-file="terraform.tfvars"- Apply the Terraform plan:
⚠️ To executeterraform apply, you need to execute it in GitHub Actions.
Your need install the AWS CLI and configure the credentials.
- Download the AWS CLI:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"- Unzip the file:
unzip awscliv2.zip- Install the AWS CLI:
sudo ./aws/install- Configure the AWS CLI:
aws configure- Download o Kubeconfig file:
aws eks --region us-east-1 update-kubeconfig --name ${CLUSTER_NAME} --profile ${PROFILE_NAME}- Check the nodes:
kubectl get nodes- Check the pods:
kubectl get pods -A- Check the services:
kubectl get svc -A- Check the deployments:
kubectl get deployments -A- Check the namespaces:
kubectl get namespaces- Check the configmaps:
kubectl get configmaps -A- Check the secrets:
kubectl get secrets -A- Execute in the port-forward:
kubectl port-forward svc/${SERVICE_NAME} ${PORT_LOCAL}:${PORT_SERVICE} -n ${NAMESPACE}- Execute in the logs:
kubectl logs -f ${POD_NAME} -n ${NAMESPACE}- Execute in the exec:
kubectl exec -it ${POD_NAME} -n ${NAMESPACE} -- /bin/bash- Execute in the describe:
kubectl describe ${RESOURCE} ${RESOURCE_NAME} -n ${NAMESPACE}This project is licensed under the MIT License. See the LICENSE file for more details.