How to generate Terraform module docs

If you are Terraform user, you are pretty sure you know what the module is and must have used at least one community Terraform module. For those who don鈥檛 know what Terraform module is, Read more here If you are a pro user or part of the platform engineering or DevOps team, you probably must have written one. When you write the module for yourself or other groups, it鈥檚 essential to have documentation on how to use the module, input or output parameters, etc. ...

December 19, 2022 路 2 min 路 Suraj Narwade

Announcing Kubectl EKS Plugin v0.1.0

Hello everyone, It鈥檚 my pleasure to announce the v0.1.0 release of the Kubectl EKS Plugin. I had this of the kubectl plugin for EKS from the day I started using Amazon EKS. But I finally made it into reality and cut the first release. The mission of the kubectl EKS plugin is to simplify operations and provide easy access to cluster-related information. The first release of kubectl-eks has few but convenient functionalities. I am excited about this project and hope to see more features in the upcoming months. ...

December 19, 2022 路 2 min 路 Suraj Narwade

[SOLVED] MFA Entity already exists Error in AWS IAM

Sometimes, When IAM user tries to register a new Virtual MFA device using Google Authenticator or similar tools, they notice the following error, Entity Already exists This entity already exists. MFADevice entity at the same path and name already exists. Before adding a new virtual MFA device, ask your administrator to delete the existing device using the CLI or API. This happens because the MFA device was created but not enabled for the users. It may happen because of various reasons. If you are a system administrator or platform engineer, this can be little pain to figure out the issue. ...

December 18, 2022 路 1 min 路 Suraj Narwade

Terraform CLI Args, define once, use again and again

I regularly use *terraform plan -no-color* command to check the plan in a more readable way. I wrote a blog post regarding the same here. Give it a read if you haven鈥檛 already. Running this command every time is quite cumbersome. Hence I was looking for options and came across these terraform environment variables features. I can export TF_CLI_ARGS as shown below with the arg. export TF_CLI_ARGS="-no-color" Now, If I run terraform plan it will be equivalent of terraform plan -no-color ...

December 18, 2022 路 1 min 路 Suraj Narwade

How to share process namespace among containers in a Kubernetes Pod

A few days ago, I was working on an application which consisted of a multi-container pod where I had to send a signal from container A to a process from container B within the same Pod. We know containers inside the pod already share the network namespace by default which means they technically have the same IP address. Apart from this, most things, such as other namespaces, are isolated. For example, process namespace. Containers within the same pod run their process namespace and don鈥檛 share any information with another container. ...

December 17, 2022 路 4 min 路 Suraj Narwade

View Kubernetes Secrets easily

Often we find it difficult to visualize the Kubernetes secrets as they are base64 encoded. You will need to manually copy the encoded data and then decode it or write small custom shell scripts for the same. Fortunately, there鈥檚 a kubectl plugin to simplify this process. view-secret The plugin allows users to view the contents of a secret without having to decode it manually. Check out the project on GitHub: ...

December 13, 2022 路 2 min 路 Suraj Narwade

Run Commands for All the clusters in your Kubeconfig in parallel

Have you ever wondered about running kubectl commands in parallel for some of your clusters? You must have written custom shell scripts or Golang scripts to do so. Fortunately, a tool to run commands in parallel now exists, Thanks to Ahmet Alp Balkan 馃檹 Check out the GitHub repo, and don鈥檛 forget to 猸愶笍 the repo :) https://github.com/ahmetb/kubectl-foreach kubectl-foreach Is a tool that allows users to run a kubectl command in one or more contexts (clusters) in parallel. This can be very useful when you need to perform an action on all of the resources in given contexts/clusters, such as gathering information, scaling them up or down, rolling out an update, or applying a configuration change. ...

December 13, 2022 路 3 min 路 Suraj Narwade

Kubernetes and Terraform: Converting YAML to HCL for Better Automation

Kubernetes and Terraform are both powerful tools for managing cloud infrastructure, but they use different configuration languages. Kubernetes uses YAML, while Terraform uses HashiCorp Configuration Language (HCL). This can make it difficult to use the two tools together, as you may need to convert YAML files to HCL in order to use them with Terraform. Sometimes when you are spinning up managed Kubernetes such as GKE, EKS and AKS, you may need to deploy Kubernetes resources via terraform. ...

December 10, 2022 路 3 min 路 Suraj Narwade

Learning Kubernetes with Kubectl

When we work around Kubernetes, we often have to reference the documentation for a few things to save time from the journey from terminal to browser and back. Kubectl offers a great set of help in itself. Learning about the resources The command shows all fields from the pod resource along with its type and information about it. You can also look for a subfield. for example, $ kubectl explain pod $ kubectl explain pod.spec.containers ...

April 23, 2021 路 2 min 路 Suraj Narwade

Chaining Kiam Certificates using Cert-manager

Source: https://unsplash.com/photos/pZld9PiPDno When associating IAM roles with pods instead of assigning a super role to worker nodes, Kiam is a fairly popular project in Community; kiam runs as an agent on each node in the Kubernetes cluster, allowing cluster users to associate IAM roles to Pods. To enhance security, Kiam uses certificates for servers & agents. To simplify the certificate management for Kiam, we will utilise cert-manager, cert-manager is a native Kubernetes certificate management controller that helps issue certificates from various sources or self-signed ones. ...

April 23, 2021 路 2 min 路 Suraj Narwade