me
Mohamed G.

A whatever blog.

Github RSS
  • Home
  • Posts
  • About
Feb 2, 2025 • 13 min. read

2 Nodes k8s Cluster with Terraform, Libvirt, and Ansible

What we are building Prerequisites The KVM host needs the following packages installed. Commands are for Debian/Ubuntu. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # Virtualization stack sudo apt-get update sudo apt-get install -y \ …

Oct 14, 2024 • 15 min. read

Single-Node Kubernetes Cluster with Terraform, Libvirt, and Ansible

Why This Stack? Running Kubernetes locally or in a homelab doesn’t require a cloud account. If you have a Linux host with KVM support, you can provision virtual machines with Terraform’s dmacvicar/libvirt provider, configure them with …

Sep 3, 2024 • 19 min. read

a simple k8s Network Plugin with eBPF

Prerequisites A working Kubernetes cluster for testing (a single-node kind or kubeadm cluster works perfectly) clang/llvm for compiling eBPF programs, bpftool What We’re Building Our plugin will handle a single, well-defined scope: pod-to-pod …

Aug 12, 2024 • 12 min. read

Tracing Tool with eBPF

What Is eBPF, and Why Should You Care? eBPF (extended Berkeley Packet Filter) started life as a packet filtering mechanism, but it has evolved into a general-purpose in-kernel virtual machine. The key properties that make it so powerful: Safety. eBPF …

Jul 30, 2024 • 4 min. read

Local IaC with Terraform & KVM

Phase 1: Host Preparation 1. Install KVM and Libvirt tools (Commands for Ubuntu/Debian) 1 2 sudo apt update sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst libvirt-daemon virt-manager 2. Install ISO generation …

Jun 21, 2024 • 2 min. read

Understanding TShark

Basic Usage 1 2 3 4 5 6 tshark -i <interface> # Capture on interface (e.g., eth0) tshark -r <file.pcap> # Read from capture file tshark -w <file.pcap> # Write capture to file tshark -c <num> # Stop after capturing <num> …

May 1, 2024 • 2 min. read

Understanding PYC: Python Compiled Files

Python Compiled Files (.pyc) are binary files generated by Python when a script is executed. These files contain the compiled bytecode, which helps Python run programs faster by skipping the compilation step on subsequent runs. When you import a …

Apr 10, 2024 • 2 min. read

Building a Firewall with iptables

Phase 1 1. View Current Rules Check if you already have firewall rules running. 1 sudo iptables -L -v -n 2. If you want a clean slate, flush the existing rules. Note: If the default policy is currently set to DROP, running this will lock you out …

© 2026 All rights reserved.