Skip to content

explicit-logic/python-module-14.3

Repository files navigation

Module 14 - Automation with Python

This repository contains a demo project created as part of my DevOps studies in the TechWorld with Nana – DevOps Bootcamp.

Demo Project: Automate displaying EKS cluster information

Technologies used: Python, Boto3, AWS EKS

Project Description:

  • Write a Python script that fetches and displays EKS cluster status and information

Prerequisites

  • Python 3.12+ and uv for dependency management
  • Terraform for provisioning the EKS cluster
  • An AWS account with permissions to manage EKS, EC2, and VPC resources

Install Python dependencies:

uv sync

Configure AWS credentials at ~/.aws/credentials:

[default]
aws_access_key_id = AKIA...
aws_secret_access_key = ...

And the default region at ~/.aws/config:

[default]
region = us-east-1

Overview

1. Provision the EKS cluster with Terraform

Copy the example variables file and adjust values as needed:

cp terraform.tfvars.example terraform.tfvars

Review the planned changes, then apply:

terraform init
terraform plan
terraform apply

2. Run the status check script

With the cluster running, fetch its status and information:

python3 eks-status-checks.py

3. Clean up

Tear down the cluster and all associated resources:

terraform destroy

About

Automate displaying EKS cluster information

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors