Skip to main content

Posts

Showing posts from September, 2025

Terraform Directory Structure

 🚀 Terraform Directory Structure  If you're building infrastructure at scale, your Terraform project structure can make or break your workflow. This image from HashiCorp is a gold standard for organizing Terraform code. It separates concerns cleanly across: 📁 Environments – Dev, Staging, Prod, each with its own main.tf, variables.tf, and outputs.tf.  📦 Modules – Reusable components like VPC and EC2 to keep your code DRY and scalable.  🛠️ Scripts – Shell scripts (init.sh, terraform.sh) to automate setup and deployment.  ⚙️ Configuration Files – Provider, backend, and variable definitions that power your infrastructure. 💡 Pro tip: Use terraform.tfvars in environments like Dev and Prod to inject variable values without hardcoding them.

Troubleshooting VM Network Connectivity Issues in VMware

 🚦 Troubleshooting VM Network Connectivity Issues in VMware 🚦 When a virtual machine suddenly loses network connectivity, it’s not always obvious where the problem lies — it could be the VM itself, the vSwitch, uplinks, VLANs, or even the physical switch. Here’s a step-by-step flow you can follow to quickly isolate and resolve the issue: 🔎 Troubleshooting Process 1️⃣ Validate Port Group & vSwitch ✔ Ensure the VM’s network adapter is connected to the right port group. ✔ Port group name must exist and be spelled correctly. 2️⃣ Check VM Network Adapter & OS Settings ✔ Verify NIC is connected. ✔ Confirm guest OS has the right IP/DNS/Gateway. ✔ Run basic ping/traceroute tests. 3️⃣ Verify Physical NICs (pNICs) & Uplinks ✔ Use esxtop → n to check which pNIC the VM is mapped to. ✔ Shut down physical switch ports one by one to detect uplink misconfigurations. ✔ Use netdbg vswitch instance list to identify active uplinks. 4️⃣ Validate VLAN Configuration ✔ Ensure VLAN ID on the...

Top 10 high-level EC2 scenario-based questions to challenge your AWS & DevOps skills

 Here are 10 high-level EC2 scenario-based questions to challenge your AWS & DevOps skills 1. Your EC2 instance is running but you can’t connect via SSH. What troubleshooting steps will you take?  Check Security Group inbound rules (port 22 open to your IP).  Verify Network ACLs (NACLs not blocking inbound/outbound).  Confirm instance’s Public IP / Elastic IP.  Validate Key Pair and correct permissions on .pem.  Ensure SSM Agent is installed (Session Manager can help).  Check system logs on the console for OS-level issues. 2. You terminated an EC2 instance by mistake. How can you prevent this in the future? Enable Termination Protection in EC2 settings. Use IAM permissions to restrict TerminateInstances. Tag critical instances and set resource policies. 3. Your EC2 instance needs to access an S3 bucket securely. What’s the best way to configure this? Best practice: Attach an IAM Role with least privilege policy to the EC2 instance. Avoid hardcoding...

DevOps Engineer Interview Questions

 DevOps Engineer Interview Questions You Must Crack to Land That 20+ LPA Package 𝐋𝐢𝐧𝐮𝐱 & 𝐒𝐜𝐫𝐢𝐩𝐭𝐢𝐧𝐠 1. What are some common Linux commands you use daily as a DevOps engineer, and in what scenarios? 2. How would you troubleshoot a Linux server with high CPU or memory usage? 𝐕𝐞𝐫𝐬𝐢𝐨𝐧 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 (𝐆𝐢𝐭 & 𝐆𝐢𝐭𝐇𝐮𝐛/𝐆𝐢𝐭𝐋𝐚𝐛) 3. Explain Git branching strategies (Git Flow, Trunk Based). Which one do you prefer and why? 4. How do you resolve a Git merge conflict in a CI/CD pipeline? 𝐂𝐈/𝐂𝐃 (𝐉𝐞𝐧𝐤𝐢𝐧𝐬 / 𝐆𝐢𝐭𝐋𝐚𝐛 𝐂𝐈 / 𝐆𝐢𝐭𝐇𝐮𝐛 𝐀𝐜𝐭𝐢𝐨𝐧𝐬) 5. Walk me through how you would design a CI/CD pipeline for a microservices-based application. 6. How do you secure credentials and secrets in a Jenkins or GitLab pipeline? 𝐂𝐨𝐧𝐭𝐚𝐢𝐧𝐞𝐫𝐬 (𝐃𝐨𝐜𝐤𝐞𝐫) 7. What is the difference between Docker image and container? 8. How do you reduce the size of a Docker image in production? 𝐊𝐮𝐛𝐞𝐫𝐧𝐞𝐭𝐞𝐬 9. What are the different types of Kubernet...

PWC Interview experience for Junior DevOps Engineer

 PWC Interview experience for Junior DevOps Engineer role ✅ Round 1: Screening Round (30 minutes) - Walk me through your current project architecture and your role in it. - Which DevOps tools have you worked with in the last 2 years? - What AWS services have you used in production? - How do you expose a Kubernetes application to external traffic? - What is the purpose of a NAT Gateway? - How do you check running processes in Linux? - What command would you use to find files larger than 100MB? - What is the difference between Deployment and StatefulSet in Kubernetes? - What is a ConfigMap, and how is it different from a Secret? - How do you check network connectivity between two servers? - Describe your experience with CI/CD pipelines. ✅ Round 2: Technical Round (60 minutes) - You have an application in Account A that needs to access an S3 bucket in Account B. How would you configure this? - Write a Dockerfile for a Node.js application with multi-stage builds. - How do you handle Te...

Troubleshooting Linux Servers.

Below are the commands useful for troubleshooting Linux Servers. ● top - Display running processes and system usage.  ● htop - Interactive process viewer.  ● ps - Display current processes. ● df - Show disk space usage. ● du - Show directory space usage.  ● free - Show memory usage.  ● uptime - Show system uptime.  ● uname - Show system information.  ● whoami - Display the current logged-in user.  ● lsof - List open files and associated processes.  ● vmstat - Report virtual memory statistics.  ● iostat - Report I/O statistics. ● netstat - Display network connections and routing tables.  ● ifconfig - Display or configure a network interface.  ● ping - Check network connectivity.  ● traceroute - Track the route packets take to a destination. ● curl - Transfer data from or to a server. ● wget - Download files from the internet.  ● ssh - Secure shell to a remote server.  ● telnet - Connect to a remote machine.  ● nsl...