<?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: Narongrit Kanhanoi</title>
    <description>The latest articles on DEV Community by Narongrit Kanhanoi (@heart).</description>
    <link>https://dev.to/heart</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%2F276180%2F4331b893-29d9-455b-a957-ec64fd820d0c.jpeg</url>
      <title>DEV Community: Narongrit Kanhanoi</title>
      <link>https://dev.to/heart</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/heart"/>
    <language>en</language>
    <item>
      <title>kk: Kubernetes Power Helper CLI</title>
      <dc:creator>Narongrit Kanhanoi</dc:creator>
      <pubDate>Wed, 19 Nov 2025 09:42:03 +0000</pubDate>
      <link>https://dev.to/heart/kk-kubernetes-power-helper-cli-4n65</link>
      <guid>https://dev.to/heart/kk-kubernetes-power-helper-cli-4n65</guid>
      <description>&lt;h2&gt;
  
  
  kk: Kubernetes Power Helper CLI
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;kubectl&lt;/code&gt; keeps making you retype namespaces, pod names, and long log commands, &lt;code&gt;kk&lt;/code&gt; is the slim Bash companion that keeps raw &lt;code&gt;kubectl&lt;/code&gt; semantics but removes the friction. Think of it as a productivity layer: one executable Bash script that runs locally and wraps your daily troubleshooting verbs.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/heart/kk-Kubernetes-Power-Helper-CLI" rel="noopener noreferrer"&gt;https://github.com/heart/kk-Kubernetes-Power-Helper-CLI&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is kk?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;kk&lt;/code&gt; is a single Bash script that wraps &lt;code&gt;kubectl&lt;/code&gt; without hiding it. It remembers your namespace, lets you pick pods/deployments via regex (or &lt;code&gt;fzf&lt;/code&gt;), and exposes familiar verbs (&lt;code&gt;logs&lt;/code&gt;, &lt;code&gt;sh&lt;/code&gt;, &lt;code&gt;restart&lt;/code&gt;, &lt;code&gt;pf&lt;/code&gt;, &lt;code&gt;desc&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt;, etc.) under the short &lt;code&gt;kk&lt;/code&gt; prefix. There is no CRD or cluster installation; it simply shells out to &lt;code&gt;kubectl&lt;/code&gt; with smarter defaults.&lt;/p&gt;

&lt;h3&gt;
  
  
  Namespace memory
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kk ns set my-namespace&lt;/code&gt; writes the namespace into &lt;code&gt;~/.kk&lt;/code&gt;. Every command then injects &lt;code&gt;-n "$NAMESPACE"&lt;/code&gt; automatically. No more retyping &lt;code&gt;-n staging&lt;/code&gt; or aliasing &lt;code&gt;kubectl&lt;/code&gt; per project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern-first resource selection
&lt;/h3&gt;

&lt;p&gt;Every command that touches pods/deployments accepts a regex pattern. &lt;code&gt;kk sh api&lt;/code&gt;, &lt;code&gt;kk desc '^web-'&lt;/code&gt;, or &lt;code&gt;kk restart orders&lt;/code&gt; all reuse the same selector:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetch all names via &lt;code&gt;kubectl get … -o jsonpath&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Filter with &lt;code&gt;grep -E -- &amp;lt;pattern&amp;gt;&lt;/code&gt; safely&lt;/li&gt;
&lt;li&gt;If multiple matches remain, &lt;code&gt;fzf&lt;/code&gt; pops up (when installed) or you pick from a numbered list
This means less copy/paste from &lt;code&gt;kubectl get pods&lt;/code&gt; and fewer typos.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Multi-replica debugging
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;kk logs web -f -g "traceId=123"&lt;/code&gt; spins parallel &lt;code&gt;kubectl logs&lt;/code&gt; for every matching pod, prefixes each line with &lt;code&gt;[pod-name]&lt;/code&gt;, and still lets you follow and grep just like plain &lt;code&gt;kubectl&lt;/code&gt;. When you’re chasing a flaky request or tracing across replicas, you get a combined stream that shows exactly which replica produced the line. No shell loops, no manual tailing per pod.&lt;/p&gt;

&lt;h3&gt;
  
  
  Guard rails everywhere
&lt;/h3&gt;

&lt;p&gt;The script prints clear messages before running disruptive actions (restart, port-forward), forces explicit selection when more than one resource matches, and propagates &lt;code&gt;kubectl&lt;/code&gt; errors so you can see why something failed. Because it’s Bash, you can audit the entire script in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world workflow
&lt;/h2&gt;

&lt;p&gt;Here’s a typical flow when an API endpoint starts failing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;kk pods '^api-'&lt;/code&gt; – quickly list pods in the saved namespace.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kk logs '^api-' -f -g "(WARN|ERROR)"&lt;/code&gt; – follow logs from all replicas simultaneously and filter noisy noise.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kk sh '^api-' -- /bin/bash&lt;/code&gt; – jump into the problematic pod without copying its full name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kk restart '^api-deploy'&lt;/code&gt; – rollout restart the deployment once the fix is ready.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kk pf '^api-' 8080:8080&lt;/code&gt; – port-forward locally while testing.
Every step is still raw &lt;code&gt;kubectl&lt;/code&gt; underneath, just faster to type and harder to mess up.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why you should try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You value the simplicity of a single Bash script that does not interfere with your cluster.&lt;/li&gt;
&lt;li&gt;You move between namespaces often and want that context remembered for you.&lt;/li&gt;
&lt;li&gt;You debug scaled workloads and need log tailing across replicas without shell gymnastics.&lt;/li&gt;
&lt;li&gt;You want guard rails (clear prompts, explicit selections) for potentially disruptive commands.&lt;/li&gt;
&lt;li&gt;You prefer Unix-style text output that plays nicely with &lt;code&gt;grep&lt;/code&gt;/&lt;code&gt;less&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Explore the repo
&lt;/h2&gt;

&lt;p&gt;All of kk lives in one Bash file plus optional installer helpers. Browse the source, review the README, and copy the script or use the installer—whatever fits your workflow:&lt;br&gt;
&lt;a href="https://github.com/heart/kk-Kubernetes-Power-Helper-CLI" rel="noopener noreferrer"&gt;https://github.com/heart/kk-Kubernetes-Power-Helper-CLI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy cluster hacking!&lt;/p&gt;

</description>
      <category>cli</category>
      <category>tooling</category>
      <category>kubernetes</category>
      <category>productivity</category>
    </item>
    <item>
      <title>kk — A tiny CLI that makes kubectl faster and less painful</title>
      <dc:creator>Narongrit Kanhanoi</dc:creator>
      <pubDate>Wed, 19 Nov 2025 05:32:59 +0000</pubDate>
      <link>https://dev.to/heart/kk-a-tiny-cli-that-makes-kubectl-faster-and-less-painful-22nb</link>
      <guid>https://dev.to/heart/kk-a-tiny-cli-that-makes-kubectl-faster-and-less-painful-22nb</guid>
      <description>&lt;h1&gt;
  
  
  kk — A tiny CLI that makes kubectl faster and less painful
&lt;/h1&gt;

&lt;p&gt;Working with Kubernetes daily often means typing long kubectl commands repeatedly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubectl logs ...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl exec ...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl get pods | grep ...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;switching namespaces&lt;/li&gt;
&lt;li&gt;tailing logs from multiple replicas&lt;/li&gt;
&lt;li&gt;restarting deployments and checking images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted something tiny, predictable, and easy to drop into any environment.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;kk&lt;/strong&gt; — a minimal Bash wrapper around kubectl that focuses on &lt;em&gt;speed&lt;/em&gt;, &lt;em&gt;simplicity&lt;/em&gt;, and &lt;em&gt;muscle‑memory friendly&lt;/em&gt; commands.&lt;/p&gt;

&lt;p&gt;Repo:&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://github.com/heart/kk-Kubernetes-Power-Helper-CLI" rel="noopener noreferrer"&gt;https://github.com/heart/kk-Kubernetes-Power-Helper-CLI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🚀 Why I built this
&lt;/h2&gt;

&lt;p&gt;I didn’t want another heavy binary or plugin framework.&lt;br&gt;&lt;br&gt;
I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;shorter commands
&lt;/li&gt;
&lt;li&gt;automatic namespace handling
&lt;/li&gt;
&lt;li&gt;smart pod and deployment selection (fzf optional)
&lt;/li&gt;
&lt;li&gt;multi-pod log streaming
&lt;/li&gt;
&lt;li&gt;“day‑2” helpers like restart, port‑forward, events, top
&lt;/li&gt;
&lt;li&gt;zero dependencies beyond bash + kubectl (+ jq optionally)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;kk&lt;/code&gt; is a single script you can drop into &lt;code&gt;~/bin/kk&lt;/code&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚡ What kk can do
&lt;/h2&gt;
&lt;h3&gt;
  
  
  ✅ Namespace helper
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kk ns show
kk ns &lt;span class="nb"&gt;set &lt;/span&gt;staging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Keeps a simple namespace config in &lt;code&gt;~/.kk&lt;/code&gt; so you don’t have to type &lt;code&gt;-n&lt;/code&gt; all day.&lt;/p&gt;


&lt;h3&gt;
  
  
  ✅ Pods, shell, logs, images
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# List pods (with optional name substring / regex)&lt;/span&gt;
kk pods
kk pods api

&lt;span class="c"&gt;# Exec into a pod (auto-select; uses fzf if installed)&lt;/span&gt;
kk sh api
kk sh api &lt;span class="nt"&gt;--&lt;/span&gt; bash

&lt;span class="c"&gt;# Multi-pod logs with optional container, grep, follow&lt;/span&gt;
kk logs api &lt;span class="nt"&gt;-f&lt;/span&gt;
kk logs api &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s2"&gt;"ERROR"&lt;/span&gt;
kk logs api &lt;span class="nt"&gt;-c&lt;/span&gt; main &lt;span class="nt"&gt;--since&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10m

&lt;span class="c"&gt;# See which images are actually running&lt;/span&gt;
kk images api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Pod selection uses a pattern against pod names. If multiple pods match, kk will prompt you (or use &lt;code&gt;fzf&lt;/code&gt; when available).&lt;/p&gt;


&lt;h3&gt;
  
  
  ✅ Deployment helpers
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Rollout restart a deployment (with pattern and selection)&lt;/span&gt;
kk restart api

&lt;span class="c"&gt;# Summarize deployments in the current namespace&lt;/span&gt;
kk deploys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;kk deploys&lt;/code&gt; uses &lt;code&gt;jq&lt;/code&gt; (if available) to show something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NAME                           READY      IMAGE
api                            3/3  image: yourorg/api:1.8.12
web                            2/2  image: yourorg/web:3.9.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ✅ Port‑forward with pod selection
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kk pf api 8080:80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This resolves the pod by pattern first (again, with &lt;code&gt;fzf&lt;/code&gt; if there are multiple matches) and then runs &lt;code&gt;kubectl port-forward&lt;/code&gt; for you.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✅ Quick describe &amp;amp; resource usage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Describe matching pod&lt;/span&gt;
kk desc api

&lt;span class="c"&gt;# Top pods (optionally filtered)&lt;/span&gt;
kk top
kk top api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;kk top&lt;/code&gt; is just a friendly wrapper around &lt;code&gt;kubectl top pod -n &amp;lt;ns&amp;gt;&lt;/code&gt; with optional filtering while keeping the header row.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✅ Events &amp;amp; contexts
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Recent events in the current namespace&lt;/span&gt;
kk events

&lt;span class="c"&gt;# Show or switch kubectl contexts&lt;/span&gt;
kk ctx
kk ctx my-cluster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠 Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-o&lt;/span&gt; ~/bin/kk https://raw.githubusercontent.com/heart/kk-Kubernetes-Power-Helper-CLI/main/kk
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ~/bin/kk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure &lt;code&gt;~/bin&lt;/code&gt; is in your &lt;code&gt;$PATH&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;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="$HOME/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc   &lt;span class="c"&gt;# or ~/.zshrc&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc                                   &lt;span class="c"&gt;# or ~/.zshrc&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ❤️ If you find kk useful
&lt;/h2&gt;

&lt;p&gt;Stars, issues, and suggestions are welcome.&lt;/p&gt;

&lt;p&gt;Repo link again:&lt;br&gt;&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://github.com/heart/kk-Kubernetes-Power-Helper-CLI" rel="noopener noreferrer"&gt;https://github.com/heart/kk-Kubernetes-Power-Helper-CLI&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;code&gt;kk&lt;/code&gt; isn’t meant to replace kubectl.&lt;br&gt;&lt;br&gt;
It just removes boilerplate and gives you a smoother Kubernetes workflow.&lt;/p&gt;

</description>
      <category>cli</category>
      <category>tooling</category>
      <category>kubernetes</category>
      <category>productivity</category>
    </item>
    <item>
      <title>SwiftUI QRCode Scanner</title>
      <dc:creator>Narongrit Kanhanoi</dc:creator>
      <pubDate>Tue, 26 Nov 2019 12:12:14 +0000</pubDate>
      <link>https://dev.to/heart/swiftui-qrcode-scanner-5586</link>
      <guid>https://dev.to/heart/swiftui-qrcode-scanner-5586</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI"&gt;https://github.com/heart/CarBode-Barcode-Scanner-For-SwiftUI&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
