馃憢 Hi there, I’m Suraj

I love Platform Engineering, Kubernetes, AWS, Golang & All things cloud native.

How to Check Temperature on Raspberry Pi

Keeping an eye on your Raspberry Pi temperature is important, especially if you are running heavy tasks like media servers, coding projects, or home automation. Overheating can cause throttling and reduce performance. Why Temperature Matters The Raspberry Pi automatically reduces CPU speed if it gets too hot, usually above 80掳C. Monitoring the temperature helps you: Prevent performance drops Avoid unexpected shutdowns Decide if you need a heatsink or fan Quick Way to Check Temperature Open the Terminal and run: ...

February 25, 2026 路 1 min 路 Suraj Narwade

Understanding inodes in Linux

What is inode? An inode (short for index node) is a data structure in a Linux filesystem that stores metadata about a file. Each file or directory in Linux has an inode associated with it, which contains, Inode Number Uid Gid Size Blocksize Mode Number of links ACLs, etc but it does not contain the filename, interesting right, more on that later. Inodes also stores permission bits that define how a file can be accessed: ...

November 12, 2025 路 4 min 路 Suraj Narwade

Exploring Crossplane #1: Introduction

(Image taken from official crossplane website) Managing infrastructure across multiple cloud providers can be complex and challenging. Enter Crossplane鈥攁 powerful, open-source Kubernetes native control plane that allows developers and platform teams to use Kubernetes to manage cloud resources like databases, storage, and networking across multiple cloud providers (AWS, GCP, Azure, etc.) and not limited to this and much more other non-cloud resources as well such as Pagerduty, Github, etc. In this introduction to Crossplane, we鈥檒l explore its core capabilities, why it鈥檚 gaining popularity, and where it鈥檚 particularly useful. ...

October 28, 2024 路 5 min 路 Suraj Narwade

Building mkdir (linux) command in Go

One of the best way to learn language is to try recreating familiar linux command in it. In one of the previous post, we have seen how we can implement simple which command, you can check the blog post here. In this blog post, we will try to implement mkdir command, Let鈥檚 get started. mkdir is one of the important commands in Linux which helps to create directories. we will cover following in the blog post: ...

October 25, 2024 路 3 min 路 Suraj Narwade

Understanding iota function in Go

Iota is predefined identifier which is used in constant declaration in Go. It is used to simplify incrementing value of constants. iota value always start at 0 and increments automatically by 1 for next constant. here鈥檚 the syntax for the iota, const ( a = iota // 0 b = iota // 1 c = iota // 2 ) or you can simply write it as, const ( a = iota b c ) Let鈥檚 look at simple example, ...

April 16, 2024 路 2 min 路 Suraj Narwade

Refactoring Terraform easily with moved block

As Terraform codebase grows, there are chances where you may need to refactor or rename resources in your codebase which can result into deletion and recreation of resources. This happens because terraform thinks that you want to delete and create new resource and it allocates new id to the resource. Instead, you should let terraform know that you want to simply move the resource instead of replacing it. To mimic this we will take simple example where we will have AWS instance with name a and we want to change it to b ...

April 2, 2024 路 2 min 路 Suraj Narwade

Piping Command Output in Go

In a previous blog post, we learned how to create and run commands in Go. Now, let鈥檚 explore how to recreate the following command: ls -l | grep hello Let鈥檚 create the first command: lsCmd := exec.Command("ls", "-l") Next, create the second command: grepCmd := exec.Command("grep", "hello") To connect them, we need to understand what鈥檚 happening in the Linux command. Essentially, we are taking the stdout of the first command ls -l and passing it to the stdin of the second command grep hello. To achieve this in Go, follow these steps: ...

September 10, 2023 路 3 min 路 Suraj Narwade

Running Shell Commands in Go using os/exec

Sometimes, there are certain use cases where you may have to run shell commands through a Golang app. This is where the os/exec package comes in handy. If you want to run a command like sleep 1, you can simply do the following: cmd := exec.Command("sleep", "1") err := cmd.Run() This will run the command and wait until the execution finishes, but it doesn鈥檛 capture the stdout. If you intend to capture both stdout and stderr, you can use the following code: ...

September 10, 2023 路 1 min 路 Suraj Narwade

Building which (Linux) command in Go

One of the best ways to learn a language is via building equivalent Linux commands using the language of your choice. which is my all-time favourite command to see if the binary is present on the server or not. You can see which usage as shown below, $ which kubectl-eks /Users/surajnarwade/.krew/bin/kubectl-eks We simply pass the binary name to which command and it will give us the absolute path to the binary. ...

September 9, 2023 路 2 min 路 Suraj Narwade

Encrypting text with AWS KMS

Encrypting and decrypting strings using AWS Key Management Service (KMS) and the AWS Command Line Interface (CLI) is a crucial part of securing sensitive data in your AWS environment. In this blog post, we鈥檒l walk through the process of encrypting and decrypting a string using KMS and the AWS CLI. This is a fundamental skill for protecting your data in AWS services like S3, RDS, and Lambda. Requirement You will need AWS CLI, You can follow this doc to install it, https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html You can follow this guide to create the KMS key, https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html Encrypting String Let鈥檚 create a simple plaintext string for encryption purposes. echo "Hello World" > hello.txt Let鈥檚 run the following command to encrypt our string. If you notice we are outputting it to encrypted.base64 because AWS CLI will encrypt it and then encode it into base64. aws kms encrypt --key-id <KMS_ID> \ --plaintext fileb://hello.txt \ --output text --query CiphertextBlob > encrypted.bas64 Now this string is safe to store as only the KMS key can decrypt this. ...

September 3, 2023 路 2 min 路 Suraj Narwade