<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sahithi V</title>
    <description>The latest articles on DEV Community by Sahithi V (@sahithi_v_ea2d0f17149bf0a).</description>
    <link>https://dev.to/sahithi_v_ea2d0f17149bf0a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3570568%2Fcf17f3a2-084b-4347-b2a4-e5a64e440b73.jpg</url>
      <title>DEV Community: Sahithi V</title>
      <link>https://dev.to/sahithi_v_ea2d0f17149bf0a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sahithi_v_ea2d0f17149bf0a"/>
    <language>en</language>
    <item>
      <title>Manage Multiple Terraform Versions with tfswitch</title>
      <dc:creator>Sahithi V</dc:creator>
      <pubDate>Mon, 20 Oct 2025 08:55:42 +0000</pubDate>
      <link>https://dev.to/sahithi_v_ea2d0f17149bf0a/manage-multiple-terraform-versions-with-tfswitch-339n</link>
      <guid>https://dev.to/sahithi_v_ea2d0f17149bf0a/manage-multiple-terraform-versions-with-tfswitch-339n</guid>
      <description>&lt;p&gt;That’s where &lt;strong&gt;&lt;a href="https://github.com/warrensbox/terraform-switcher" rel="noopener noreferrer"&gt;terraform-switcher (tfswitch)&lt;/a&gt;&lt;/strong&gt; comes to the rescue.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 What Is &lt;code&gt;tfswitch&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;tfswitch&lt;/code&gt; is a simple command-line tool that helps you &lt;strong&gt;install and switch between different Terraform versions&lt;/strong&gt; instantly.&lt;br&gt;&lt;br&gt;
You can think of it like &lt;strong&gt;nvm (Node Version Manager)&lt;/strong&gt; — but for Terraform.&lt;/p&gt;


&lt;h2&gt;
  
  
  🚀 Why You Need It
&lt;/h2&gt;

&lt;p&gt;In real-world projects, different environments or teams may lock Terraform to different versions.&lt;br&gt;&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;legacy infrastructure&lt;/strong&gt; might still use Terraform 0.14
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;new project&lt;/strong&gt; might use Terraform 1.7+
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;CI/CD pipeline&lt;/strong&gt; might expect a specific version declared in &lt;code&gt;.terraform-version&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manually downloading &lt;code&gt;.zip&lt;/code&gt; files, updating paths, or reinstalling Terraform every time — &lt;code&gt;tfswitch&lt;/code&gt; makes it seamless.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚙️ Installation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;On macOS (via Homebrew):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;warrensbox/tap/tfswitch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On Linux:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On Windows (using Chocolatey):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;choco &lt;span class="nb"&gt;install &lt;/span&gt;tfswitch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧠 How It Works
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;tfswitch&lt;/code&gt; detects the Terraform version you need in three ways:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. From &lt;code&gt;.terraform-version&lt;/code&gt; file
&lt;/h3&gt;

&lt;p&gt;If your project includes a &lt;code&gt;.terraform-version&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.5.7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tfswitch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will automatically install and switch to that version.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. From &lt;code&gt;required_version&lt;/code&gt; in Terraform configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;required_version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;gt;= 1.4.0"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;tfswitch&lt;/code&gt; can read and match it automatically.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Manual Selection
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tfswitch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll get an interactive menu to choose your desired version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use the arrow keys to navigate: ↓ ↑ → ← 
Select Terraform version: 
  1.7.0
&amp;gt; 1.5.7
  1.4.6
  0.14.11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧩 Real-World Example
&lt;/h2&gt;

&lt;p&gt;Imagine you have &lt;strong&gt;two Terraform projects&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Project A (old)&lt;/strong&gt; requires Terraform 0.14.11
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project B (new)&lt;/strong&gt; requires Terraform 1.6.0
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;code&gt;tfswitch&lt;/code&gt;, switching between them is as simple as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;projectA
tfswitch 0.14.11

&lt;span class="nb"&gt;cd&lt;/span&gt; ../projectB
tfswitch 1.6.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No path changes. No reinstallations. Just productivity.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔁 In
&lt;/h2&gt;

</description>
      <category>cli</category>
      <category>devops</category>
      <category>tooling</category>
      <category>terraform</category>
    </item>
    <item>
      <title>How to Convert a docker-compose file to K8S manifest</title>
      <dc:creator>Sahithi V</dc:creator>
      <pubDate>Fri, 17 Oct 2025 08:39:08 +0000</pubDate>
      <link>https://dev.to/sahithi_v_ea2d0f17149bf0a/how-to-convert-a-docker-compose-file-to-k8s-manifest-2hch</link>
      <guid>https://dev.to/sahithi_v_ea2d0f17149bf0a/how-to-convert-a-docker-compose-file-to-k8s-manifest-2hch</guid>
      <description>&lt;h1&gt;
  
  
  How to Convert a Docker Compose File to Kubernetes Manifests Using Kompose
&lt;/h1&gt;

&lt;p&gt;Many of us use Docker for local development, but when it’s time to run containers on Kubernetes, converting your setup can seem daunting. &lt;strong&gt;Kompose&lt;/strong&gt; makes this transition easy by converting your &lt;code&gt;docker-compose.yml&lt;/code&gt; into Kubernetes manifests.&lt;/p&gt;

&lt;p&gt;Below are the latest steps to get your services running on Kubernetes:&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Install Kompose (Latest Version)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;On Mac (using Homebrew):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;kompose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Or download the latest release manually:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; https://github.com/kubernetes/kompose/releases/latest/download/kompose-darwin-amd64 &lt;span class="nt"&gt;-o&lt;/span&gt; kompose
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x kompose
&lt;span class="nb"&gt;sudo mv&lt;/span&gt; ./kompose /usr/local/bin/kompose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. Prepare Your Docker Compose File
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Build and push your Docker images&lt;/strong&gt; to a remote registry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update your &lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/strong&gt; so that each service uses the image URL from your registry (not a local build context).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3"&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;mythical-requester&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;REMOTE-IMAGE&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4001:4001"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;NAMESPACE=production&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;LOGS_TARGET=http://loki:3100/loki/api/v1/push&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_HOST=agent&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_PORT=4317&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_EXPORTER_OTLP_TRACES_INSECURE=true&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_RESOURCE_ATTRIBUTES=ip=1.2.3.4&lt;/span&gt;

  &lt;span class="na"&gt;mythical-server&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;REMOTE-IMAGE&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4000:4000"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;80:80"&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mythical-database&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;NAMESPACE=production&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;LOGS_TARGET=http://loki:3100/loki/api/v1/push&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_HOST=agent&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_PORT=4317&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_EXPORTER_OTLP_TRACES_INSECURE=true&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_RESOURCE_ATTRIBUTES=ip=1.2.3.5&lt;/span&gt;

  &lt;span class="na"&gt;mythical-recorder&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;REMOTE-IMAGE&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4002:4002"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;NAMESPACE=production&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;LOGS_TARGET=http://loki:3100/loki/api/v1/push&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_HOST=agent&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TRACING_COLLECTOR_PORT=4317&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_EXPORTER_OTLP_TRACES_INSECURE=true&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OTEL_RESOURCE_ATTRIBUTES=ip=1.2.3.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Convert Docker Compose to Kubernetes Manifests
&lt;/h2&gt;

&lt;p&gt;Run the following command in the directory containing your &lt;code&gt;docker-compose.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kompose convert
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kompose will generate Kubernetes YAML files for each service, typically creating both a &lt;code&gt;deployment&lt;/code&gt; and a &lt;code&gt;service&lt;/code&gt; manifest per service.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Deploy to Kubernetes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Move all generated YAML files to a folder&lt;/strong&gt; (e.g., &lt;code&gt;deployment/&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;deployment
&lt;span class="nb"&gt;mv&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.yaml deployment/
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connect to your Kubernetes cluster&lt;/strong&gt; (ensure &lt;code&gt;kubectl&lt;/code&gt; is configured).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Apply all manifests:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; deployment/
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Check your pods:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Your Docker Compose services are now running on your Kubernetes cluster.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kubernetes/kompose/releases" rel="noopener noreferrer"&gt;Kompose GitHub Releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kompose.io/" rel="noopener noreferrer"&gt;Kompose Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>tutorial</category>
      <category>kubernetes</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
