<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jhooq</title><link>https://jhooq.com/</link><description>Recent content on Jhooq</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Jhooq</copyright><lastBuildDate>Sat, 31 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jhooq.com/index.xml" rel="self" type="application/rss+xml"/><item><title>terraform console: Evaluate Expressions, Functions and cidrsubnet Without Applying Anything (Terraform 1.17)</title><link>https://jhooq.com/terraform-console/</link><pubDate>Sat, 31 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-console/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;terraform console&lt;/code&gt; evaluates one Terraform expression at a time against your configuration and state, and never modifies state.&lt;/strong&gt; It needs no cloud credentials for pure functions such as &lt;code&gt;cidrsubnet&lt;/code&gt;, &lt;code&gt;format&lt;/code&gt; or &lt;code&gt;lookup&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Non-interactive use:&lt;/strong&gt; &lt;code&gt;echo 'cidrsubnet(&amp;quot;10.0.0.0/16&amp;quot;, 8, 3)' | terraform console&lt;/code&gt; prints &lt;code&gt;&amp;quot;10.0.3.0/24&amp;quot;&lt;/code&gt;. When you pipe several lines, &lt;a href="https://raw.githubusercontent.com/hashicorp/web-unified-docs/main/content/terraform/v1.17.x/docs/cli/commands/console.mdx"&gt;only the output of the final line is printed&lt;/a&gt; unless an earlier line errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flags worth knowing:&lt;/strong&gt; &lt;code&gt;-var 'name=value'&lt;/code&gt; overrides a variable, &lt;code&gt;-plan&lt;/code&gt; evaluates against a fresh plan instead of the saved state, &lt;code&gt;-scope=module.child&lt;/code&gt; evaluates inside a child module. The console also holds the state lock while it is open.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limits you will hit:&lt;/strong&gt; &lt;code&gt;cidrsubnet&lt;/code&gt; with &lt;code&gt;newbits&lt;/code&gt; 8 accepts a &lt;code&gt;netnum&lt;/code&gt; from 0 to 255 only; 256 fails with &amp;quot;prefix extension of 8 does not accommodate a subnet numbered 256&amp;quot;. Resource attributes that do not exist yet print &lt;code&gt;(known after apply)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you are looping over subnets in a real configuration, read &lt;a href="https://jhooq.com/terraform-for-and-for-each-loop/"&gt;Terraform for and for_each loops&lt;/a&gt;; if you only need the subnet maths without writing HCL, use the &lt;a href="https://jhooq.com/vpc-subnet-planner-free-tool-aws-azure-gcp/"&gt;VPC Subnet Planner&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;!-- no-video: no channel video covers terraform console yet; suggested title queued in docs/content-queue.md --&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#what-terraform-console-is"&gt;What terraform console is&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#quick-reference"&gt;Quick reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#lab-setup"&gt;Lab setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#functions-cidrsubnet-cidrhost-format-and-friends"&gt;Functions: cidrsubnet, cidrhost, format and friends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#for-expressions-lookup-and-try"&gt;For expressions, lookup and try&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#variables-locals-and-var"&gt;Variables, locals and -var&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#templatefile"&gt;templatefile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#state--plan-and-unknown-values"&gt;State, -plan and unknown values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#trade-offs"&gt;Trade-offs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="what-terraform-console-is"&gt;What terraform console is&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;terraform console&lt;/code&gt; is the REPL of Terraform. You give it an expression, it evaluates the expression in the scope of your root module and prints the value. The &lt;a href="https://raw.githubusercontent.com/hashicorp/web-unified-docs/main/content/terraform/v1.17.x/docs/cli/commands/console.mdx"&gt;official command reference&lt;/a&gt; describes it as a place to test interpolations before using them in configurations and to inspect values saved in state. It closes with &lt;code&gt;exit&lt;/code&gt;, Control-C or Control-D.&lt;/p&gt;</description></item><item><title>Terraform tls_private_key: Generate SSH Keys and Self-Signed Certificates with the tls Provider (Terraform 1.17)</title><link>https://jhooq.com/terraform-tls-private-key/</link><pubDate>Fri, 30 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-tls-private-key/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tls_private_key&lt;/code&gt; generates a key pair in Terraform itself. &lt;code&gt;algorithm&lt;/code&gt; accepts &lt;code&gt;RSA&lt;/code&gt;, &lt;code&gt;ECDSA&lt;/code&gt; or &lt;code&gt;ED25519&lt;/code&gt;; &lt;code&gt;rsa_bits&lt;/code&gt; defaults to 2048 and &lt;code&gt;ecdsa_curve&lt;/code&gt; defaults to &lt;code&gt;P224&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The private key is stored unencrypted in the state file. The provider documentation says so in a security notice, and I confirmed it: the marker &lt;code&gt;BEGIN OPENSSH PRIVATE KEY&lt;/code&gt; appeared on 4 lines of &lt;code&gt;terraform.tfstate&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sensitive = true&lt;/code&gt; only hides the value in CLI output. Without it, a root module output that refers to the key fails with &lt;code&gt;Output refers to sensitive values&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;local_file&lt;/code&gt; defaults to file mode &lt;code&gt;0777&lt;/code&gt;; &lt;code&gt;local_sensitive_file&lt;/code&gt; defaults to &lt;code&gt;0700&lt;/code&gt;. Set &lt;code&gt;file_permission = &amp;quot;0600&amp;quot;&lt;/code&gt; for any private key.&lt;/li&gt;
&lt;li&gt;Changing &lt;code&gt;algorithm&lt;/code&gt; replaces the key and everything that uses it (3 to add, 3 to destroy in my run).&lt;/li&gt;
&lt;li&gt;Not generating keys at all? Read &lt;a href="https://jhooq.com/terraform-generate-ssh-key/"&gt;how to generate an SSH key in Terraform&lt;/a&gt; or the &lt;a href="https://jhooq.com/terraform-index/"&gt;Terraform index&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h2 id="what-this-post-covers"&gt;What this post covers&lt;/h2&gt;
&lt;p&gt;I wanted one lab that shows the whole story of generating keys and certificates in Terraform, with nothing but two providers and a laptop. No AWS account, no cloud credentials. The two providers are &lt;code&gt;hashicorp/tls&lt;/code&gt; and &lt;code&gt;hashicorp/local&lt;/code&gt;. The first one generates keys and certificates, the second one writes them to disk. If you want to use the key on an EC2 instance afterwards, the older post on &lt;a href="https://jhooq.com/terraform-ssh-into-aws-ec2/"&gt;SSH into an AWS EC2 instance with Terraform&lt;/a&gt; picks up where this one ends.&lt;/p&gt;</description></item><item><title>Stop Using .env Files for Secrets: Encrypt Them with sops and age Instead (Real Output, gitleaks Included)</title><link>https://jhooq.com/stop-using-env-files-for-secrets/</link><pubDate>Thu, 29 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/stop-using-env-files-for-secrets/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A committed &lt;code&gt;.env&lt;/code&gt; file never goes away.&lt;/strong&gt; After &lt;code&gt;git rm&lt;/code&gt; the password is still readable with &lt;code&gt;git show &amp;lt;commit&amp;gt;:.env&lt;/code&gt; and &lt;code&gt;git log -p&lt;/code&gt;. The only real fix is to rotate the secret.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gitleaks finds it in milliseconds.&lt;/strong&gt; In my run it scanned 105 bytes in 24 ms and reported 2 leaks (a Stripe-style key and a generic password); it exits with code 1, so a CI job or pre-commit hook can block the commit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sops plus age lets you commit secrets safely.&lt;/strong&gt; The values become &lt;code&gt;ENC[AES256_GCM,...]&lt;/code&gt;, the key names stay readable, and the diff of a changed password touches only that line plus the MAC and timestamp lines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decrypt at deploy time, not on disk.&lt;/strong&gt; &lt;code&gt;sops exec-env prod.enc.env 'your-command'&lt;/code&gt; puts the values into the environment of one process and writes no plaintext file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your case?&lt;/strong&gt; If your secrets live in Kubernetes, read &lt;a href="https://jhooq.com/kubernetes-secrets"&gt;Kubernetes Secrets&lt;/a&gt; first; if they live in Terraform state, read &lt;a href="https://jhooq.com/terraform-do-not-store-tfstate-in-git/"&gt;why the tfstate file should not be stored in git&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/z5N3zJuxv3M?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#why-a-env-file-in-git-is-a-leak"&gt;Why a .env file in git is a leak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#install-the-tools"&gt;Install the tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#reproduce-the-leak-and-catch-it-with-gitleaks"&gt;Reproduce the leak and catch it with gitleaks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#encrypt-the-file-with-sops-and-age"&gt;Encrypt the file with sops and age&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#decrypt-at-deploy-time"&gt;Decrypt at deploy time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#comparison-of-the-options"&gt;Comparison of the options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#my-recommendation"&gt;My recommendation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=".env in git versus a sops encrypted file"
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/devops/sops-age/env-file-vs-sops.svg"
/&gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Ansible on AWS: Zero-Downtime Deploys Behind an ALB, RDS, and an AI Postmortem (Project 2)</title><link>https://jhooq.com/ansible-aws-project-alb-rds-zero-downtime-deploy/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-aws-project-alb-rds-zero-downtime-deploy/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What you build:&lt;/strong&gt; an Application Load Balancer in front of 2 EC2 app servers in 2 availability zones, talking to a private RDS PostgreSQL 16 database. 30 AWS resources inside a VPC that Terraform creates for you, from one &lt;code&gt;terraform apply&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How I run it:&lt;/strong&gt; by hand, one tagged Ansible command at a time (&lt;code&gt;--tags common_apt&lt;/code&gt;, &lt;code&gt;app_user&lt;/code&gt;, &lt;code&gt;app_config&lt;/code&gt;, &lt;code&gt;app_service&lt;/code&gt;, and so on), so you see the load balancer turn green server by server. &lt;code&gt;make site&lt;/code&gt; does all of it at once, and I show it at the end.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is new compared to Project 1:&lt;/strong&gt; a dynamic inventory (no hosts file), secrets read from SSM Parameter Store instead of a vault file, rolling deploys that drain each server from the load balancer, and an optional AI postmortem when a deploy fails.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost:&lt;/strong&gt; about 10 cents per hour while it runs (2 × t3.small, 1 × db.t4g.micro, 1 ALB). &lt;code&gt;make infra-down&lt;/code&gt; removes everything, so a full recording session costs well under $2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety:&lt;/strong&gt; the rolling deploy stops at the first failure. The failed server stays out of the load balancer and the other server is never touched.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If you have not done Part 1:&lt;/strong&gt; start with the &lt;a href="https://jhooq.com/ansible-real-world-project-production-web-app/"&gt;Docker version of this project&lt;/a&gt;. Everything here builds on it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I built Project 1 so you could learn the moving parts for free on a laptop. This post is the part people actually ask me for: the same idea on a real cloud, with the pieces a team would really use. If you only want the hands-on commands, jump to section 4: thirteen small Ansible commands, run by hand in order, each one explained. The one-command &lt;code&gt;make&lt;/code&gt; shortcut comes right after.&lt;/p&gt;</description></item><item><title>Kubernetes IP Address Planning: 22 Problems the Free IP Calculator Solves on EKS, GKE, AKS and On-Premises (kubeadm, Mirantis MKE, RKE2, OpenShift, Tanzu, Talos), with the Numbers and a Screenshot for Each</title><link>https://jhooq.com/kubernetes-ip-address-planning/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-ip-address-planning/</guid><description>
&lt;!-- no-video: the on-premises option shipped on 2026-10-28 and this post went out the same day; the walkthrough video is on the "Videos to record" list in docs/content-queue.md and will be embedded here when it is up --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Every &amp;quot;my cluster has no IPs left&amp;quot; ticket is one of four address pools filling up:&lt;/strong&gt; the node subnet, the pod addresses, the service CIDR, or the load-balancer pool. Which pool fills first depends on the platform: on EKS pods take VPC addresses (an m5.2xlarge holds &lt;strong&gt;60&lt;/strong&gt;), on GKE every node reserves a Pod range (&lt;strong&gt;/24&lt;/strong&gt; for 110 pods, so 900 nodes need a &lt;strong&gt;/14&lt;/strong&gt;), on AKS legacy CNI pre-assigns pods (50 nodes × 30 pods = &lt;strong&gt;1,581&lt;/strong&gt; addresses, a /21) while Overlay takes &lt;strong&gt;51&lt;/strong&gt;, and on-premises a /16 pod CIDR holds &lt;strong&gt;256&lt;/strong&gt; kubeadm or RKE2 nodes, &lt;strong&gt;512&lt;/strong&gt; Calico nodes at 110 pods, or &lt;strong&gt;512&lt;/strong&gt; OpenShift nodes at hostPrefix 23.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The &lt;a href="https://jhooq.com/tools/kubernetes-ip-calculator/"&gt;Kubernetes IP Calculator&lt;/a&gt; answers all 22 problems below in the browser, in about five seconds:&lt;/strong&gt; pick the cloud or the on-premises distribution (kubeadm, Mirantis MKE, RKE2/k3s, OpenShift, Tanzu, Talos), the node size or CNI, the node count and the pods per node, and you get the one number you came for, the subnets named inside your VPC, a diagram of where every address goes, the checks that block a bad plan, and the Terraform, eksctl, kubeadm, RKE2, install-config or Talos snippet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every number has a source.&lt;/strong&gt; Each rule links to the EKS, GKE, AKS, Kubernetes, Calico, Cilium, Flannel, RKE2, OpenShift, Mirantis, Broadcom, Sidero or MetalLB page it came from, and the 1,404-type EKS instance table is generated from the EKS AMI repository. Nothing leaves your browser; the share link reproduces a calculation for a colleague.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you only want to know how many addresses a plain subnet has, read &lt;a href="https://jhooq.com/usable-ip-addresses-subnet-aws-azure-gcp/"&gt;usable IP addresses per subnet on AWS, Azure and GCP&lt;/a&gt;; if the pain is specifically an EKS subnet at 0 free addresses, start with &lt;a href="https://jhooq.com/eks-running-out-of-ip-addresses/"&gt;EKS running out of IP addresses&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-the-four-address-pools-every-cluster-drains"&gt;The four address pools every cluster drains&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-amazon-eks-problems"&gt;Amazon EKS problems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-google-gke-problems"&gt;Google GKE problems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-azure-aks-problems"&gt;Azure AKS problems&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-on-premises-problems-kubeadm-mirantis-mke-rke2-openshift-tanzu-talos"&gt;On-premises problems: kubeadm, Mirantis MKE, RKE2, OpenShift, Tanzu, Talos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-every-problem-the-one-number-and-the-preset-that-shows-it"&gt;Every problem, the one number, and the preset that shows it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-sharing-a-plan-with-your-team"&gt;Sharing a plan with your team&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-what-the-calculator-does-not-do"&gt;What the calculator does not do&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-faq"&gt;FAQ&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/tools/kubernetes-ip-calculator/problems/hero-eks-guided-flow.webp"
title="The calculator in October 2026: five guided steps on the left, the answer on the right with the subnet per zone, the pods per node and a diagram of the VPC, the zones and every address a node takes"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The calculator in October 2026: five guided steps on the left, the answer on the right with the subnet per zone, the pods per node and a diagram of the VPC, the zones and every address a node takes&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>git rebase --exec Explained - Run Your Tests on Every Commit Before You Push, with Real Output, the Failure Path, and the Three Things That Bit Me</title><link>https://jhooq.com/git-rebase-exec/</link><pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/git-rebase-exec/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;git rebase --exec &amp;quot;&amp;lt;cmd&amp;gt;&amp;quot; &amp;lt;upstream&amp;gt;&lt;/code&gt;&lt;/strong&gt; (short form &lt;code&gt;-x&lt;/code&gt;) appends an &lt;code&gt;exec &amp;lt;cmd&amp;gt;&lt;/code&gt; line after every &lt;code&gt;pick&lt;/code&gt; in the rebase instruction list, so the command runs in the working tree of each replayed commit. A non-zero exit stops the rebase on that commit with exit code 1.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When it stops, fix the commit in place:&lt;/strong&gt; edit, &lt;code&gt;git commit --amend --no-edit -a&lt;/code&gt;, then &lt;code&gt;git rebase --continue&lt;/code&gt;. Every commit from the fixed one onward gets a new hash; commits that passed unchanged keep theirs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fixing a commit can conflict with the next one.&lt;/strong&gt; In my run the amended line was the context the following commit appended to, so &lt;code&gt;--continue&lt;/code&gt; hit a merge conflict I had to resolve before the exec ran again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--reschedule-failed-exec&lt;/code&gt;&lt;/strong&gt; re-runs the failed command on every &lt;code&gt;--continue&lt;/code&gt; until it passes, instead of moving on. Set it permanently with &lt;code&gt;git config rebase.rescheduleFailedExec true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An empty range runs nothing&lt;/strong&gt; and still prints &lt;code&gt;Successfully rebased&lt;/code&gt;. Check &lt;code&gt;git log --oneline &amp;lt;upstream&amp;gt;..HEAD&lt;/code&gt; first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you want to find which commit introduced a bug rather than test all of them, that is &lt;code&gt;git bisect run&lt;/code&gt;; and if you are new to rebasing, start with my free &lt;a href="https://jhooq.com/git-github-blueprint-course/"&gt;Git and GitHub course&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/O84IxYEo2cg?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-exec-does-inside-a-rebase"&gt;What exec does inside a rebase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-lab-repository"&gt;The lab repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-a-clean-run-over-every-commit"&gt;A clean run over every commit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-a-run-that-stops-on-a-bad-commit-and-the-fix"&gt;A run that stops on a bad commit, and the fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-reschedule-failed-exec-retry-instead-of-skipping"&gt;reschedule-failed-exec: retry instead of skipping&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-more-than-one-command-and-seeing-which-commit-is-running"&gt;More than one command, and seeing which commit is running&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-exec-versus-bisect-run-versus-ci"&gt;exec versus bisect run versus CI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-what-exec-does-inside-a-rebase"&gt;1. What exec does inside a rebase&lt;/h2&gt;
&lt;p&gt;Most people meet &lt;code&gt;exec&lt;/code&gt; as one of the commands in the interactive rebase instruction list, next to &lt;code&gt;pick&lt;/code&gt;, &lt;code&gt;squash&lt;/code&gt; and &lt;code&gt;drop&lt;/code&gt;. The &lt;a href="https://git-scm.com/docs/git-rebase"&gt;git rebase reference&lt;/a&gt; describes the &lt;code&gt;--exec &amp;lt;cmd&amp;gt;&lt;/code&gt; option as appending &lt;code&gt;exec &amp;lt;cmd&amp;gt;&lt;/code&gt; after each line that creates a commit in the final history, and says that any command that fails will interrupt the rebase with exit code 1. It also says it uses the interactive machinery internally but can be run without &lt;code&gt;--interactive&lt;/code&gt;, which is the form I use most: no editor opens, the commands just run.&lt;/p&gt;</description></item><item><title>helm template Explained - Render a Helm Chart Locally Without a Cluster (Helm 4): Values Files, --set, --show-only, --output-dir, and the Traps That Bite</title><link>https://jhooq.com/helm-template-command/</link><pubDate>Sun, 25 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-template-command/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;helm template &amp;lt;release&amp;gt; &amp;lt;chart&amp;gt;&lt;/code&gt; renders the chart into plain Kubernetes YAML on your machine.&lt;/strong&gt; No cluster, no kubeconfig, no release record. On my laptop a local chart renders in 0.19 seconds, and the 767-line ingress-nginx chart renders straight from its repository in 0.67 seconds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Values precedence:&lt;/strong&gt; the chart's &lt;code&gt;values.yaml&lt;/code&gt; loses to &lt;code&gt;-f&lt;/code&gt; files, the right-most &lt;code&gt;-f&lt;/code&gt; file wins over earlier ones, and &lt;code&gt;--set&lt;/code&gt; beats every file. In my run &lt;code&gt;replicaCount&lt;/code&gt; went 1, 4, 6, 8 exactly that way.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The flags you will use daily:&lt;/strong&gt; &lt;code&gt;--show-only templates/deployment.yaml&lt;/code&gt; for one file, &lt;code&gt;--output-dir rendered&lt;/code&gt; to write one file per template, &lt;code&gt;--skip-tests&lt;/code&gt; to drop test pods, &lt;code&gt;--kube-version&lt;/code&gt; and &lt;code&gt;--api-versions&lt;/code&gt; to fake cluster capabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The traps:&lt;/strong&gt; &lt;code&gt;tag: 1.10&lt;/code&gt; in a values file renders as &lt;code&gt;1.1&lt;/code&gt; (quote it), the namespace does not appear in the output unless the chart writes it, &lt;code&gt;lookup&lt;/code&gt; always returns an empty map, and &lt;code&gt;--validate&lt;/code&gt; is deprecated in Helm 4 in favour of &lt;code&gt;--dry-run=server&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you want to test an install against a real cluster without changing it, read &lt;a href="https://jhooq.com/helm-dry-run-install/"&gt;helm install --dry-run&lt;/a&gt;; if you are new to charts, start with &lt;a href="https://jhooq.com/getting-start-with-helm-chart/"&gt;getting started with Helm&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/VW1JCmBr8H0?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-helm-template-does-and-what-it-does-not"&gt;What helm template does, and what it does not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-render-your-first-chart-with-no-cluster"&gt;Render your first chart with no cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-render-a-single-template-with-show-only"&gt;Render a single template with show-only&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-override-values-with-set-and-values-files"&gt;Override values with set and values files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-write-the-output-to-files-and-diff-two-renders"&gt;Write the output to files and diff two renders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-render-a-third-party-chart-straight-from-its-repository"&gt;Render a third-party chart straight from its repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-fake-the-cluster-kube-version-api-versions-and-lookup"&gt;Fake the cluster: kube-version, api-versions and lookup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-helm-template-vs-dry-run-vs-lint"&gt;helm template vs dry run vs lint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-what-helm-template-does-and-what-it-does-not"&gt;1. What helm template does, and what it does not&lt;/h2&gt;
&lt;p&gt;I use &lt;code&gt;helm template&lt;/code&gt; every time I touch a chart, because it answers one question before anything reaches a cluster: what YAML will this chart actually produce with these values? The &lt;a href="https://helm.sh/docs/helm/helm_template/"&gt;official reference&lt;/a&gt; describes it in one line, &amp;quot;Render chart templates locally and display the output&amp;quot;, and adds the part people miss: any values that would normally be looked up in the cluster are faked locally, and none of the server-side validity checks run.&lt;/p&gt;</description></item><item><title>Should You Do a Cloud Certification? The Four Reasons I Tell People Not to Collect Them, What the Exams Cost in 2026, and the One Case Where a Certificate Is Worth the Money</title><link>https://jhooq.com/should-you-do-a-cloud-certification/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/should-you-do-a-cloud-certification/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Certifications are not bad; chasing them is.&lt;/strong&gt; A badge proves you reached the passing mark on one exam on one day. It does not prove you have run the service in production, and the terms attached to every badge say so.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The four reasons from the video:&lt;/strong&gt; certification overload (AWS, Azure, GCP, Kubernetes, AI, security; you cannot watch every show on Netflix either); the asterisk effect (passing mark, not expertise); certificate-collector syndrome (badges as Pokémon cards on LinkedIn); and the 24 hours you have, which a day job already takes most of.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What they cost in 2026:&lt;/strong&gt; AWS Solutions Architect Associate 150 USD, 65 questions, 130 minutes; AWS Cloud Practitioner 100 USD, 65 questions, 90 minutes; Google Associate Cloud Engineer 125 USD, 2 hours, valid 3 years; Azure Administrator priced by country and must be renewed. Plus the weeks of evenings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do one when the job needs it.&lt;/strong&gt; If your work is Ansible automation on servers, an AI certification does nothing for Monday morning; the Ansible, bash and networking hours do. Pick the single exam that matches the work in front of you, or that a specific employer asks for in writing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What to do with the time instead:&lt;/strong&gt; answer questions on Stack Overflow, fix issues on GitHub, write up what you ran, and build things you can show. Those are the recommendations from the video, and the examples of real-world experience it names are securing data, building secure pipelines and automating on-prem as well as cloud servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you have decided to sit the Terraform exam, my &lt;a href="https://jhooq.com/terraform-associate-certification-course/"&gt;Terraform Associate course&lt;/a&gt; is free; if you are starting from zero, read &lt;a href="https://jhooq.com/what-to-learn-before-cloud/"&gt;what to learn before cloud&lt;/a&gt; first.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/WONEYPY1BCY?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-why-i-made-the-video"&gt;Why I made the video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-four-reasons-from-the-recording"&gt;The four reasons, from the recording&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-what-the-exams-cost-in-2026"&gt;What the exams cost in 2026&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-the-one-case-where-i-would-pay-for-an-exam"&gt;The one case where I would pay for an exam&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-what-to-do-with-the-hours-instead"&gt;What to do with the hours instead&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-what-went-wrong-in-the-video"&gt;What went wrong in the video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-why-i-made-the-video"&gt;1. Why I made the video&lt;/h2&gt;
&lt;p&gt;In August 2024 I recorded a 5 minutes video called &lt;em&gt;The Cloud Certification Trap&lt;/em&gt;. It became the most watched thing on my channel, past 104,000 views, which tells me the question is on a lot of minds: &lt;em&gt;should I spend my evenings on a certification?&lt;/em&gt; My answer in the video was no, with four reasons, and two years later I still give the same answer to people who ask me after a course or in the comments. This post is that answer written down, with the prices and exam formats checked against the vendors' pages on 2026-10-21, and with the part I think I undersold at the time.&lt;/p&gt;</description></item><item><title>Three AWS Solutions Architect Associate Questions From My Shorts, Answered Properly - Migrating Web, Batch and Legacy Apps; Cutting EC2 Cost for a 2-Week Shutdown Without Losing Memory; Internet for Private Subnets (with the Prerequisites the 30-Second Answers Skip)</title><link>https://jhooq.com/aws-solutions-architect-exam-questions-explained/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-solutions-architect-exam-questions-explained/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Question 1, migrate web, batch and legacy apps with scalability and security:&lt;/strong&gt; legacy and web tiers on EC2 in an Auto Scaling group across multiple Availability Zones, network ACLs plus security groups for defence in layers, and AWS Batch for the batch jobs, because it provisions and releases the compute per job.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Question 2, cut EC2 cost during a 2-week shutdown when the data is in instance memory:&lt;/strong&gt; hibernate the instances. Hibernation writes RAM to the encrypted EBS root volume, you stop paying for instance hours, and the RAM comes back on start. The conditions the Short skipped: an EBS root volume that is encrypted, not an instance store, and less than 150 GiB of RAM on Linux.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Question 3, private-subnet instances need to download patches:&lt;/strong&gt; a NAT gateway in a public subnet with an Elastic IP, plus a 0.0.0.0/0 route to it in the private subnets' route table. The public subnet itself needs its route to the internet gateway or nothing works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The exam pattern behind all three:&lt;/strong&gt; the question names a constraint (legacy, in-memory data, private subnet) and the right answer is the managed service that respects the constraint at the lowest cost, not the most powerful service.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Numbers to carry into the exam:&lt;/strong&gt; SAA-C03 is 65 questions in 130 minutes for 150 USD; hibernation needs RAM under 150 GiB; a NAT gateway is billed per hour and per GB processed, so one per Availability Zone is the resilient layout and also the expensive one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you are deciding whether to sit the exam at all, read &lt;a href="https://jhooq.com/should-you-do-a-cloud-certification/"&gt;should you do a cloud certification&lt;/a&gt;; if you want to build Question 3 instead of answering it, the &lt;a href="https://jhooq.com/aws-nat-gateway-deep-dive/"&gt;NAT gateway deep dive&lt;/a&gt; does it step by step.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/xV-G-e3tIfQ?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-why-three-shorts-became-one-post"&gt;Why three Shorts became one post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-question-1---migrating-web-batch-and-legacy-applications"&gt;Question 1 - migrating web, batch and legacy applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-question-2---a-2-week-shutdown-with-data-in-memory"&gt;Question 2 - a 2-week shutdown with data in memory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-question-3---internet-access-from-a-private-subnet"&gt;Question 3 - internet access from a private subnet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-what-went-wrong-in-the-shorts"&gt;What went wrong in the Shorts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-why-three-shorts-became-one-post"&gt;1. Why three Shorts became one post&lt;/h2&gt;
&lt;p&gt;In June 2024 I posted three practice questions for the AWS Certified Solutions Architect Associate as Shorts of 38 s, 35 s and 29 s. They are among the most watched things on the channel, past 41,000 views together, and the comments under them are the reason for this post: a Short has room for the answer and not for the reasoning, and the exam is a reasoning test. Below are the three questions exactly as I read them in the recordings, the answer from each Short, and then the part the format could not hold: why the answer wins, what it requires, and where the AWS documentation says so.&lt;/p&gt;</description></item><item><title>What to Learn Before (and Alongside) Cloud - the Six Non-Cloud Skills Every DevOps, SRE and Cloud Engineer Uses Daily: Code and Git, Scripting, CI/CD, Automation, Infrastructure as Code, Networking and Security</title><link>https://jhooq.com/what-to-learn-before-cloud/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/what-to-learn-before-cloud/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Six skills, none of them cloud-specific, all of them used every day:&lt;/strong&gt; 1) one programming language you can read the documentation of, plus Git and an editor; 2) scripting in bash first and Python second; 3) a CI/CD tool, Jenkins, GitHub Actions or GitLab; 4) automation with Ansible, with bash as the fallback; 5) infrastructure as code with Terraform or Pulumi; 6) networking and security: VPC, load balancers, proxies, DNS, SSL certificates, SSH keys.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why bash first:&lt;/strong&gt; 99% of the servers you will touch are Linux, and a utility script in bash works everywhere without installing anything. Python comes next for automation that outgrows a script.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why networking last on the list and first in trouble:&lt;/strong&gt; it is the one people skip, and the one they struggle on in every DevOps, SRE and cloud role, because every cloud service is a networking service underneath.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learn them in parallel with a cloud, not before it.&lt;/strong&gt; The video's title says before; the content says in parallel. Pick one small project and let it pull all six in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All six are free to learn here:&lt;/strong&gt; the &lt;a href="https://jhooq.com/git-github-blueprint-course/"&gt;Git and GitHub course&lt;/a&gt;, the &lt;a href="https://jhooq.com/ansible-full-course-zero-to-hero/"&gt;Ansible course&lt;/a&gt;, the &lt;a href="https://jhooq.com/terraform-index/"&gt;Terraform index&lt;/a&gt;, the &lt;a href="https://jhooq.com/aws-kubernetes-jenkins-pipeline/"&gt;Jenkins pipeline posts&lt;/a&gt; and the &lt;a href="https://jhooq.com/what-is-cidr-classless-inter-domain-routing/"&gt;CIDR explainer&lt;/a&gt; that starts the networking series.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you are deciding between this list and an exam, read &lt;a href="https://jhooq.com/should-you-do-a-cloud-certification/"&gt;should you do a cloud certification&lt;/a&gt; first; if you want the one project that uses all six, it is the &lt;a href="https://jhooq.com/devops-project-terraform-jenkins-aws-flask-rest-api/"&gt;Terraform, Jenkins and Flask project&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/9x5X9EoNyoM?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-the-cloud-is-the-smaller-half-of-the-job"&gt;The cloud is the smaller half of the job&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-six-skills-and-the-tools-i-named"&gt;The six skills and the tools I named&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-in-what-order"&gt;In what order&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-one-project-that-uses-all-six"&gt;One project that uses all six&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-lessons-from-the-two-years-since-the-video"&gt;Lessons from the two years since the video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-the-cloud-is-the-smaller-half-of-the-job"&gt;1. The cloud is the smaller half of the job&lt;/h2&gt;
&lt;p&gt;Every week someone asks me which cloud to start with, as if the choice of AWS, Azure or Google Cloud were the hard part. It is not. In 13 minutes in September 2024 I tried to explain why: the foundation under every cloud role is a set of tools that are not cloud at all, and the people who struggle with cloud services are almost always missing one of them, usually networking. This is the written version of that video, with the same six items and the places on this site where each is taught.&lt;/p&gt;</description></item><item><title>Google Cloud External HTTP Load Balancer Step by Step - Forwarding Rule, Proxy, URL Map, Backend Service, Health Check and Instance Group in the Console and in Terraform, and Why the First curl Returned 502 (GCP Part 9)</title><link>https://jhooq.com/gcp-external-http-load-balancer-step-by-step/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/gcp-external-http-load-balancer-step-by-step/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Google Cloud external HTTP load balancer is five objects in a chain:&lt;/strong&gt; global forwarding rule (one anycast IP on Premium Tier) → target HTTP proxy → URL map → backend service with a health check → instance group of VMs. In the console the wizard creates all of them as &amp;quot;frontend, routing rules, backend&amp;quot;; in Terraform each one is its own resource.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The lab:&lt;/strong&gt; VPC 10.100.0.0/16 from &lt;a href="https://github.com/rahulwagh/gcp-zero-to-expert-by-rahulwagh"&gt;Part 2 of the course&lt;/a&gt;, subnet 10.100.1.0/24 in europe-north2, two Debian VMs at 10.100.1.7 and 10.100.1.8, one load balancer IP. Refreshing the page alternated between the two VMs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two firewall rules decide whether it works:&lt;/strong&gt; health check probes come from 35.191.0.0/16, and proxied requests come from 130.211.0.0/22 and 35.191.0.0/16. Without them the backend stays unhealthy and the load balancer answers 502.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The first curl returned 502 Server Error&lt;/strong&gt; (&amp;quot;Please try again in 30 seconds&amp;quot;) while the backend was not yet usable. Google documents this as &lt;code&gt;failed_to_pick_backend&lt;/code&gt;: normal for a few minutes after a configuration change, or permanent if health checks fail.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Costs to know:&lt;/strong&gt; the first 5 forwarding rules are $0.025 per hour together (about $18 per month), plus data processing per GiB. The console wizard also turned on Cloud CDN and attached a default Cloud Armor security policy, which the console says is billed per your Cloud Armor tier; the Terraform version has neither.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; For the network underneath, size it with the &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/#eyJjIjoiZ2NwIiwiYSI6IjEwLjEwMC4wLjAiLCJwIjoxNiwieiI6MSwiZiI6MCwiayI6MSwiZyI6MCwiZSI6IiIsInQiOltbIndlYiIsInB1YmxpYyIsInByZWZpeCIsMjRdLFsicHJpdmF0ZSIsInByaXZhdGUiLCJwcmVmaXgiLDI0XV0sInIiOjEsInMiOjYsInYiOiJ4In0"&gt;VPC Subnet Planner&lt;/a&gt;; for the AWS equivalent, read &lt;a href="https://jhooq.com/aws-network-load-balancer-alb-vs-nlb/"&gt;ALB vs NLB&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/EXug1_qcpn8?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-the-external-application-load-balancer-is-made-of"&gt;What the external Application Load Balancer is made of&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-what-we-are-going-to-build"&gt;What we are going to build&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-firewall-rules-for-health-checks-and-proxied-traffic"&gt;Firewall rules for health checks and proxied traffic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-build-it-in-the-console"&gt;Build it in the console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-test-it---one-vm-then-two"&gt;Test it - one VM, then two&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-the-same-load-balancer-in-terraform"&gt;The same load balancer in Terraform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-what-it-costs"&gt;What it costs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-what-the-external-application-load-balancer-is-made-of"&gt;1. What the external Application Load Balancer is made of&lt;/h2&gt;
&lt;p&gt;When I opened the load balancing page for the first time I expected one object called &amp;quot;load balancer&amp;quot;. There is no such object. What the console shows as one load balancer is five resources, and every one of them can be shared or replaced on its own. This is the chain from the request's point of view, with the names the console uses and the Terraform resource for each:&lt;/p&gt;</description></item><item><title>Google Cloud IAM Explained - Principals, Roles and Permissions, Owner vs Editor vs Viewer (Now Legacy) vs the New Admin, Writer and Reader Roles, and What an Editor Can Really Do (GCP Part 4)</title><link>https://jhooq.com/gcp-iam-roles-permissions-explained/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/gcp-iam-roles-permissions-explained/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IAM is &amp;quot;who gets to do what on which resource&amp;quot;:&lt;/strong&gt; a principal (a user, group, service account or domain) is granted a role (a bundle of permissions) on a resource (organization, folder, project or a single resource), and grants on a project apply to everything in it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The test in the recording:&lt;/strong&gt; I granted &lt;strong&gt;Editor&lt;/strong&gt; on the project to a second account and signed in as it. It had the Enable button for the Compute Engine API and could open Cloud Run's deploy page; on the IAM page &lt;strong&gt;Grant access&lt;/strong&gt; and &lt;strong&gt;Remove access&lt;/strong&gt; were greyed out. Editor builds things; only Owner manages who has access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The names changed since the video.&lt;/strong&gt; Google's &lt;a href="https://cloud.google.com/iam/docs/roles-overview"&gt;roles overview&lt;/a&gt; now calls Owner, Editor and Viewer the &lt;strong&gt;legacy basic roles&lt;/strong&gt; and has new basic roles &lt;strong&gt;Admin, Writer and Reader&lt;/strong&gt; (&lt;code&gt;roles/admin&lt;/code&gt;, &lt;code&gt;roles/writer&lt;/code&gt;, &lt;code&gt;roles/reader&lt;/code&gt;), which you can grant only with gcloud or the API, not in the console.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google's own advice:&lt;/strong&gt; basic roles &amp;quot;include thousands of permissions across all Google Cloud services. In production environments, do not grant basic roles unless there is no alternative.&amp;quot; Give a developer predefined roles such as &lt;code&gt;roles/run.developer&lt;/code&gt; or &lt;code&gt;roles/compute.instanceAdmin.v1&lt;/code&gt; instead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two things that surprised me:&lt;/strong&gt; the project's &lt;strong&gt;default compute service account already had Editor&lt;/strong&gt;, because the project sits in no organization; and a policy change takes &lt;strong&gt;typically 2 minutes, potentially 7 minutes or longer&lt;/strong&gt; to apply.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; For organizations, folders and moving projects under one, read &lt;a href="https://jhooq.com/gcp-organization-setup-cloud-identity/"&gt;Google Cloud Organization setup&lt;/a&gt;; for sharing one network across projects with IAM, &lt;a href="https://jhooq.com/gcp-shared-vpc/"&gt;Shared VPC&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/v7XxsM7oxJs?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-who-what-where"&gt;Who, what, where&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-roles-you-can-grant"&gt;The roles you can grant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-grant-a-role-to-a-second-user"&gt;Grant a role to a second user&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-sign-in-as-the-editor---what-works-and-what-does-not"&gt;Sign in as the Editor - what works and what does not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-the-same-grants-with-gcloud"&gt;The same grants with gcloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-who-what-where"&gt;1. Who, what, where&lt;/h2&gt;
&lt;p&gt;I explain IAM in the video with one sentence: &lt;strong&gt;who&lt;/strong&gt; gets to do &lt;strong&gt;what&lt;/strong&gt; on &lt;strong&gt;which resource&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>EKS Running Out of IP Addresses - Why Ten Nodes Empty a /23, How to Count What the VPC CNI Really Takes, and the Four Fixes in Order (Warm Pool, Secondary CIDR with Custom Networking, Prefix Delegation, Sizing the Next Cluster)</title><link>https://jhooq.com/eks-running-out-of-ip-addresses/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/eks-running-out-of-ip-addresses/</guid><description>
&lt;!-- no-video: this post is built on the Kubernetes IP Calculator, whose walkthrough video is still to be recorded --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The symptom:&lt;/strong&gt; pods stuck in &lt;code&gt;ContainerCreating&lt;/code&gt;, a managed node group failing with &lt;code&gt;InsufficientFreeAddresses&lt;/code&gt;, or a cluster update refusing because a subnet has fewer than 6 free addresses. The cause is the same: the subnet was sized for nodes and the Amazon VPC CNI consumes addresses per pod and per ENI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The arithmetic nobody does:&lt;/strong&gt; an m5.2xlarge runs 58 pods (4 ENIs × (15 − 1) + 2) and holds 60 VPC addresses, because every attached ENI has all its addresses allocated and one ENI is kept warm. 10 of them per zone need 616 addresses with 16 for the control plane: a /23 (507 usable) holds 8 nodes, a /24 holds 3.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The warm pool is often half the problem.&lt;/strong&gt; An m5.2xlarge running 20 pods still holds 45 addresses; with WARM_IP_TARGET and MINIMUM_IP_TARGET set it holds 30. An m5.8xlarge at 20 pods holds 60 and can hold 240.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fix order:&lt;/strong&gt; 1) shrink the warm pool (minutes, no new nodes); 2) attach a secondary CIDR from 100.64.0.0/10 and move pods there with custom networking (a /19 per zone is 8,187 usable, but max pods drops to 44 on an m5.2xlarge because the primary ENI no longer serves pods); 3) prefix delegation (110 pods, 129 addresses per node, needs contiguous /28s); 4) size the next cluster at a /19 per zone or go IPv6.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Which ranges you can attach:&lt;/strong&gt; with a 10.0.0.0/16 VPC you can add other 10.0.0.0/8 blocks, public ranges and 100.64.0.0/10 blocks between /16 and /28, but not 172.16.0.0/12, 192.168.0.0/16 or 198.19.0.0/16.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; For the per-instance numbers on any of 1,404 types use the &lt;a href="https://jhooq.com/tools/kubernetes-ip-calculator/"&gt;Kubernetes IP Calculator&lt;/a&gt;; for how a plain subnet loses 5 addresses before Kubernetes starts, read &lt;a href="https://jhooq.com/usable-ip-addresses-subnet-aws-azure-gcp/"&gt;usable IPs per subnet&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/aws/aws-course/eks-ip-exhaustion/eks-ip-exhaustion-four-fixes-decision.svg"
title="The decision I walk through in this post: warm pool first, then secondary CIDR, then prefix delegation, and size the next cluster properly"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The decision I walk through in this post: warm pool first, then secondary CIDR, then prefix delegation, and size the next cluster properly&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How Many Usable IP Addresses in a /24, /26, /28 Subnet on AWS, Azure and Google Cloud - the Reserved Addresses, the Smallest Subnet per Cloud, and Why Your Calculator Says 254</title><link>https://jhooq.com/usable-ip-addresses-subnet-aws-azure-gcp/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/usable-ip-addresses-subnet-aws-azure-gcp/</guid><description>
&lt;!-- no-video: the CIDR video covers the arithmetic; the per-cloud reserved rules do not have a video yet --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A /24 is 256 addresses, 254 hosts in a textbook, and 251 on AWS and Azure or 252 on Google Cloud.&lt;/strong&gt; Every cloud reserves addresses in every subnet: AWS and Azure the first four and the last (5), Google Cloud the first two and the last two (4). Subtract that number, not 2, from the block size.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The table you came for:&lt;/strong&gt; /24 = 251 (AWS, Azure) or 252 (GCP); /26 = 59 or 60; /27 = 27 or 28; /28 = 11 or 12; /29 = 3 or 4. Full table in section 2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The smallest subnet differs per cloud:&lt;/strong&gt; /28 on AWS (16 addresses, 11 usable), /29 on Azure (8 addresses, 3 usable) and /29 on Google Cloud (8 addresses, 4 usable). A /29 on AWS is rejected outright.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The reserved addresses are not wasted by accident.&lt;/strong&gt; The first usable address on AWS and Azure is &lt;code&gt;.4&lt;/code&gt;, the VPC router answers on &lt;code&gt;.1&lt;/code&gt;, the DNS resolver on &lt;code&gt;.2&lt;/code&gt;, and Google Cloud keeps the second-to-last address for future use, so the last usable address there is &lt;code&gt;.253&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Where it bites:&lt;/strong&gt; a Transit Gateway attachment subnet at /28 has 11 addresses, which is plenty; a Kubernetes node pool in a /24 has 251 addresses for nodes and pods together on EKS, which is not. Size by hosts, add the reserved addresses, round up to a power of two.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If the notation itself is the question, read &lt;a href="https://jhooq.com/what-is-cidr-classless-inter-domain-routing/"&gt;what is CIDR&lt;/a&gt; first; if you want the subnets laid out and exported, the &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/"&gt;VPC Subnet Planner&lt;/a&gt; does the subtraction for all three clouds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wrote this because &amp;quot;how many IP addresses in a /24 AWS&amp;quot; is a question I get under the VPC videos every month, and every generic subnet calculator on the internet answers 254. That number is wrong on every public cloud. Everything below was generated on 2026-10-18 with Python 3.12 and the planner's engine, and the rules are quoted from the current AWS, Azure and Google Cloud documentation.&lt;/p&gt;</description></item><item><title>Kubernetes IP Calculator - a Free Tool That Sizes EKS, GKE and AKS Networks: Max Pods per Node, VPC Addresses per Node, Subnet per Zone, Pod and Service Ranges, with the Rule Behind Every Number</title><link>https://jhooq.com/kubernetes-ip-calculator-eks-gke-aks/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-ip-calculator-eks-gke-aks/</guid><description>
&lt;!-- no-video: the calculator launched on 2026-10-19; the walkthrough video is planned and will be embedded here when it is up --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The tool:&lt;/strong&gt; &lt;a href="https://jhooq.com/tools/kubernetes-ip-calculator/"&gt;Kubernetes IP Calculator&lt;/a&gt;. Pick EKS, GKE or AKS, the instance type or pods per node, the node count and the zones; get max pods per node, the addresses every node takes, the subnet per zone and the pod and service ranges. Free, one HTML file, nothing leaves your browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EKS numbers that matter:&lt;/strong&gt; an m5.large runs 29 pods (3 ENIs × (10 − 1) + 2) and can hold 30 VPC addresses, because the CNI allocates every address of an attached ENI and keeps one ENI warm. 5 nodes per zone need 166 addresses with the control-plane headroom, which is a /24. A c5.4xlarge computes to 234 pods but a managed node group caps it at 110.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GKE:&lt;/strong&gt; every node reserves a Pod range of 31 − ⌈log₂(max pods)⌉, so 110 pods is a /24 per node and 900 nodes need a /14 secondary range. Autopilot fixes 32 pods per node, a /26 each.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AKS:&lt;/strong&gt; legacy Azure CNI pre-assigns (nodes + surge) × (1 + maxPods) addresses, 1,581 for 50 nodes at the default 30, a /21. Overlay takes 51 addresses for the same cluster and puts pods in 10.244.0.0/16.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Everything is sourced.&lt;/strong&gt; Each rule links to the EKS, GKE or AKS documentation page it came from, and the EKS instance table (1,404 types) is generated from the file the EKS AMI itself uses. The Terraform exports validate against hashicorp/aws 6.69.1, google 8.7.0 and azurerm 5.10.0.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If the question is how many addresses a plain subnet has, read &lt;a href="https://jhooq.com/usable-ip-addresses-subnet-aws-azure-gcp/"&gt;usable IP addresses per subnet&lt;/a&gt;; if you want the whole VPC laid out, start in the &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/"&gt;VPC Subnet Planner&lt;/a&gt; and come back here for the cluster.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Have a specific question?&lt;/strong&gt; The &lt;a href="https://jhooq.com/tools/kubernetes-ip-calculator/faq/"&gt;calculator FAQ&lt;/a&gt; answers the questions engineers actually ask on GitHub, Stack Overflow, re:Post and Microsoft Q&amp;amp;A about Pending pods, max pods per node, the warm pool, prefix delegation, custom networking, service CIDRs, GKE and AKS, each with a screenshot of the calculator on that case.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/tools/kubernetes-ip-calculator/calculator-eks-m5-large-3-zones-hero.webp"
title="The calculator on its default case: 5 m5.large per zone in 3 zones, 29 pods per node, 30 addresses per node, a /24 per zone"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The calculator on its default case: 5 m5.large per zone in 3 zones, 29 pods per node, 30 addresses per node, a /24 per zone&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Overlapping CIDR Blocks - How to Find Them Before VPC Peering or Transit Gateway Refuses the Connection, What AWS, Azure and Google Cloud Each Reject, and the Four Ways Out (Renumber, Secondary CIDR, Private NAT, PrivateLink)</title><link>https://jhooq.com/overlapping-cidr-blocks-vpc-peering-transit-gateway/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/overlapping-cidr-blocks-vpc-peering-transit-gateway/</guid><description>
&lt;!-- no-video: the overlap check is part of the planner, whose walkthrough video is still to be recorded; the VPC peering video covers the peering side --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overlap means one of three things:&lt;/strong&gt; the ranges are identical (10.0.0.0/16 and 10.0.0.0/16), one contains the other (10.0.0.0/16 contains 10.0.128.0/17), or they are both inside a bigger block you treat as one (10.1.0.0/16 and 10.2.0.0/16 do not overlap; 10.0.0.0/15 contains both 10.0.0.0/16 and 10.1.0.0/16).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What each cloud rejects:&lt;/strong&gt; AWS refuses a peering connection if &lt;em&gt;any&lt;/em&gt; CIDR block of either VPC overlaps, even one you never intend to route, and Transit Gateway cannot route two attachments with the same destination; Azure requires non-overlapping address spaces to peer; Google Cloud fails the peering if any subnet range matches, contains or fits inside a peer's, and keeps enforcing it on every new subnet afterwards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check in seconds:&lt;/strong&gt; &lt;code&gt;ip_network(a).overlaps(ip_network(b))&lt;/code&gt; in Python, or paste your inventory into the &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/"&gt;VPC Subnet Planner&lt;/a&gt; and it flags the hit and lists free blocks of the same size, 10.2.0.0/16 to 10.5.0.0/16 in the example below.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When it is already in production, in order of cost:&lt;/strong&gt; renumber the newer, smaller network; add a secondary CIDR to carry only the traffic that must cross; put a private NAT gateway between the overlapping ranges; or use PrivateLink or Private Service Connect so the service is reachable without any route to the other network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The real fix is an inventory.&lt;/strong&gt; One line per network with its CIDR, owner and purpose, checked before every new VPC, VNet or project. The planner reads exactly that format.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you are sizing the new network rather than checking it, start with &lt;a href="https://jhooq.com/what-is-cidr-classless-inter-domain-routing/"&gt;what is CIDR&lt;/a&gt;; if the overlap is between a cluster's service range and a VPC, see &lt;a href="https://jhooq.com/eks-running-out-of-ip-addresses/"&gt;EKS running out of IP addresses&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/aws/aws-course/cidr-overlap/planner-blueprint-existing-networks-one-overlap.webp"
title="The planner&amp;#39;s blueprint with four existing networks pasted in: 10.0.0.0/16 collides with prod-vpc, the other three are clear"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The planner's blueprint with four existing networks pasted in: 10.0.0.0/16 collides with prod-vpc, the other three are clear&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>VPC Subnet Calculators Compared - Visual Subnet Calculator, Hidekazu Konishi's VPC CIDR Planner, Towards The Cloud, 8gwifi and My Own Planner, Tested on the Same Network: Reserved Addresses, Multi-AZ Layout, Overlap Check and Export</title><link>https://jhooq.com/vpc-subnet-calculator-comparison/</link><pubDate>Mon, 19 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/vpc-subnet-calculator-comparison/</guid><description>
&lt;!-- no-video: the planner walkthrough video is still to be recorded; this comparison will be a chapter in it --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Five tools, one network:&lt;/strong&gt; 10.0.0.0/16, public and private tiers, several Availability Zones, tested in my browser on 2026-10-19. All five run client-side and all five subtract AWS's five reserved addresses (251 usable per /24).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://visualsubnetcalc.com/"&gt;Visual Subnet Calculator&lt;/a&gt;&lt;/strong&gt; is the best tool for &lt;em&gt;exploring&lt;/em&gt; an address space: split and join any block in a tree, add notes and colours, share the URL. Since v1.4.0 it has AWS, Azure and OCI modes. No zones, no overlap check, no infrastructure-as-code export, no Google Cloud mode. Open source, MIT, the successor of the davidc calculator everyone used for a decade.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://hidekazu-konishi.com/tools/vpc_cidr_subnet_planner_tool.html"&gt;Hidekazu Konishi's VPC CIDR Subnet Planner&lt;/a&gt;&lt;/strong&gt; is the leanest multi-AZ planner for AWS: 2 to 4 zones, Public, Private and Protected roles, largest-first aligned packing, an unallocated-space report and CloudFormation plus Terraform export. AWS only, no overlap check, no sizing by hosts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://towardsthecloud.com/tools/aws-vpc-subnet-calculator"&gt;Towards The Cloud's AWS VPC Subnet Calculator&lt;/a&gt;&lt;/strong&gt; is the only one that knows real Availability Zone IDs per region (use1-az1 to use1-az6) and warns about 172.17.0.0/16; it exports CSV and nothing else, and it is AWS only.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://8gwifi.org/vpc-calculator.jsp"&gt;8gwifi's VPC Calculator&lt;/a&gt;&lt;/strong&gt; covers AWS, Azure and GCP with nine topology presets, a diagram, Terraform, CloudFormation and a cost estimate, but every tier gets the same subnet size and the tool sits inside a 200-tool site.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://jhooq.com/tools/vpc-subnet-planner/"&gt;My VPC Subnet Planner&lt;/a&gt;&lt;/strong&gt; is the one to use when the plan has to survive review: AWS, Azure and Google Cloud reserved rules (5, 5 and 4), tiers sized by prefix or by hosts with growth headroom, contiguous tier blocks, an overlap check against your inventory with free alternatives, a design score, and Terraform with cidrsubnet() and routing, CloudFormation, Azure CLI, gcloud, CSV, JSON and Markdown. It does not do IPv6, several VPCs at once, or real zone IDs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you only need the arithmetic for one block, &lt;a href="https://jhooq.com/what-is-cidr-classless-inter-domain-routing/"&gt;what is CIDR&lt;/a&gt; has it; if you are checking two networks against each other, read &lt;a href="https://jhooq.com/overlapping-cidr-blocks-vpc-peering-transit-gateway/"&gt;overlapping CIDR blocks&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try it on the network I used for this comparison:&lt;/strong&gt; &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/#eyJjIjoiYXdzIiwiYSI6IjEwLjAuMC4wIiwicCI6MTYsInoiOjIsImYiOjAsImsiOjEsImciOjAsImUiOiIiLCJyIjoxLCJzIjo2LCJ2IjoieCJ9"&gt;open the VPC Subnet Planner with 10.0.0.0/16 on AWS, two zones, already filled in&lt;/a&gt;. It runs in your browser, nothing is uploaded and there is no sign-up. Switch the cloud card at the top to Azure or Google Cloud to watch the reserved-address count change from 5 to 4.&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>AWS Cloud WAN Step by Step - Global Network, Core Network Policy, Dev, Prod and Shared Segments, Tag-Based VPC Attachments and Routes Across Three Regions (Part 25)</title><link>https://jhooq.com/aws-cloud-wan-step-by-step/</link><pubDate>Sat, 17 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-cloud-wan-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/aws-transit-gateway-step-by-step/"&gt;Part-13&lt;/a&gt; connected VPCs with a Transit Gateway: one hub per region, route tables you write yourself, and peering between regions you also write yourself. This &lt;strong&gt;Part-25&lt;/strong&gt; is what AWS built on top of that idea: &lt;strong&gt;AWS Cloud WAN&lt;/strong&gt;, where you describe the network you want in one policy document (which regions, which segments, who may talk to whom, how a VPC finds its segment) and AWS deploys and keeps it consistent across every region.&lt;/p&gt;</description></item><item><title>Ansible Real-World Project: Deploy a Production Web App from Zero (Terraform + Ansible + CI/CD)</title><link>https://jhooq.com/ansible-real-world-project-production-web-app/</link><pubDate>Fri, 16 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-real-world-project-production-web-app/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What you build:&lt;/strong&gt; four servers (lb-1, app-1, app-2, db-1), four roles (&lt;code&gt;common&lt;/code&gt;, &lt;code&gt;postgres&lt;/code&gt;, &lt;code&gt;app&lt;/code&gt;, &lt;code&gt;nginx_lb&lt;/code&gt;), two playbooks (&lt;code&gt;site.yml&lt;/code&gt; from zero, &lt;code&gt;deploy.yml&lt;/code&gt; for every new version), a Flask API with a &lt;code&gt;/health&lt;/code&gt; endpoint, PostgreSQL with its password in Ansible Vault, and a GitHub Actions workflow that deploys on push.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Where it runs:&lt;/strong&gt; on your laptop with Docker (four systemd containers, free) or on Google Cloud, AWS or Azure with the Terraform in &lt;code&gt;infra/&lt;/code&gt;. The playbooks do not know the difference; one inventory variable, &lt;code&gt;private_ip&lt;/code&gt;, makes them portable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measured on a clean machine (ansible-core 2.21.5, Docker Compose 2.38.2, 2026-10-16):&lt;/strong&gt; &lt;code&gt;make site&lt;/code&gt; built the whole stack in 117.9 seconds, a second &lt;code&gt;make site&lt;/code&gt; took 52.2 seconds and changed 0 tasks, &lt;code&gt;make deploy VERSION=1.1.0&lt;/code&gt; took 22.1 seconds while a loop hit the load balancer twice a second: 46 requests, 0 failures, versions seen &lt;code&gt;1.0.0&lt;/code&gt; then &lt;code&gt;1.1.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Safety net, proven:&lt;/strong&gt; a deploy with a broken database URL on app-1 failed on app-1 after the 60-second port wait, and every request to the load balancer was answered by app-2 on the old version. The roll-forward to 1.1.1 took 30.1 seconds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measured on real clouds (2026-10-20):&lt;/strong&gt; AWS, &lt;code&gt;make site INV=cloud&lt;/code&gt; 169 seconds, rolling deploy 47 seconds with 84 requests and 0 failures. Google Cloud, 246 and 56 seconds, 92 requests and 0 failures. &lt;code&gt;terraform destroy&lt;/code&gt; afterwards, every time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Five things broke and are fixed below:&lt;/strong&gt; sshd refused the mounted key on a Linux host whose user is not uid 1000, ansible-core 2.19+ rejects &lt;code&gt;{{ app_name }}&lt;/code&gt; in a play name, &lt;code&gt;cache_valid_time: 3600&lt;/code&gt; skipped &lt;code&gt;apt update&lt;/code&gt; on a freshly built image, &lt;code&gt;samenet&lt;/code&gt; in &lt;code&gt;pg_hba.conf&lt;/code&gt; matches nobody on Google Cloud where every NIC is a &lt;code&gt;/32&lt;/code&gt;, and my own GCP startup script held the apt lock for eight minutes.&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/rahulwagh/ansible-zero-to-expert-masterclass/tree/main/project-01-production-web-app"&gt;project-01-production-web-app&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you need the four-server lab first, read &lt;a href="https://jhooq.com/ansible-lab-on-laptop-with-docker/"&gt;Ansible lab on your laptop with Docker&lt;/a&gt;; if Ansible itself is new, start with the &lt;a href="https://jhooq.com/ansible-full-course-zero-to-hero/"&gt;Ansible full course&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/K_dPCn0nE2U?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;The video walks through this whole project on the laptop lab, and it is Part 1 of a 4-part series: AWS, Google Cloud and Azure with Terraform come next. It premieres on 27 October 2026 at 15:30 UTC. The chapters, with the section of this post that covers the same step:&lt;/p&gt;</description></item><item><title>AWS Global Accelerator Step by Step - Two Static Anycast IPs in Front of Load Balancers in Two Regions, Listeners, Endpoint Groups, Traffic Dials, Weights, Client IP Preservation and Pricing (Part 23)</title><link>https://jhooq.com/aws-global-accelerator-step-by-step/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-global-accelerator-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/aws-privatelink-endpoint-service-step-by-step/"&gt;Part-22&lt;/a&gt; kept traffic inside AWS with PrivateLink. This &lt;strong&gt;Part-23&lt;/strong&gt; is about the opposite direction: users on the public internet, anywhere in the world, reaching an application that runs in more than one region - and reaching the closest healthy copy through one fixed pair of IP addresses.&lt;/p&gt;
&lt;p&gt;I build it the way I did in the video: a VPC, a subnet, an internet gateway, an EC2 web server and an Application Load Balancer in &lt;strong&gt;Mumbai&lt;/strong&gt; and the same again in &lt;strong&gt;Frankfurt&lt;/strong&gt;, then one &lt;strong&gt;AWS Global Accelerator&lt;/strong&gt; in front of both. The whole build is 66 minutes on camera; the post has every step, the screens that matter, and the numbers I could not fit into the video.&lt;/p&gt;</description></item><item><title>Run an Ansible Lab on Your Laptop with Docker (Mac, Windows, Linux)</title><link>https://jhooq.com/ansible-lab-on-laptop-with-docker/</link><pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-lab-on-laptop-with-docker/</guid><description>
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;The number one reason people give up on learning Ansible is not Ansible. It is the lab. &amp;quot;I need three servers&amp;quot;, &amp;quot;I don't have a cloud account&amp;quot;, &amp;quot;my free tier expired&amp;quot;, &amp;quot;the IPs changed again&amp;quot;.&lt;/p&gt;
&lt;p&gt;So for my Ansible course I built a lab that runs &lt;strong&gt;entirely on your laptop, for free&lt;/strong&gt;, and behaves like three real Ubuntu servers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Three containers named &lt;code&gt;ansible-lab-server-1&lt;/code&gt;, &lt;code&gt;-2&lt;/code&gt; and &lt;code&gt;-3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Each one runs &lt;strong&gt;systemd&lt;/strong&gt; and &lt;strong&gt;sshd&lt;/strong&gt;, so &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;apt&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;template&lt;/code&gt;, handlers, Vault, Galaxy, all of it works like on a VM&lt;/li&gt;
&lt;li&gt;One SSH key, kept inside the project folder&lt;/li&gt;
&lt;li&gt;Same commands on &lt;strong&gt;macOS, Windows (WSL 2) and Linux&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this post we are going to:&lt;/p&gt;</description></item><item><title>AWS Bedrock + Claude + MCP Server - Build a Production AI Agent That Never Holds a Database Password (Teleport, RDS PostgreSQL, Terraform)</title><link>https://jhooq.com/aws-bedrock-claude-mcp-server-ai-agent-teleport/</link><pubDate>Wed, 14 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-bedrock-claude-mcp-server-ai-agent-teleport/</guid><description>
&lt;br/&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclosure -&lt;/strong&gt; this post and the video are sponsored by &lt;a href="https://fandf.co/4dm6Bki"&gt;Teleport&lt;/a&gt;. The architecture, the code and the opinions are entirely my own - I built and ran everything shown here myself, and the parts that broke are in here too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div style="margin:1rem 0 1.5rem;padding:1rem 1.25rem;border:2px solid #7c3aed;border-radius:12px;background:#f5f3ff"&gt;
&lt;strong&gt;👉 Want to build this yourself?&lt;/strong&gt; Start with &lt;a href="https://fandf.co/4dm6Bki" rel="noopener" target="_blank"&gt;Teleport's agentic identity and access control page&lt;/a&gt; (the link from the video) - it is the identity layer this whole post is built on, and the free trial is enough to run the demo end to end.
&lt;/div&gt;
&lt;p&gt;Almost every AI agent demo I see has the same line hidden in a &lt;code&gt;.env&lt;/code&gt; file: &lt;code&gt;DB_PASSWORD=...&lt;/code&gt;. The agent gets a long-lived, never-expiring database password, often for a super-user, and nobody can say afterwards which query the agent ran. That is fine on a laptop. It is a breach waiting to happen in production, where the &amp;quot;user&amp;quot; typing into your agent might not be you.&lt;/p&gt;</description></item><item><title>VPC Subnet Planner - a Free Visual Tool to Design AWS, Azure and GCP Networks: Reserved Addresses, Aligned Multi-AZ Subnets, Overlap Check, Design Review and Terraform Export (cidrsubnet) - How I Built It and What Broke</title><link>https://jhooq.com/vpc-subnet-planner-free-tool-aws-azure-gcp/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/vpc-subnet-planner-free-tool-aws-azure-gcp/</guid><description>
&lt;!-- no-video: the planner launched on 2026-10-12; the walkthrough video is planned and will be embedded here when it is up --&gt;
&lt;br/&gt;
&lt;p&gt;Every time I record a VPC video the same question comes back in the comments: &lt;em&gt;&amp;quot;how did you decide on 10.0.1.0/24 for the public subnet and 10.0.2.0/24 for the private one?&amp;quot;&lt;/em&gt; The honest answer for a demo is &amp;quot;it was easy to type&amp;quot;. The honest answer for a real environment is a lot longer, and I never had a good place to send people. Subnet calculators tell you the first and last address of a block. They do not know that AWS takes five addresses out of every subnet, that an Application Load Balancer refuses a /28, that your three /20s should sit inside one /18 so that a single route can cover them, or that the /16 you are about to pick overlaps the office VPN range you will peer with in six months.&lt;/p&gt;</description></item><item><title>Azure VNet Peering Step by Step - Connect Two Virtual Networks with Different CIDR Ranges, Route Tables, the Four Peering Settings Explained, Test with Two Private VMs over Bastion, Delete and Watch It Break, Pricing, Limits, CLI and Terraform (Azure Networking Part-4)</title><link>https://jhooq.com/azure-vnet-peering-step-by-step/</link><pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/azure-vnet-peering-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/azure-vnet-subnet-nsg-route-table-step-by-step/"&gt;Part-1&lt;/a&gt; we built one virtual network with subnets, a network security group and a route table. Real environments never stop at one - you end up with a dev VNet, a test VNet, a hub with the firewall, a spoke per team - and the first question is always the same: &lt;strong&gt;how does a VM in VNet A talk to a VM in VNet B privately, without a VPN and without public IPs?&lt;/strong&gt; The answer on Azure is &lt;strong&gt;VNet peering&lt;/strong&gt;, and in this &lt;strong&gt;Part-4&lt;/strong&gt; we are going to build it end to end, test it with two private VMs, and then delete it on purpose to see exactly what breaks.&lt;/p&gt;</description></item><item><title>Real-Time DevOps Project - Deploy a Python Flask REST API with MySQL RDS on AWS Using Terraform and Jenkins, Step by Step (Jenkins on EC2 in eu-west-1, App and Database in eu-central-1, ALB, ACM, Route 53, Custom Domain with HTTPS)</title><link>https://jhooq.com/devops-project-terraform-jenkins-aws-flask-rest-api/</link><pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/devops-project-terraform-jenkins-aws-flask-rest-api/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the project video people keep asking me to write up - a &lt;strong&gt;real, end-to-end DevOps pipeline&lt;/strong&gt; with nothing mocked: a &lt;strong&gt;Jenkins&lt;/strong&gt; server that Terraform builds in one AWS region, a &lt;strong&gt;Jenkins pipeline&lt;/strong&gt; that runs &lt;strong&gt;Terraform&lt;/strong&gt; to build a second region, and at the end a &lt;strong&gt;Python Flask REST API&lt;/strong&gt; talking to &lt;strong&gt;MySQL on RDS&lt;/strong&gt;, behind an &lt;strong&gt;Application Load Balancer&lt;/strong&gt;, with an &lt;strong&gt;ACM certificate&lt;/strong&gt; and a &lt;strong&gt;custom domain&lt;/strong&gt; on Route 53, live at &lt;code&gt;https://jhooq.org&lt;/code&gt;. Two Terraform repositories, one application repository, about 100 minutes of recording, and every piece of it is in &lt;a href="https://github.com/rahulwagh/devops-project-1"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Stop Building Stateless AI Chatbots - Build a Durable Kubernetes Incident Agent with Trigger.dev chat.agent, Next.js, the Vercel AI SDK and Human-in-the-Loop Approvals (OOMKilled Demo on minikube and EKS)</title><link>https://jhooq.com/trigger-dev-durable-ai-chat-agent-eks/</link><pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/trigger-dev-durable-ai-chat-agent-eks/</guid><description>
&lt;br/&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclosure -&lt;/strong&gt; this post and the video are sponsored by &lt;a href="https://fandf.co/4csWDNc"&gt;Trigger.dev&lt;/a&gt;. The architecture, the code and the opinions are entirely my own - I built and tested everything shown here myself, and the parts that broke are in here too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div style="margin:1rem 0 1.5rem;padding:1rem 1.25rem;border:2px solid #16a34a;border-radius:12px;background:#f0fdf4"&gt;
&lt;strong&gt;👉 Want to build this yourself?&lt;/strong&gt; Start with the &lt;a href="https://fandf.co/4csWDNc" rel="noopener" target="_blank"&gt;Trigger.dev Chat Agent documentation&lt;/a&gt; (the link from the video) - it is the &lt;code&gt;chat.agent&lt;/code&gt; API this whole post is built on, and the free tier is enough to run the demo end to end.
&lt;/div&gt;
&lt;p&gt;Every AI chat tutorial I have watched this year - including a couple of my own - has the same hidden flaw. &lt;strong&gt;The conversation lives inside an HTTP request.&lt;/strong&gt; The browser holds the history, posts it to &lt;code&gt;/api/chat&lt;/code&gt;, the route streams tokens back, the request ends. Refresh the page or redeploy the app and the conversation is gone. That is fine for a demo. It is disqualifying for an agent that is halfway through &lt;em&gt;your production incident&lt;/em&gt; and has just asked &amp;quot;can I restart this pod?&amp;quot;.&lt;/p&gt;</description></item><item><title>Amazon EBS Volumes Step by Step - Volume Types Compared (gp3, gp2, io2 Block Express, st1, sc1), Create, Attach, Format and Mount a Volume, Resize Without Downtime, Snapshots, Encryption, Multi-Attach, Pricing and Troubleshooting (AWS Part-20)</title><link>https://jhooq.com/aws-ebs-volumes-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-ebs-volumes-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;Every EC2 instance we have launched in this series had a disk, and we never looked at it. That disk is an &lt;strong&gt;Amazon EBS volume&lt;/strong&gt;, and in this &lt;strong&gt;Part-20&lt;/strong&gt; we are going to give it the attention it deserves - because storage is where the two expensive mistakes live: picking the wrong volume type (slow or overpriced) and losing data because nobody understood what happens to the volume when the instance is terminated.&lt;/p&gt;</description></item><item><title>Amazon Route 53 Step by Step - Hosted Zones, Record Types, Alias Records, Point a Domain at an ALB, Routing Policies (Weighted, Latency, Failover, Geolocation), Health Checks, Private Zones and Pricing (AWS Part-15)</title><link>https://jhooq.com/aws-route-53-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-route-53-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;Everything we built so far answers on an ugly name - &lt;code&gt;jhooq-web-alb-1234567890.eu-central-1.elb.amazonaws.com&lt;/code&gt;. Users need &lt;code&gt;www.jhooq.com&lt;/code&gt;, and that is DNS. &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html"&gt;Amazon Route 53&lt;/a&gt;&lt;/strong&gt; is the AWS DNS service - a domain registrar, an authoritative DNS server with a 100% availability SLA, health checks, and the routing policies that let DNS itself do failover, canary releases and geographic routing.&lt;/p&gt;
&lt;p&gt;This is &lt;strong&gt;Part-15&lt;/strong&gt;, and it is the longest video of the series, so the post is organised the same way - the concepts first, then the hands-on of moving a domain in and pointing it at the ALB from &lt;a href="https://jhooq.com/aws-ec2-auto-scaling-step-by-step/"&gt;Part-10&lt;/a&gt;, then every routing policy, health checks, private zones, cost and errors. This blog's own DNS runs on Route 53 and is changed through a workflow in Git, so the examples are real.&lt;/p&gt;</description></item><item><title>Ansible Full Course - Zero to Hero in 15 Chapters (Install, Inventory, SSH Keys, YAML, Playbooks, Handlers, Variables, Conditionals, Roles, Jinja2 Templates, Error Handling, Vault, Deploy a Website) - Companion Guide with Timestamps</title><link>https://jhooq.com/ansible-full-course-zero-to-hero/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-full-course-zero-to-hero/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the companion page to my &lt;strong&gt;Ansible Full Course - Zero to Hero&lt;/strong&gt;, a free three-hour-twenty-minute video that takes you from &amp;quot;what is Ansible&amp;quot; to deploying a website with roles, templates, handlers and a vault-encrypted secret. The video is the course; this page is what the video cannot be - &lt;strong&gt;searchable, copy-pasteable and kept current&lt;/strong&gt;. For every chapter you get the timestamp, the commands and YAML I type on screen, the link to the detailed blog post where one exists, and the page of the &lt;a href="https://docs.ansible.com/projects/ansible/latest/"&gt;official Ansible documentation&lt;/a&gt; to read next.&lt;/p&gt;</description></item><item><title>AWS Advanced Networking - Free 8-Hour Full Course Companion (VPC, NAT Gateway, Bastion, ALB, NLB, WAF, VPC Peering, Transit Gateway, VPC Endpoints and PrivateLink, Route 53, ACM) with Timestamps and the ANS-C01 Exam Facts</title><link>https://jhooq.com/aws-advanced-networking-course/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-advanced-networking-course/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the companion page to my free &lt;strong&gt;AWS Advanced Networking full course&lt;/strong&gt; - eight hours in which one lab environment is built layer by layer, from an empty VPC to a multi-VPC, multi-account network with load balancers, a firewall, private connectivity, DNS and TLS. Every chapter of the video has a detailed written version in the &lt;a href="https://jhooq.com/aws-iam-user-step-by-step/"&gt;AWS step-by-step series&lt;/a&gt; on this site, each re-verified against the current AWS documentation in October 2026. Use the video to watch the build, use the posts for the exact console steps, CLI commands, limits, prices and the &amp;quot;common errors&amp;quot; sections that the video could not fit.&lt;/p&gt;</description></item><item><title>AWS Assume IAM Role Step by Step - Trust Policy vs Permissions Policy, Switch Role in the Console, aws sts assume-role, CLI Profiles, Cross-Account Access, MFA and External ID (AWS Part-3)</title><link>https://jhooq.com/aws-assume-iam-role/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-assume-iam-role/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-iam-user-step-by-step/"&gt;Part-1&lt;/a&gt; we created IAM users with long-term credentials, and in &lt;a href="https://jhooq.com/aws-organizations-multi-account-setup/"&gt;Part-2&lt;/a&gt; we switched into a member account with something called &lt;code&gt;OrganizationAccountAccessRole&lt;/code&gt;. That &amp;quot;switch&amp;quot; is the single most important mechanism in AWS security - &lt;strong&gt;assuming an IAM role&lt;/strong&gt; - and this &lt;strong&gt;Part-3&lt;/strong&gt; is all about it.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html"&gt;role&lt;/a&gt;&lt;/strong&gt; is an identity with permissions but &lt;strong&gt;no password and no access keys&lt;/strong&gt;. Instead, some trusted principal - a user, a service like EC2, another account, GitHub Actions - &lt;strong&gt;assumes&lt;/strong&gt; it and receives &lt;strong&gt;temporary credentials&lt;/strong&gt; that expire. Once you understand that, EC2 instance profiles, Lambda execution roles, cross-account access, Identity Center permission sets and CI/CD pipelines all turn out to be the same thing. Let's build one and assume it every way there is.&lt;/p&gt;</description></item><item><title>AWS Certificate Manager (ACM) Step by Step - Request a Free TLS Certificate, DNS Validation with Route 53, Attach It to an ALB HTTPS Listener, Redirect HTTP to HTTPS, CloudFront and API Gateway, Auto-Renewal, Exportable Certificates and ACME (AWS Part-16)</title><link>https://jhooq.com/aws-certificate-manager-acm-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-certificate-manager-acm-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-route-53-step-by-step/"&gt;Part-15&lt;/a&gt; &lt;code&gt;jhooq.com&lt;/code&gt; started pointing at the Application Load Balancer - over plain HTTP. Browsers mark that &amp;quot;Not secure&amp;quot;, search engines rank it lower, and nobody should log in over it. The fix on AWS costs nothing: &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html"&gt;AWS Certificate Manager (ACM)&lt;/a&gt;&lt;/strong&gt; issues publicly trusted TLS certificates for free, validates them through Route 53 in one click, renews them automatically, and attaches them to the ALB, CloudFront and API Gateway without you ever touching a private key.&lt;/p&gt;</description></item><item><title>AWS Control Tower Step by Step - Set Up a Landing Zone, Security OU with Log Archive and Audit Accounts, Controls (Guardrails), Region Deny, IAM Identity Center, Account Factory and Enrolling Existing Accounts (AWS Part-24)</title><link>https://jhooq.com/aws-control-tower-landing-zone-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-control-tower-landing-zone-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-organizations-multi-account-setup/"&gt;Part-2&lt;/a&gt; we built a multi-account setup by hand - an organization, OUs, SCPs, a log-archive account, IAM Identity Center - and I ended with &amp;quot;or let Control Tower do it&amp;quot;. This &lt;strong&gt;Part-24&lt;/strong&gt; is that. &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html"&gt;AWS Control Tower&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;orchestrates&lt;/em&gt; Organizations, Service Catalog, IAM Identity Center, CloudTrail and Config to build a &lt;strong&gt;landing zone&lt;/strong&gt; - AWS's prescriptive multi-account layout - in about half an hour, applies &lt;strong&gt;controls&lt;/strong&gt; that keep accounts from drifting away from it, and gives your teams a vending machine for new accounts.&lt;/p&gt;</description></item><item><title>AWS EC2 Auto Scaling Step by Step - Launch Template, Auto Scaling Group Across Two AZs, Target Tracking Policy, Application Load Balancer, Health Checks and Instance Refresh (AWS Part-10)</title><link>https://jhooq.com/aws-ec2-auto-scaling-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-ec2-auto-scaling-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;One EC2 instance (&lt;a href="https://jhooq.com/aws-launch-ec2-instance/"&gt;Part-4&lt;/a&gt;) is a lab. A real application needs &lt;strong&gt;at least two instances in two Availability Zones&lt;/strong&gt;, something to replace an instance when it dies, and something to add instances when traffic spikes and remove them when it drops. That something is &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html"&gt;Amazon EC2 Auto Scaling&lt;/a&gt;&lt;/strong&gt;, and in this &lt;strong&gt;Part-10&lt;/strong&gt; we build it from the ground up - a launch template, an Auto Scaling group across the two public subnets from &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;Part-5&lt;/a&gt;, an Application Load Balancer in front, health checks, a target tracking policy, and a zero-downtime rollout with instance refresh.&lt;/p&gt;</description></item><item><title>AWS EC2 Launch Template Step by Step - Create a Template, Versions and the Default Version, Source Template, Create From a Running Instance, Systems Manager Parameter Instead of an AMI ID, Launch Templates vs Launch Configurations, IAM Guardrails, CLI and Terraform (AWS Part-8 and Part-17)</title><link>https://jhooq.com/aws-ec2-launch-template-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-ec2-launch-template-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-launch-ec2-instance/"&gt;Part-4&lt;/a&gt; we clicked through the launch wizard once. In &lt;a href="https://jhooq.com/aws-ec2-auto-scaling-step-by-step/"&gt;Part-10&lt;/a&gt; we needed the same configuration for every instance an Auto Scaling group creates, and the answer was a &lt;strong&gt;launch template&lt;/strong&gt; - we created one quickly and moved on. This post is the deep dive it deserves, because the launch template is the thing that turns &amp;quot;the instance I set up by hand&amp;quot; into &amp;quot;a definition I can version, review, roll back and hand to Auto Scaling, EKS, ECS, Spot Fleet and Batch&amp;quot;.&lt;/p&gt;</description></item><item><title>AWS EC2 Spot Instances Step by Step - How Spot Pricing Works, Launch a Spot Instance, Interruptions and the Two-Minute Notice, Rebalance Recommendations, Stop vs Hibernate vs Terminate, Spot in Auto Scaling Mixed Instances Groups, Billing Rules, Best Practices, CLI and Terraform (AWS Part-21)</title><link>https://jhooq.com/aws-ec2-spot-instances-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-ec2-spot-instances-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;Every EC2 instance in this series so far was &lt;strong&gt;On-Demand&lt;/strong&gt; - you pay the list price per second and nobody takes it away. &lt;strong&gt;Spot Instances&lt;/strong&gt; are the same hardware, the same AMIs, the same &lt;a href="https://jhooq.com/aws-ec2-launch-template-step-by-step/"&gt;launch templates&lt;/a&gt;, for &lt;strong&gt;up to 90 % less&lt;/strong&gt; - with one condition: &lt;strong&gt;Amazon EC2 can take the instance back with two minutes notice&lt;/strong&gt; when it needs the capacity. Design for that one condition and Spot becomes the single biggest cost lever in EC2; ignore it and Spot becomes a 3 a.m. outage.&lt;/p&gt;</description></item><item><title>AWS IAM User Step by Step - Create a User, User Group, Attach Policies, Access Keys, MFA and Sign-in URL (AWS Part-1)</title><link>https://jhooq.com/aws-iam-user-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-iam-user-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is &lt;strong&gt;Part-1&lt;/strong&gt; of my AWS step-by-step series, and it starts where every AWS account should start - with &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html"&gt;IAM (Identity and Access Management)&lt;/a&gt;. You have just created an AWS account, you are logged in as the &lt;strong&gt;root user&lt;/strong&gt;, and the very first thing to do is to stop using it. In this post we are going to create an IAM user, put it in a group, give the group permissions, log in with it, create access keys for the CLI, and switch on MFA.&lt;/p&gt;</description></item><item><title>AWS Lambda Step by Step - Create a Function, Function URL (HTTPS Endpoint Without API Gateway), Environment Variables, Lambda Layers for Python Dependencies, Versions and Aliases, Limits, Pricing and Errors (AWS Part-17)</title><link>https://jhooq.com/aws-lambda-function-url-environment-variables-layers/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-lambda-function-url-environment-variables-layers/</guid><description>
&lt;br/&gt;
&lt;p&gt;Everything up to now ran on EC2 instances that you launch, patch, scale and pay for while idle. &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html"&gt;AWS Lambda&lt;/a&gt;&lt;/strong&gt; removes the server: you upload a function, AWS runs it when something invokes it, scales it from zero to thousands of parallel executions, and bills you per millisecond. This &lt;strong&gt;Part-17&lt;/strong&gt; covers the three features that turn a toy function into something useful - a &lt;strong&gt;function URL&lt;/strong&gt; so the world can call it over HTTPS without API Gateway, &lt;strong&gt;environment variables&lt;/strong&gt; so configuration stays out of code, and &lt;strong&gt;layers&lt;/strong&gt; so your Python dependencies ship once and are reused.&lt;/p&gt;</description></item><item><title>AWS NAT Gateway Deep Dive - How It Works, Public vs Private NAT Gateway, Setup Step by Step, Limits (55,000 Connections, 100 Gbps), CloudWatch Metrics, Cost Optimisation, NAT Instance Comparison and Troubleshooting (AWS Part-14)</title><link>https://jhooq.com/aws-nat-gateway-deep-dive/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-nat-gateway-deep-dive/</guid><description>
&lt;br/&gt;
&lt;p&gt;We created a NAT Gateway in &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;Part-5&lt;/a&gt; in one step and moved on. It deserves its own part, because the &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html"&gt;NAT Gateway&lt;/a&gt;&lt;/strong&gt; is the component every private subnet depends on, it is the first surprise on most AWS bills, and the three most common &amp;quot;my instance cannot reach the internet&amp;quot; tickets all end at it.&lt;/p&gt;
&lt;p&gt;This &lt;strong&gt;Part-14&lt;/strong&gt; goes under the hood - what NAT actually does to a packet, the public and private connectivity types, the exact limits, the metrics that tell you it is about to fail, what it costs and how to pay less, when a NAT instance still makes sense, how IPv6 changes the picture, and the complete troubleshooting list from the AWS docs. Numbers are from the current documentation - several (bandwidth, IP addresses per gateway) have gone up since I recorded the video.&lt;/p&gt;</description></item><item><title>AWS Network Load Balancer Step by Step - Create an NLB with Static IPs, Target Groups, TCP and TLS Listeners, Security Groups, Client IP Preservation, Cross-Zone Load Balancing, and ALB vs NLB Explained (AWS Part-18)</title><link>https://jhooq.com/aws-network-load-balancer-alb-vs-nlb/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-network-load-balancer-alb-vs-nlb/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-ec2-auto-scaling-step-by-step/"&gt;Part-10&lt;/a&gt; we used an &lt;strong&gt;Application Load Balancer&lt;/strong&gt;, and for a web application that is the right default. But every so often the requirements say &amp;quot;the customer needs a fixed IP to allow-list&amp;quot;, &amp;quot;it is not HTTP, it is MQTT on port 8883&amp;quot;, &amp;quot;we need a million connections per second&amp;quot;, or &amp;quot;we want to expose this service privately to another account through PrivateLink&amp;quot; - and all four point at the &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html"&gt;Network Load Balancer&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>AWS Organizations Step by Step - Multi-Account Setup, Organizational Units, Service Control Policies (SCPs), Consolidated Billing and Identity Center (AWS Part-2)</title><link>https://jhooq.com/aws-organizations-multi-account-setup/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-organizations-multi-account-setup/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-iam-user-step-by-step/"&gt;Part-1&lt;/a&gt; we created IAM users inside &lt;strong&gt;one&lt;/strong&gt; AWS account. Sooner or later - usually the first time a developer deletes something in production while &amp;quot;just testing&amp;quot; - you realise that one account is the wrong unit. The AWS answer is &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html"&gt;AWS Organizations&lt;/a&gt;&lt;/strong&gt; - many accounts (dev, test, prod, security, sandbox) under one &lt;strong&gt;management account&lt;/strong&gt;, with one bill, a tree of &lt;strong&gt;organizational units&lt;/strong&gt; and &lt;strong&gt;service control policies&lt;/strong&gt; as guardrails that even the account administrators cannot get around.&lt;/p&gt;</description></item><item><title>AWS PrivateLink Step by Step - Publish Your Own Service with a VPC Endpoint Service and Network Load Balancer, Allow Consumers, Accept Connections, Private DNS Name, Cross-Account and Cross-Region, Pricing and Troubleshooting (AWS Part-20)</title><link>https://jhooq.com/aws-privatelink-endpoint-service-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-privatelink-endpoint-service-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-vpc-endpoints-step-by-step/"&gt;Part-19&lt;/a&gt; we were the &lt;strong&gt;consumer&lt;/strong&gt; - we created interface endpoints to reach AWS services privately. This &lt;strong&gt;Part-20&lt;/strong&gt; flips the table: &lt;strong&gt;we are the provider&lt;/strong&gt;. We have an application in our VPC and want other VPCs - other teams, other accounts, customers - to reach it privately, without VPC peering, without exposing it to the internet, and without caring whether their CIDR overlaps ours. That is &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-share-your-services.html"&gt;AWS PrivateLink&lt;/a&gt;&lt;/strong&gt; with a &lt;strong&gt;VPC endpoint service&lt;/strong&gt;: our service sits behind a &lt;strong&gt;Network Load Balancer&lt;/strong&gt; (&lt;a href="https://jhooq.com/aws-network-load-balancer-alb-vs-nlb/"&gt;Part-18&lt;/a&gt;), we register the NLB as an endpoint service, and each consumer gets an interface endpoint in their own VPC that leads straight to it.&lt;/p&gt;</description></item><item><title>AWS Security Groups Step by Step - Inbound and Outbound Rules, Stateful Behaviour, Referencing Security Groups, the Three-Tier ALB-Web-DB Pattern, Quotas, Security Group vs Network ACL, CLI and Terraform (AWS Part-16)</title><link>https://jhooq.com/aws-security-groups-inbound-outbound-rules-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-security-groups-inbound-outbound-rules-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;We have been creating security groups since &lt;a href="https://jhooq.com/aws-launch-ec2-instance/"&gt;Part-4&lt;/a&gt; without really stopping to look at them - &lt;em&gt;allow SSH from my IP, allow HTTP from anywhere, next&lt;/em&gt;. In this &lt;strong&gt;Part-16&lt;/strong&gt; the security group gets the full treatment, because it is the one piece of AWS networking you will touch every single day, and because a surprising amount of &amp;quot;it does not connect&amp;quot; tickets come down to one of about six misunderstandings about how it works.&lt;/p&gt;</description></item><item><title>AWS Transit Gateway Step by Step - Connect Many VPCs and On-Premises Through One Hub, VPC Attachments, Transit Gateway Route Tables, Associations and Propagations, Isolation, Peering, Pricing (AWS Part-13)</title><link>https://jhooq.com/aws-transit-gateway-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-transit-gateway-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/aws-vpc-peering-step-by-step/"&gt;Part-12&lt;/a&gt; ended with the problem - VPC peering is point-to-point and not transitive, so ten VPCs need 45 peering connections, and none of them can share a VPN to the office. &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html"&gt;AWS Transit Gateway&lt;/a&gt;&lt;/strong&gt; is the fix: a &lt;strong&gt;regional router&lt;/strong&gt; you attach every VPC, VPN and Direct Connect to &lt;strong&gt;once&lt;/strong&gt;, and then control who reaches whom with route tables in the hub.&lt;/p&gt;
&lt;p&gt;In this &lt;strong&gt;Part-13&lt;/strong&gt; I create a Transit Gateway, attach three VPCs, make dev and prod both reach a shared-services VPC while being isolated from each other, and look at VPN attachments, cross-region peering, cross-account sharing, cost and the errors. The console steps and the curl tests are from my recording in Frankfurt; the isolation pattern and the prices and quotas were re-checked on 2026-10-17.&lt;/p&gt;</description></item><item><title>AWS VPC Endpoints Step by Step - Gateway Endpoints for S3 and DynamoDB, Interface Endpoints (PrivateLink) for SSM, ECR and Other Services, Private DNS, Endpoint Policies, Security Groups, Cost vs NAT Gateway, and Troubleshooting (AWS Part-19)</title><link>https://jhooq.com/aws-vpc-endpoints-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-vpc-endpoints-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-nat-gateway-deep-dive/"&gt;Part-14&lt;/a&gt; I kept saying &amp;quot;add the S3 gateway endpoint and that traffic stops costing NAT money&amp;quot;. This &lt;strong&gt;Part-19&lt;/strong&gt; is that feature in full. A &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/privatelink/what-is-privatelink.html"&gt;VPC endpoint&lt;/a&gt;&lt;/strong&gt; lets instances in a &lt;strong&gt;private subnet&lt;/strong&gt; reach AWS services - S3, DynamoDB, Systems Manager, ECR, CloudWatch Logs, Secrets Manager, two hundred more - &lt;strong&gt;without an Internet Gateway, a NAT Gateway or a public IP&lt;/strong&gt;. The traffic stays inside the AWS network, the private subnet can be truly private, and the per-GB NAT charge disappears.&lt;/p&gt;</description></item><item><title>AWS VPC Flow Logs Step by Step - Enable Flow Logs for a VPC, Subnet or Network Interface, Publish to CloudWatch Logs or S3, Read a Flow Log Record Field by Field, Custom Formats, Query with Logs Insights and Athena, Find Rejected Traffic, Pricing and Limitations (AWS Part-21)</title><link>https://jhooq.com/aws-vpc-flow-logs-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-vpc-flow-logs-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;Every time a &lt;a href="https://jhooq.com/aws-security-groups-inbound-outbound-rules-step-by-step/"&gt;security group&lt;/a&gt; or a network ACL drops a packet, it does so silently. Your SSH hangs, your health check fails, and nothing anywhere tells you &lt;em&gt;which&lt;/em&gt; rule said no. &lt;strong&gt;VPC Flow Logs&lt;/strong&gt; is the feature that ends the guessing - it writes one line for every network flow that reaches a network interface, with the source, destination, port, protocol, byte count and - the important part - whether it was &lt;strong&gt;ACCEPT&lt;/strong&gt;ed or &lt;strong&gt;REJECT&lt;/strong&gt;ed.&lt;/p&gt;</description></item><item><title>AWS VPC Peering Step by Step - Connect Two VPCs (Same or Different Account and Region), Accept the Request, Add Routes, Security Groups, DNS Resolution, Test with EC2, and the Limits (AWS Part-12)</title><link>https://jhooq.com/aws-vpc-peering-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-vpc-peering-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;Part-5&lt;/a&gt; I built one VPC. Real accounts have several - a dev VPC and a prod VPC, a VPC per team, a shared-services VPC with the monitoring and the directory - and sooner or later an instance in one needs to talk to a database in another &lt;strong&gt;privately&lt;/strong&gt;, without going out to the internet and back in. The simplest way to do that is &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html"&gt;VPC peering&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This is &lt;strong&gt;Part-12&lt;/strong&gt;. I peer two VPCs, do the two things everybody forgets (routes on &lt;strong&gt;both&lt;/strong&gt; sides, security groups on &lt;strong&gt;both&lt;/strong&gt; sides), test with EC2, and then look at cross-account and cross-region peering, DNS, the limits that make peering stop scaling, and the point where &lt;a href="https://jhooq.com/aws-transit-gateway-step-by-step/"&gt;Transit Gateway, Part-13&lt;/a&gt; takes over. I also have the Google Cloud version of this - &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;GCP VPC peering&lt;/a&gt; - if you work on both clouds; the concepts map almost one to one.&lt;/p&gt;</description></item><item><title>AWS VPC Step by Step - Create a VPC with Public and Private Subnets, Internet Gateway, NAT Gateway and Route Tables (and Test It with EC2) (AWS Part-5)</title><link>https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-launch-ec2-instance/"&gt;Part-4&lt;/a&gt; I launched an EC2 instance into the &lt;strong&gt;default VPC&lt;/strong&gt; and did not think about the network at all. That is fine for a lab and wrong for everything else - a database with a public IP address is how companies end up in the news. In this &lt;strong&gt;Part-5&lt;/strong&gt; we build the network that every real AWS workload sits in: a &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"&gt;VPC (Virtual Private Cloud)&lt;/a&gt;&lt;/strong&gt; with &lt;strong&gt;public subnets&lt;/strong&gt; for the things the internet may reach (load balancers, a bastion) and &lt;strong&gt;private subnets&lt;/strong&gt; for the things it may not (application servers, databases), connected to the internet through an &lt;strong&gt;Internet Gateway&lt;/strong&gt; on the public side and a &lt;strong&gt;NAT Gateway&lt;/strong&gt; on the private side, with &lt;strong&gt;route tables&lt;/strong&gt; deciding which is which.&lt;/p&gt;</description></item><item><title>AWS WAF Step by Step - Create a Web ACL, Attach It to an ALB or API Gateway, AWS Managed Rules, Rate-Based Rules, Geo Blocking, IP Sets, Count Mode and Logging (AWS Part-11)</title><link>https://jhooq.com/aws-waf-web-acl-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-waf-web-acl-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;In &lt;a href="https://jhooq.com/aws-ec2-auto-scaling-step-by-step/"&gt;Part-10&lt;/a&gt; we put an Application Load Balancer in front of an Auto Scaling group. The moment that ALB got a public DNS name, scanners started knocking - SQL injection in query strings, &lt;code&gt;../../etc/passwd&lt;/code&gt; in paths, login forms hammered from a thousand IPs. Security groups cannot help; they work on ports, not on the content of an HTTP request. For that you need a &lt;strong&gt;web application firewall&lt;/strong&gt;, and on AWS that is &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html"&gt;AWS WAF&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Azure Virtual Network Step by Step - Create a VNet, Subnets, Network Security Group and Route Table, Understand Default Outbound Access Retirement, NAT Gateway and Test with Two VMs (Azure Networking Part-1)</title><link>https://jhooq.com/azure-vnet-subnet-nsg-route-table-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/azure-vnet-subnet-nsg-route-table-step-by-step/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;An Azure virtual network is regional and spans every availability zone in the region&lt;/strong&gt;, it is free, and its subnets are not zonal; the zone decision moves to the VM. That is the first difference from an AWS VPC.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Azure reserves five addresses per subnet&lt;/strong&gt; (network, gateway at .1, two for Azure DNS, broadcast), so a /24 gives 251 usable and the first VM lands on .4; the smallest subnet is a /29 with 3 usable. The &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/#eyJjIjoiYXp1cmUiLCJhIjoiMTAuMC4wLjAiLCJwIjoxNiwieiI6MSwiZiI6MCwiayI6MSwiZyI6MCwiZSI6IiIsInIiOjEsInMiOjYsInYiOiJ4In0"&gt;VPC Subnet Planner&lt;/a&gt; lays out this post's 10.0.0.0/16 with those rules applied.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Routing is system routes plus optional route tables (UDRs)&lt;/strong&gt;; a route table attaches to a subnet, and the most specific prefix wins. &lt;strong&gt;Security is network security groups&lt;/strong&gt;, attached to a subnet or a NIC, evaluated by priority, lowest number first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default outbound access is being retired:&lt;/strong&gt; new VNets no longer get a free implicit public path for VMs without a public IP (&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access"&gt;Microsoft's retirement notice&lt;/a&gt;). The written build uses a NAT gateway for the public subnet and no path at all for the private one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The recording&lt;/strong&gt; (December 2024, before the retirement) builds the same VNet, 10.0.1.0/24 and 10.0.2.0/24 with an NSG and a route table per subnet, then a Standard_B1s Ubuntu 24.04 VM at $8.25 per month with a public IP and an SSH session from my Mac; its first address was 10.0.1.4.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; Two VNets that must talk: &lt;a href="https://jhooq.com/azure-vnet-peering-step-by-step/"&gt;Azure VNet peering, Part 2&lt;/a&gt;. The AWS version of this exact lab: &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;AWS VPC, Part 5&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;If you have followed my &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;AWS VPC post&lt;/a&gt;, you already know the mental model - a private network, subnets inside it, a route table deciding where packets go and a firewall deciding whether they are allowed. Azure has the same four pieces, but &lt;strong&gt;each one behaves a little differently&lt;/strong&gt;, and the differences are exactly where people coming from AWS get stuck.&lt;/p&gt;</description></item><item><title>Git and GitHub Blueprint - Free 3.5-Hour Course Companion (17 Chapters with Timestamps and the Commands for Each - Branching, Pull Requests, Reset, Amend, Cherry-Pick, Squash, Interactive Rebase, Bisect, Stash, Diff, Log, .gitignore, Merge Conflicts)</title><link>https://jhooq.com/git-github-blueprint-course/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/git-github-blueprint-course/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the companion page to my &lt;strong&gt;Git and GitHub blueprint&lt;/strong&gt; - a free three-hour-twenty-minute course that starts at &lt;code&gt;git init&lt;/code&gt; and ends with you rewriting history on purpose and resolving merge conflicts without sweating. Everything on this blog - Terraform, Ansible, Kubernetes manifests, this very site - lives in Git, and the course is the Git I wish somebody had taught me in my first job.&lt;/p&gt;
&lt;p&gt;The video shows every command being typed; this page is the &lt;strong&gt;cheat sheet&lt;/strong&gt;: for each of the 17 chapters the timestamp, the commands, the one thing to remember, and a link to the official &lt;a href="https://git-scm.com/docs"&gt;Git reference&lt;/a&gt; page. At the end there is the part the video leaves implicit - the rules for when rewriting history is safe.&lt;/p&gt;</description></item><item><title>HashiCorp Terraform Associate Certification - Free Full Course Companion (19 Chapters with Timestamps, Mapped to the 004 Exam Objectives, What Changed from 003, Study Plan)</title><link>https://jhooq.com/terraform-associate-certification-course/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-associate-certification-course/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the companion page to my free &lt;strong&gt;Terraform Associate full course&lt;/strong&gt; - five hours and twenty-five minutes of hands-on Terraform in nineteen chapters. The video walks through every lab; this page gives you the &lt;strong&gt;timestamps&lt;/strong&gt;, the &lt;strong&gt;detailed blog post&lt;/strong&gt; for each chapter (most chapters are a condensed version of a post on this site, so when you want more depth or the exact code, the link is here), and - the part that matters if you are taking the exam - the mapping to the &lt;strong&gt;current exam objectives&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>How to Create a FREE Google Cloud Account with $300 Credit - Step by Step Sign-Up, What the 90-Day Trial Really Covers, the Always Free Tier Limits, Budget Alerts and How to Avoid Any Charges (Google Cloud Part-1)</title><link>https://jhooq.com/gcp-free-account-300-credit/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/gcp-free-account-300-credit/</guid><description>
&lt;br/&gt;
&lt;p&gt;Every cloud journey starts with the same boring but important step - &lt;strong&gt;getting an account without getting a bill&lt;/strong&gt;. In this &lt;strong&gt;Part-1&lt;/strong&gt; of my Google Cloud series we are going to create a Google Cloud account from scratch, claim the &lt;strong&gt;$300 welcome credit&lt;/strong&gt;, and - this is the part most tutorials skip - understand exactly what the &lt;strong&gt;Free Trial&lt;/strong&gt; covers, what the &lt;strong&gt;Always Free tier&lt;/strong&gt; covers, and where the two differ, so that you can run the labs from the rest of this series without ever paying a cent.&lt;/p&gt;</description></item><item><title>How to fix kubectl - The connection to the server localhost:8080 was refused - did you specify the right host or port? (kubeadm, Kubespray, minikube, k3s, EKS)</title><link>https://jhooq.com/kubectl-connection-to-the-server-localhost-8080-was-refused/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubectl-connection-to-the-server-localhost-8080-was-refused/</guid><description>
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;The connection to the server localhost:8080 was refused&lt;/code&gt; means &lt;strong&gt;kubectl found no kubeconfig&lt;/strong&gt; and fell back to its hard-coded default, &lt;code&gt;http://localhost:8080&lt;/code&gt;. Nothing listens there, and nothing should: API servers listen on &lt;strong&gt;6443&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;kubectl looks for a kubeconfig in exactly three places, in this order: the &lt;code&gt;--kubeconfig&lt;/code&gt; flag, the &lt;code&gt;KUBECONFIG&lt;/code&gt; environment variable, then &lt;code&gt;$HOME/.kube/config&lt;/code&gt;. Whichever is missing for the user you are running as, that is the bug.&lt;/li&gt;
&lt;li&gt;The fix after &lt;code&gt;kubeadm init&lt;/code&gt; or Kubespray is three lines: &lt;code&gt;mkdir -p $HOME/.kube&lt;/code&gt;, &lt;code&gt;sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config&lt;/code&gt;, &lt;code&gt;sudo chown $(id -u):$(id -g) $HOME/.kube/config&lt;/code&gt;. Run them as the user who runs kubectl, never with &lt;code&gt;sudo kubectl&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo kubectl&lt;/code&gt; fails because sudo changes &lt;code&gt;$HOME&lt;/code&gt; to &lt;code&gt;/root&lt;/code&gt;; k3s fails because &lt;code&gt;/etc/rancher/k3s/k3s.yaml&lt;/code&gt; is root-only (mode 600); EKS, GKE and AKS need the cloud CLI to write the file first. I reproduced every variant below with kubectl v1.37.2 against a kind v0.33.0 cluster and a fresh k3s v1.37.2+k3s1 install on Ubuntu 24.04 on 2026-11-08; the outputs are in section 7.&lt;/li&gt;
&lt;li&gt;Once the error names your real server (&lt;code&gt;:6443&lt;/code&gt;) instead of &lt;code&gt;localhost:8080&lt;/code&gt;, the kubeconfig is fixed and you have a different problem: the API server itself, a firewall on port 6443, or an expired certificate. If your cluster never came up at all, start with the &lt;a href="https://jhooq.com/kubernetes-error-execution-phase-preflight-preflight/"&gt;kubeadm preflight errors post&lt;/a&gt; instead of this one.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;You have just installed a Kubernetes cluster - with &lt;a href="https://jhooq.com/14-steps-to-install-kubernetes-on-ubuntu-18-04-and-16-04/"&gt;kubeadm&lt;/a&gt;, with &lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;Kubespray&lt;/a&gt;, on a fresh EC2 instance - you type &lt;code&gt;kubectl get nodes&lt;/code&gt;, and instead of your nodes you get -&lt;/p&gt;</description></item><item><title>How to Launch an EC2 Instance on AWS Step by Step - AMI, Instance Type, Key Pair, Security Group, Connect with SSH or EC2 Instance Connect, Stop vs Terminate (AWS Part-4)</title><link>https://jhooq.com/aws-launch-ec2-instance/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-launch-ec2-instance/</guid><description>
&lt;br/&gt;
&lt;p&gt;Identities are sorted - an IAM user (&lt;a href="https://jhooq.com/aws-iam-user-step-by-step/"&gt;Part-1&lt;/a&gt;), accounts (&lt;a href="https://jhooq.com/aws-organizations-multi-account-setup/"&gt;Part-2&lt;/a&gt;) and roles (&lt;a href="https://jhooq.com/aws-assume-iam-role/"&gt;Part-3&lt;/a&gt;). Time to run something. &lt;strong&gt;&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html"&gt;Amazon EC2 (Elastic Compute Cloud)&lt;/a&gt;&lt;/strong&gt; is the virtual server service, and in this &lt;strong&gt;Part-4&lt;/strong&gt; we launch one from the console, connect to it, and understand every choice on the launch page so that nothing on the bill surprises you.&lt;/p&gt;
&lt;p&gt;I have a separate post that does all of this &lt;a href="https://jhooq.com/terraform-ec2-instance-setup/"&gt;with Terraform&lt;/a&gt;. This one is the console version - you should do it by hand once, because every field in that Terraform file corresponds to a decision on this page.&lt;/p&gt;</description></item><item><title>What is an AWS VPC and a Subnet? Virtual Private Cloud Explained in Five Minutes (Region, Availability Zones, Public vs Private Subnets, Gateways, Route Tables)</title><link>https://jhooq.com/what-is-aws-vpc-and-subnet/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/what-is-aws-vpc-and-subnet/</guid><description>
&lt;br/&gt;
&lt;p&gt;Before the &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;full VPC build in Part-5 of the AWS series&lt;/a&gt; - which takes an hour and creates fifteen resources - here is the five-minute version that the short video above gives you in 27 seconds: &lt;strong&gt;what a VPC is, what a subnet is, and the handful of words around them&lt;/strong&gt;. If you can explain this page to a colleague, the rest of AWS networking is details.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-is-a-vpc"&gt;What is a VPC?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-region-availability-zone-vpc-subnet---how-they-nest"&gt;Region, Availability Zone, VPC, subnet - how they nest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-what-is-a-subnet"&gt;What is a subnet?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-public-subnet-vs-private-subnet---it-is-only-the-route-table"&gt;Public subnet vs private subnet - it is only the route table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-the-five-things-around-a-vpc"&gt;The five things around a VPC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-the-default-vpc"&gt;The default VPC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-limits-worth-knowing"&gt;Limits worth knowing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-where-to-go-next"&gt;Where to go next&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/AvSABrwLzT0?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-what-is-a-vpc"&gt;1. What is a VPC?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;VPC - Virtual Private Cloud&lt;/strong&gt; - is &lt;strong&gt;your own private network inside an AWS region&lt;/strong&gt;. The &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"&gt;AWS definition&lt;/a&gt;: &lt;em&gt;a virtual network dedicated to your AWS account. It is logically isolated from other virtual networks in the AWS Cloud.&lt;/em&gt; Think of the region as a city and the VPC as a fenced plot you rent in it. Inside the fence you decide the street numbering (the IP address range, in &lt;a href="https://jhooq.com/what-is-cidr-classless-inter-domain-routing/"&gt;CIDR notation&lt;/a&gt; - &lt;code&gt;10.0.0.0/16&lt;/code&gt;), where the rooms are (subnets), which doors exist to the outside (gateways), who may knock on which door (security groups) and how traffic finds its way (route tables).&lt;/p&gt;</description></item><item><title>What is AWS CloudFormation? Templates, Stacks and Change Sets Explained, Template Anatomy Section by Section, Create Your First Stack Step by Step, Update With a Change Set, Drift Detection, Nested Stacks and StackSets, Quotas, Pricing, CLI, and CloudFormation vs Terraform</title><link>https://jhooq.com/aws-cloudformation-step-by-step/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-cloudformation-step-by-step/</guid><description>
&lt;br/&gt;
&lt;p&gt;Most of this blog uses &lt;a href="https://jhooq.com/terraform-index/"&gt;Terraform&lt;/a&gt; to build AWS infrastructure, so people ask me regularly - &lt;em&gt;do I still need to know CloudFormation?&lt;/em&gt; The answer is yes, for three reasons - it is the &lt;strong&gt;native&lt;/strong&gt; infrastructure-as-code service of AWS and shows up everywhere (Control Tower, Service Catalog, SAM, CDK, the &amp;quot;Launch Stack&amp;quot; buttons in every AWS blog), the &lt;strong&gt;AWS certification exams&lt;/strong&gt; assume you know it, and understanding how it works makes you better at Terraform too, because both solve the same problem in slightly different ways.&lt;/p&gt;</description></item><item><title>What is CIDR (Classless Inter-Domain Routing)? How to Calculate IP Ranges for VPCs and Subnets, with Examples (/8, /16, /24, /28, /32)</title><link>https://jhooq.com/what-is-cidr-classless-inter-domain-routing/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/what-is-cidr-classless-inter-domain-routing/</guid><description>
&lt;br/&gt;
&lt;p&gt;Every network tutorial on this blog - the &lt;a href="https://jhooq.com/aws-vpc-public-private-subnet-nat-internet-gateway-route-table/"&gt;AWS VPC&lt;/a&gt;, &lt;a href="https://jhooq.com/aws-vpc-peering-step-by-step/"&gt;VPC peering&lt;/a&gt;, &lt;a href="https://jhooq.com/aws-transit-gateway-step-by-step/"&gt;Transit Gateway&lt;/a&gt;, &lt;a href="https://jhooq.com/aws-cloud-wan-step-by-step/"&gt;Cloud WAN&lt;/a&gt;, the &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;GCP VPC posts&lt;/a&gt;, even the &lt;a href="https://jhooq.com/14-steps-to-install-kubernetes-on-ubuntu-18-04-and-16-04/"&gt;Kubernetes setup&lt;/a&gt; - starts with something like &lt;code&gt;10.0.0.0/16&lt;/code&gt;. If that slash-sixteen has always been a thing you copy rather than a thing you understand, this post fixes it in ten minutes. &lt;strong&gt;CIDR - Classless Inter-Domain Routing&lt;/strong&gt; - is simply the notation for &amp;quot;an IP address range&amp;quot;, and once you can read it you can size a VPC, split it into subnets, write a security group rule and spot an overlap before AWS throws an error at you.&lt;/p&gt;</description></item><item><title>What is NAT (Network Address Translation)? How It Works, Static NAT vs Dynamic NAT vs PAT, the Translation Table, and Where NAT Shows Up in AWS</title><link>https://jhooq.com/what-is-nat-network-address-translation/</link><pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/what-is-nat-network-address-translation/</guid><description>
&lt;br/&gt;
&lt;p&gt;Your laptop has the address &lt;code&gt;192.168.1.10&lt;/code&gt;. So does your neighbour's. So do roughly a hundred million other laptops in the world right now - and yet every one of them can open this page. The trick that makes that possible is &lt;strong&gt;NAT, network address translation&lt;/strong&gt;, and it is also the trick behind the &lt;a href="https://jhooq.com/aws-nat-gateway-deep-dive/"&gt;AWS NAT Gateway&lt;/a&gt; that lets private subnets reach the internet. This post explains NAT the way the networking series on my channel does - the problem it solves, what happens to one packet, the three types, the side effects - and then maps each idea onto what you see in AWS.&lt;/p&gt;</description></item><item><title>Build a Private AI Assistant with Self-Hosted n8n on a VPS - Telegram Bot, Gmail Digest, Memory, Custom Domain and Backups</title><link>https://jhooq.com/self-hosted-n8n-ai-assistant/</link><pubDate>Fri, 09 Oct 2026 10:50:00 +0000</pubDate><guid>https://jhooq.com/self-hosted-n8n-ai-assistant/</guid><description>
&lt;br/&gt;
&lt;p&gt;In this blog post we are going to build a &lt;strong&gt;private AI assistant&lt;/strong&gt; that lives on Telegram, remembers you, reads your inbox on demand, and sends you a triaged email briefing every morning at 7 - all running on &lt;strong&gt;your own server&lt;/strong&gt; with &lt;a href="https://n8n.io"&gt;n8n&lt;/a&gt;, self-hosted on a VPS for roughly the price of two coffees a month.&lt;/p&gt;
&lt;p&gt;This is the companion guide for my YouTube video on the same topic. The video was sponsored by Hostinger, and the VPS I use below is the one from the video, but every step works on any VPS where you can run Docker - the only Hostinger-specific part is the one-click n8n template. I have added the recording slides as a step-by-step viewer, and every screenshot from the n8n canvas, so you can follow along without pausing the video every ten seconds.&lt;/p&gt;</description></item><item><title>Google Cloud Private Service Connect (PSC) Explained - Publish a Service with a Service Attachment and Consume It Through a PSC Endpoint</title><link>https://jhooq.com/gcp-private-service-connect/</link><pubDate>Fri, 09 Oct 2026 10:40:00 +0000</pubDate><guid>https://jhooq.com/gcp-private-service-connect/</guid><description>
&lt;br/&gt;
&lt;p&gt;This is the last post of my Google Cloud networking series, and it is about the tool I find the most elegant of them all - &lt;strong&gt;Private Service Connect&lt;/strong&gt;, or &lt;strong&gt;PSC&lt;/strong&gt;. With &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;VPC peering&lt;/a&gt; we connected two whole networks. With &lt;a href="https://jhooq.com/gcp-shared-vpc/"&gt;Shared VPC&lt;/a&gt; we put many projects on one network. PSC does something much more surgical - it lets one team &lt;strong&gt;publish a single service&lt;/strong&gt;, and any other team &lt;strong&gt;consume it over a private IP inside their own VPC&lt;/strong&gt;, with the two networks never being joined at all.&lt;/p&gt;</description></item><item><title>Google Cloud Shared VPC Explained - Host Project, Service Project, networkUser and Cloud NAT (gcloud and Terraform)</title><link>https://jhooq.com/gcp-shared-vpc/</link><pubDate>Fri, 09 Oct 2026 10:30:00 +0000</pubDate><guid>https://jhooq.com/gcp-shared-vpc/</guid><description>
&lt;br/&gt;
&lt;p&gt;In the last two posts we connected networks with &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;VPC peering&lt;/a&gt; and &lt;a href="https://jhooq.com/gcp-cross-project-vpc-peering/"&gt;cross-project VPC peering&lt;/a&gt;, and both times we ran into the same wall - peering is not transitive, and every team still has to build and maintain its own VPC. In this blog post we are going to look at the way enterprises actually solve this on Google Cloud - &lt;strong&gt;Shared VPC&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;With Shared VPC there is only &lt;strong&gt;one network&lt;/strong&gt;. One project (the &lt;em&gt;host&lt;/em&gt;) owns it, and other projects (the &lt;em&gt;service projects&lt;/em&gt;) simply borrow its subnets. The network team runs the network, the app teams run workloads on it, and nobody peers anything. We will build it end to end - host, service project, IAM, firewall, a VM in the service project sitting on the host's subnet - and then one Cloud NAT so that every workload in every service project goes out through a single egress IP.&lt;/p&gt;</description></item><item><title>Google Cloud Organization Setup with Cloud Identity Free - Create an Org and Move Your Projects Under It</title><link>https://jhooq.com/gcp-organization-setup-cloud-identity/</link><pubDate>Fri, 09 Oct 2026 10:20:00 +0000</pubDate><guid>https://jhooq.com/gcp-organization-setup-cloud-identity/</guid><description>
&lt;br/&gt;
&lt;p&gt;When I started the &lt;a href="https://jhooq.com/gcp-shared-vpc/"&gt;Shared VPC&lt;/a&gt; lab I hit a wall on the very first command - &lt;code&gt;gcloud compute shared-vpc enable&lt;/code&gt; simply does not work on a standalone project. Shared VPC, Organization Policies, folders, hierarchical firewall policies and org-level IAM all need one thing first - a &lt;strong&gt;Google Cloud Organization&lt;/strong&gt;. And most of us who started with a personal Gmail account and a couple of projects do not have one.&lt;/p&gt;</description></item><item><title>Google Cloud Cross-Project VPC Peering - Peer Two VPCs in Different Projects (gcloud and Terraform)</title><link>https://jhooq.com/gcp-cross-project-vpc-peering/</link><pubDate>Fri, 09 Oct 2026 10:10:00 +0000</pubDate><guid>https://jhooq.com/gcp-cross-project-vpc-peering/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cross-project peering is the same primitive as same-project peering&lt;/strong&gt; plus one flag: each side is created in its own project with &lt;code&gt;--peer-project&lt;/code&gt; pointing at the other. Nobody needs access to the other project's network; Compute Network Admin on your own project is enough.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The lab:&lt;/strong&gt; hub-vpc 10.10.1.0/24 in project cl-demo-sandbox, spoke2-vpc 10.30.1.0/24 in project cl-demo-sandboxcli, both VMs without external IPs, SSH through IAP. The cross-project ping answered in 0.277 ms to 0.902 ms, the same as inside one project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In Terraform it is two providers with an alias&lt;/strong&gt;, one per project, and the hub's network referenced as a plain &lt;code&gt;projects/.../global/networks/hub-vpc&lt;/code&gt; string because it lives in another state.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Billing is the first wall.&lt;/strong&gt; A fresh project B cannot create a VM until a billing account is linked; in the recording that is step 1, before any network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Still not transitive.&lt;/strong&gt; spoke1 and spoke2 both peer with the hub and still cannot reach each other; the fixes are Shared VPC, Network Connectivity Center, Private Service Connect, or a proxy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check the ranges before you peer.&lt;/strong&gt; The planner's overlap box, pre-loaded with the hub range, is &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/#eyJjIjoiZ2NwIiwiYSI6IjEwLjEwLjAuMCIsInAiOjE2LCJ6IjoxLCJmIjowLCJrIjoxLCJnIjowLCJlIjoiMTAuMjAuMC4wLzE2IHBlZXIgcHJvamVjdCIsInIiOjEsInMiOjYsInYiOiJ4In0"&gt;here&lt;/a&gt;; the rules every cloud applies are in &lt;a href="https://jhooq.com/overlapping-cidr-blocks-vpc-peering-transit-gateway/"&gt;overlapping CIDR blocks&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; Same project: &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;VPC peering hub and spoke&lt;/a&gt;. Many projects on one network: &lt;a href="https://jhooq.com/gcp-shared-vpc/"&gt;Shared VPC&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;In the &lt;a href="https://jhooq.com/gcp-vpc-peering/"&gt;previous post on Google Cloud VPC peering&lt;/a&gt; we built a hub-and-spoke inside a single project. But in a real company that is almost never how it looks. The network team owns a &lt;strong&gt;hub&lt;/strong&gt; in one project, and every application team has its &lt;strong&gt;own project&lt;/strong&gt; with its own VPC. So in this blog post we are going to peer two VPC networks which live in &lt;strong&gt;different projects&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Google Cloud VPC Peering - Hub and Spoke Setup Step by Step with gcloud and Terraform</title><link>https://jhooq.com/gcp-vpc-peering/</link><pubDate>Fri, 09 Oct 2026 10:00:00 +0000</pubDate><guid>https://jhooq.com/gcp-vpc-peering/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;VPC Network Peering connects two VPC networks over Google's backbone&lt;/strong&gt; using internal IPs: no VPN, no gateway, no public IP, no hourly charge. Traffic is billed like any VM-to-VM traffic, free inside a zone and at the normal zone-to-zone rate inside a region.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It is bilateral and not transitive.&lt;/strong&gt; Create it from both networks or it stays INACTIVE; hub-to-spoke1 plus hub-to-spoke2 never gives spoke1-to-spoke2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Routes are exchanged, firewall rules are not.&lt;/strong&gt; The recording's first ping only worked after an ingress rule on the receiving network allowing icmp and tcp:22 from 10.10.1.0/24.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No subnet range may match, contain or fit inside a peer's range&lt;/strong&gt;, and Google re-checks that on every new subnet and secondary range for the life of the peering. Check the two ranges in the &lt;a href="https://jhooq.com/tools/vpc-subnet-planner/#eyJjIjoiZ2NwIiwiYSI6IjEwLjEwLjAuMCIsInAiOjE2LCJ6IjoxLCJmIjowLCJrIjoxLCJnIjowLCJlIjoiMTAuMjAuMC4wLzE2IHBlZXIgcHJvamVjdCIsInIiOjEsInMiOjYsInYiOiJ4In0"&gt;VPC Subnet Planner&lt;/a&gt; before you peer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The lab:&lt;/strong&gt; hub-vpc 10.10.1.0/24 and spoke1-vpc 10.20.1.0/24 in europe-north2, two e2-micro VMs with no external IP, SSH through IAP from 35.235.240.0/20, peering both ways, two firewall rules, and a ping that answered in 0.3 to 1 ms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; For two projects, read &lt;a href="https://jhooq.com/gcp-cross-project-vpc-peering/"&gt;cross-project VPC peering&lt;/a&gt;; for one network shared by many projects, &lt;a href="https://jhooq.com/gcp-shared-vpc/"&gt;Shared VPC&lt;/a&gt;; for exposing one service without a route, &lt;a href="https://jhooq.com/gcp-private-service-connect/"&gt;Private Service Connect&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;p&gt;In this blog post we are going to look at &lt;em&gt;&lt;strong&gt;Google Cloud VPC Network Peering&lt;/strong&gt;&lt;/em&gt; - what it is, when you should use it instead of Shared VPC or a VPN, and then we are gonna build a complete &lt;strong&gt;hub-and-spoke&lt;/strong&gt; lab step by step. Two VPC networks, two VMs with no public IP at all, and by the end of the post the hub VM pings the spoke VM over an internal IP, privately over Google's backbone.&lt;/p&gt;</description></item><item><title>Deploying a Next.js SaaS on Google Cloud Run with Terraform: Cloud SQL, Secret Manager, Cloud Build and a deployer service account (ReplyDial case study)</title><link>https://jhooq.com/deploy-nextjs-saas-google-cloud-run-terraform/</link><pubDate>Mon, 28 Sep 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/deploy-nextjs-saas-google-cloud-run-terraform/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;For the last few weeks I have been building and shipping a small SaaS of my own, and I want to document the infrastructure side while it is fresh, because most &amp;quot;deploy to Cloud Run&amp;quot; tutorials stop at &lt;code&gt;gcloud run deploy&lt;/code&gt; and skip everything that makes a service production-ready: a managed database, secrets, a CI build identity, org policies, and a deploy identity that does not expire every hour.&lt;/p&gt;</description></item><item><title>AI Caught My Cloud Failure Before I Did</title><link>https://jhooq.com/kestra-ai-cloud-monitoring/</link><pubDate>Mon, 09 Mar 2026 00:00:00 +0000</pubDate><guid>https://jhooq.com/kestra-ai-cloud-monitoring/</guid><description>
&lt;h2 id="table-of-contents"&gt;Table of Contents&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#what-are-we-building"&gt;What Are We Building?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#architecture-overview"&gt;Architecture Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#prerequisites"&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#project-structure"&gt;Project Structure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-1-multi-cloud-infrastructure-with-terraform"&gt;Step 1: Multi-Cloud Infrastructure with Terraform&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#providers-configuration"&gt;Providers Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#aws-module--vpc-subnet-security-group-ec2"&gt;AWS Module — VPC, Subnet, Security Group, EC2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#gcp-module--network-firewall-vm"&gt;GCP Module — Network, Firewall, VM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#root-main-and-outputs"&gt;Root Main and Outputs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-2-the-flask-app--crashlab-api"&gt;Step 2: The Flask App — CrashLab API&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#intentional-chaos--30-error-rate"&gt;Intentional Chaos — 30% Error Rate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#health-check-endpoint"&gt;Health Check Endpoint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#log-endpoint--no-ssh-needed"&gt;Log Endpoint — No SSH Needed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-3-running-kestra-with-docker"&gt;Step 3: Running Kestra with Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-4-ai-health-check-flow"&gt;Step 4: AI Health Check Flow&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#how-the-kestra-errors-block-works"&gt;How the Kestra Errors Block Works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-ai-agent-task--google-gemini-25-flash"&gt;The AI Agent Task — Google Gemini 2.5 Flash&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#slack-alert-with-ai-diagnosis"&gt;Slack Alert with AI Diagnosis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-5-ai-log-monitor-flow"&gt;Step 5: AI Log Monitor Flow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-6-cloudwatch-agent-for-log-streaming"&gt;Step 6: CloudWatch Agent for Log Streaming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#how-it-all-works-together"&gt;How It All Works Together&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h1 id="ai-caught-my-cloud-failure-before-i-did"&gt;AI Caught My Cloud Failure Before I Did&lt;/h1&gt;
&lt;p&gt;What if your infrastructure could diagnose its own failures and tell you exactly what went wrong — before you even check your phone?&lt;/p&gt;</description></item><item><title>AWS API Gateway Tutorial - REST API with Lambda Proxy and Non-Proxy Integration, Request Validation, HTTP API vs REST API, Resource Policies, Lambda Authorizers and Terraform</title><link>https://jhooq.com/aws-api-gateway/</link><pubDate>Fri, 01 Aug 2025 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-api-gateway/</guid><description>
&lt;br/&gt;
&lt;p&gt;If you prefer to watch, the whole guide is also a video -&lt;/p&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/jcibXVFiFek?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;p&gt;In this article we are going to look at &lt;a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html"&gt;Amazon API Gateway&lt;/a&gt; - the AWS service that acts as the &amp;quot;front door&amp;quot; for your backend, whether that backend is a Lambda function, a container on &lt;a href="https://jhooq.com/aws-fargate-docker-container/"&gt;ECS/Fargate&lt;/a&gt;, an EC2 instance or another AWS service. If you have ever wanted to put an HTTPS endpoint in front of some code without running a web server, this is the service.&lt;/p&gt;</description></item><item><title>Azure Function App</title><link>https://jhooq.com/azure-function-app/</link><pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate><guid>https://jhooq.com/azure-function-app/</guid><description>
&lt;h1 id="table-of-content"&gt;Table of Content&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#how-to-deploy-an-azure-http-trigger-function-app-using-python-and-the-azure-cli"&gt;HTTP Trigger Azure Function App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#automate-with-azure-build-a-python-timer-triggered-azure-function-app"&gt;Timer-Triggered Azure Function App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#build-a-python-azure-function-triggered-by-azure-storage-queue"&gt;Azure Queue Storage Trigger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#securing-your-azure-function-app-with-azure-active-directory-azure-ad"&gt;Azure Function App Authentication using Azure Entra ID&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h1 id="how-to-deploy-an-azure-http-trigger-function-app-using-python-and-the-azure-cli"&gt;How to Deploy an Azure HTTP Trigger Function App Using Python and the Azure CLI&lt;/h1&gt;
&lt;p&gt;Azure Function Apps offer a powerful serverless compute option that allows developers to execute code in response to events—without managing infrastructure. In this step-by-step guide, we'll walk you through deploying an &lt;strong&gt;Azure Function App using Python&lt;/strong&gt;, from local development to cloud deployment, using the Azure CLI and the Azure Functions Core Tools.&lt;/p&gt;</description></item><item><title>Azure Virtual Machine Course: Terraform Code for a Linux VM, VNet, NSG and Route Table (azurerm 5.x), Plus the Slides</title><link>https://jhooq.com/azure-master-course-vm/</link><pubDate>Mon, 17 Feb 2025 00:00:00 +0000</pubDate><guid>https://jhooq.com/azure-master-course-vm/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;This page is the code and slide companion to my Azure Masterclass video&lt;/strong&gt;: virtual machine, load balancer, scale set, VNet, subnet, route table and NSG. The Terraform below creates &lt;strong&gt;10 resources&lt;/strong&gt; in one resource group.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validated, not applied:&lt;/strong&gt; on 2026-11-04 &lt;code&gt;terraform validate&lt;/code&gt; with Terraform 1.17.1 passed for azurerm 4.14.0 and 5.12.0, and failed on 3.0.0 with &lt;code&gt;Only RSA SSH keys are supported by Azure&lt;/code&gt; for an ed25519 public key.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix for that error:&lt;/strong&gt; use an &lt;code&gt;ssh-rsa&lt;/code&gt; key of at least 2048 bits on azurerm 3.x, or move to a current provider, where the docs accept &lt;code&gt;ssh-rsa&lt;/code&gt; (2048-bit or more) and &lt;code&gt;ssh-ed25519&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan and apply need a subscription:&lt;/strong&gt; on azurerm 4.14.0 &lt;code&gt;terraform plan&lt;/code&gt; stops with &lt;code&gt;subscription_id&lt;/code&gt; is a required provider property; validate does not need it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your case?&lt;/strong&gt; If you only need the network (VNet, subnets, NSG, route table) without a VM, read &lt;a href="https://jhooq.com/azure-vnet-subnet-nsg-route-table-step-by-step/"&gt;Azure Virtual Network step by step&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/m1rN24vnOlU?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Azure networking series on jhooq.com -&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/azure-vnet-subnet-nsg-route-table-step-by-step/"&gt;Azure Virtual Network step by step - VNet, subnets, Network Security Group and route table (Part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/azure-vnet-peering-step-by-step/"&gt;Azure VNet peering step by step - connect two virtual networks with different CIDR ranges (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/azure-master-course-vm/"&gt;Azure Virtual Machine course&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/azure-function-app/"&gt;Azure Function App&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Tools used in this series -&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/tools/vpc-subnet-planner/"&gt;VPC Subnet Planner - sizes the VNet and subnets with Azure's five reserved addresses per subnet built in&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/tools/kubernetes-ip-calculator/"&gt;Kubernetes IP Calculator - AKS node subnet, pod subnet and max pods per node for Overlay, Pod Subnet and legacy Azure CNI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;</description></item><item><title>Learn AWS S3 - The Complete Course (Buckets, Objects, Storage Classes, Lifecycle, Versioning, Security Defaults, Bucket Policies, Static Hosting, CLI and Terraform)</title><link>https://jhooq.com/aws-s3-course/</link><pubDate>Mon, 09 Sep 2024 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-s3-course/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html"&gt;Amazon S3 (Simple Storage Service)&lt;/a&gt; was the second AWS service ever launched, back in 2006, and it is still the one you will touch in almost every AWS project - for backups, logs, build artifacts, static websites, data lakes, Terraform state files and the images on this very blog. It is &lt;strong&gt;object storage&lt;/strong&gt; - you put files (objects) into buckets and get them back by name over HTTPS - with practically unlimited capacity and durability that nobody can build themselves.&lt;/p&gt;</description></item><item><title>Ansible Handlers Explained - notify, listen, flush_handlers, Handler Order and Real-World Examples</title><link>https://jhooq.com/ansible-handlers/</link><pubDate>Tue, 19 Sep 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-handlers/</guid><description>
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Welcome to another Ansible blog post! Today we'll dive deep into &lt;strong&gt;Ansible Handlers&lt;/strong&gt;. Before we jump straight into the demo, let's lay a solid foundation by understanding the '&lt;strong&gt;what&lt;/strong&gt;' and '&lt;strong&gt;when&lt;/strong&gt;' of Ansible Handlers - and especially the &lt;strong&gt;when&lt;/strong&gt;, because that is where almost every handler bug comes from.&lt;/p&gt;
&lt;br/&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-are-ansible-handlers"&gt;&lt;strong&gt;What Are Ansible Handlers?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-setting-up-the-ansible-handler"&gt;&lt;strong&gt;Setting Up the Ansible Handler&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-setting-up-the-ansible-tasks"&gt;&lt;strong&gt;Setting up the Ansible tasks&lt;/strong&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;3.1 &lt;a href="#31-installing-the-nginx-application-server"&gt;&lt;strong&gt;Installing the Nginx Application Server&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3.2 &lt;a href="#32-updating-website-content"&gt;&lt;strong&gt;Updating Website Content&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3.3 &lt;a href="#33-calling-the-ansible-handler-with-notify"&gt;&lt;strong&gt;Calling the Ansible handler with notify&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-when-do-handlers-actually-run-and-meta-flush_handlers"&gt;&lt;strong&gt;When do handlers actually run? (and meta: flush_handlers)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-multiple-ansible-handlers-using-the-listen-keyword"&gt;&lt;strong&gt;Multiple Ansible Handlers using the listen keyword&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-ansible-handler-order---the-real-rules"&gt;&lt;strong&gt;Ansible Handler order - the real rules&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-handlers-in-roles-and-include-files"&gt;&lt;strong&gt;Handlers in roles and include files&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-happens-when-a-task-fails---force_handlers"&gt;&lt;strong&gt;What happens when a task fails - force_handlers&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-common-mistakes---why-my-handler-never-runs"&gt;&lt;strong&gt;Common mistakes - why my handler never runs&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion--key-takeaways"&gt;&lt;strong&gt;Conclusion &amp;amp; Key Takeaways&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-what-are-ansible-handlers"&gt;1. What Are Ansible Handlers?&lt;/h2&gt;
&lt;p&gt;Imagine you're managing a website and wish to update its content. You employ an Ansible Playbook to copy the refreshed &lt;strong&gt;HTML&lt;/strong&gt; file onto the &lt;strong&gt;server&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Securing Sensitive Data in Terraform</title><link>https://jhooq.com/terraform-secure-sensitive-data/</link><pubDate>Mon, 03 Jul 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-secure-sensitive-data/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/terraform-sensitive/terraform-sensitive-data.webp"
title="Securing Sensitive Data in Terraform"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Securing Sensitive Data in Terraform&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-introduction"&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-securing-sensitive-data-with-terraform"&gt;&lt;strong&gt;Securing Sensitive Data with Terraform&lt;/strong&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;2.1 &lt;a href="#21-securely-managing-terraform-variables"&gt;&lt;strong&gt;Securely managing Terraform variables&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2.2 &lt;a href="#22-encrypting-sensitive-data-at-rest"&gt;&lt;strong&gt;Encrypting Sensitive Data at Rest&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2.3 &lt;a href="#23-encrypting-sensitive-data-in-transit"&gt;&lt;strong&gt;Encrypting Sensitive Data in Transit&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2.4 &lt;a href="#24-the-use-of-sensitive-argument-in-terraform-to-prevent-logging-of-sensitive-data"&gt;&lt;strong&gt;The use of sensitive argument in Terraform to prevent logging of sensitive data&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-practical-examples-of-securing-sensitive-data"&gt;&lt;strong&gt;Practical Examples of Securing Sensitive Data&lt;/strong&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;3.1 &lt;a href="#31-using-environment-variables-for-sensitive-data"&gt;&lt;strong&gt;Using environment variables for sensitive data&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3.2 &lt;a href="#32-securing-sensitive-data-with-aws-key-management-service-kms"&gt;&lt;strong&gt;Securing sensitive data with AWS Key Management Service (KMS)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;3.3 &lt;a href="#33-implementing-vault-for-secrets-management"&gt;&lt;strong&gt;Implementing Vault for secrets management&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-regular-auditing-and-rotating-secrets"&gt;&lt;strong&gt;Regular Auditing and Rotating Secrets&lt;/strong&gt;&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;4.1 &lt;a href="#41-the-importance-of-auditing"&gt;&lt;strong&gt;The importance of auditing&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;4.2 &lt;a href="#42-regular-rotation-of-secrets"&gt;&lt;strong&gt;Regular rotation of secrets&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-conclusion"&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Sensitive data?&lt;/strong&gt; &lt;strong&gt;Yes&lt;/strong&gt;, you heard it right. We're talking about the data that you don't want to expose to the public. This might be your -&lt;/p&gt;</description></item><item><title>Boost Your AWS Security with Terraform : A Step-by-Step Guide</title><link>https://jhooq.com/security-practices-aws-terraform/</link><pubDate>Fri, 30 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/security-practices-aws-terraform/</guid><description>
&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;Security in the cloud is not just an option; it's an imperative. Much like a well-guarded fortress, your cloud infrastructure needs robust, scalable defenses. &lt;a href="https://aws.com"&gt;&lt;strong&gt;AWS&lt;/strong&gt;&lt;/a&gt; provides us with a wealth of tools and best practices for this task, but managing them manually can feel like trying to organize an unruly group of knights.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href="https://terraform.com"&gt;&lt;strong&gt;Terraform&lt;/strong&gt;&lt;/a&gt;, our trusted steward, enabling us to manage our defenses in a structured, efficient, and version-controlled manner. Together, &lt;strong&gt;AWS&lt;/strong&gt; and &lt;strong&gt;Terraform&lt;/strong&gt; can help us establish a fortress that's not only secure but also scalable, efficient, and cost-effective.&lt;/p&gt;</description></item><item><title>How to Load Input Data from a File in Terraform?</title><link>https://jhooq.com/terraform-load-data-from-input-file/</link><pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-load-data-from-input-file/</guid><description>
&lt;p&gt;&lt;a href="https://terraform.io"&gt;Terraform&lt;/a&gt;, HashiCorp's infrastructure as code (IaC) tool, is a favorite among developers and system administrators for its simplicity and power in managing and provisioning data center infrastructure.&lt;/p&gt;
&lt;p&gt;However, as with any technology, there are complexities that arise as we go deeper. One such complexity is &lt;strong&gt;loading input data from a file&lt;/strong&gt;. Let's address this topic in detail.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1what-is-input-data-in-terraform"&gt;&lt;strong&gt;What is Input Data in Terraform?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-why-load-input-data-from-a-file"&gt;&lt;strong&gt;Why Load Input Data from a File?&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-loading-input-data-terraforms-file-function"&gt;&lt;strong&gt;Loading Input Data: Terraform's file() Function&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-parsing-structured-data-terraforms-jsondecode-and-yamldecode-functions"&gt;&lt;strong&gt;Parsing Structured Data: Terraform's jsondecode() and yamldecode() Functions&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-load-input-data-from-a-file-using-templatefile-function"&gt;&lt;strong&gt;Load Input Data from a File using templatefile Function&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-load-input-data-from-a-file-using-local_file-data-source"&gt;&lt;strong&gt;Load Input Data from a File using local_file Data Source&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-load-input-data-from-a-file-using-template_file-data-source-deprecated"&gt;&lt;strong&gt;Load Input Data from a File using template_file Data Source (Deprecated)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-wrapping-up-leveraging-terraforms-file-based-inputs"&gt;&lt;strong&gt;Wrapping Up: Leveraging Terraform's File-Based Inputs&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1what-is-input-data-in-terraform"&gt;1.What is Input Data in Terraform?&lt;/h2&gt;
&lt;p&gt;Before we delve into the details, let's understand what input data is in Terraform. Inputs in Terraform are like function arguments that allow you to customize aspects of the resource being created. They can include things like &lt;em&gt;IP addresses, usernames,&lt;/em&gt; and any other parameters needed to configure your resources.&lt;/p&gt;</description></item><item><title>Can Terraform provision on-premises infrastructure? Yes - vSphere, Proxmox, libvirt, MAAS, Docker and plain SSH, with a real apply and the honest limits (Terraform 1.14)</title><link>https://jhooq.com/terraform-provision-on-premise-infra/</link><pubDate>Tue, 20 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-provision-on-premise-infra/</guid><description>
&lt;!-- no-video: no companion video for on-premises Terraform yet; the Terraform playlist covers the cloud providers --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Yes.&lt;/strong&gt; Terraform does not care where the API lives. On-premises it talks to vCenter (&lt;code&gt;vmware/vsphere&lt;/code&gt;), Proxmox VE (&lt;code&gt;bpg/proxmox&lt;/code&gt;), libvirt/KVM (&lt;code&gt;dmacvicar/libvirt&lt;/code&gt;), Canonical MAAS for bare metal (&lt;code&gt;canonical/maas&lt;/code&gt;) or a Docker engine (&lt;code&gt;kreuzwerker/docker&lt;/code&gt;), and the plan/apply/destroy loop is identical to AWS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The requirement is an API.&lt;/strong&gt; A rack of servers with only SSH has no API, so Terraform can run scripts on them (&lt;code&gt;null_resource&lt;/code&gt; + &lt;code&gt;remote-exec&lt;/code&gt;) but cannot read their state back; drift detection, the thing Terraform is for, does not exist there. Put a management layer in front (MAAS, Proxmox, vSphere) or hand the servers to Ansible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measured on Terraform 1.14.3:&lt;/strong&gt; the Docker provider created a network, an image and 2 containers in 4502 ms, and after I removed one container by hand &lt;code&gt;terraform plan&lt;/code&gt; reported exactly &lt;code&gt;1 to add&lt;/code&gt; (exit code 2). The vSphere, Proxmox and libvirt providers are 36 MB, 28 MB and 27 MB and all pass &lt;code&gt;terraform validate&lt;/code&gt; without any credentials.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Without a reachable vCenter the plan fails at the provider, not the resource:&lt;/strong&gt; &lt;code&gt;error setting up new vSphere SOAP client ... lookup vcenter.example.internal: no such host&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Everything below ran on 2026-10-16 on an Ubuntu 24.04 runner with Docker 28.0.4; the vSphere, Proxmox and libvirt sections are init and validate only, because I do not have those APIs on a laptop.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/terraform-docker-container-guide/"&gt;Terraform Guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2023 version of this post was a tour of the options. The question behind it is usually &amp;quot;will Terraform give me the same workflow on our own hardware as on AWS&amp;quot;, and the answer depends on one thing: whether there is an API in front of the hardware. So this rewrite is organised around that, with a real apply where I could run one.&lt;/p&gt;</description></item><item><title>Fixing the Terraform Error creating IAM Role. MalformedPolicyDocument Has prohibited field Resource</title><link>https://jhooq.com/terraform-malformed-policy-document/</link><pubDate>Tue, 20 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-malformed-policy-document/</guid><description>
&lt;p&gt;Today, we'll unravel a common hurdle that you might encounter while working with &lt;strong&gt;Terraform&lt;/strong&gt; and &lt;strong&gt;AWS&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Error creating IAM Role. MalformedPolicyDocument: Has prohibited field Resource&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This error can put a wrinkle in your cloud deployment process, but don't worry. I'm here to guide you through it, step by step.&lt;/p&gt;
&lt;p&gt;By the end of this post, you'll have a good grasp of what this error means, why it happens, and most importantly, how to fix it. So let's dive right in.&lt;/p&gt;</description></item><item><title>Terraform null values - replace null with a default (coalesce, try, conditional, optional(), nullable = false), with real output from Terraform 1.16</title><link>https://jhooq.com/terraform-replace-null-value-with-default-value/</link><pubDate>Mon, 19 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-replace-null-value-with-default-value/</guid><description>
&lt;!-- no-video: no companion video yet; the Terraform variables video covers defaults but not null handling --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;null&lt;/code&gt; in Terraform means &amp;quot;not set&amp;quot;.&lt;/strong&gt; Passing &lt;code&gt;null&lt;/code&gt; to a resource argument is the same as omitting the argument; passing it into a string, a &lt;code&gt;count&lt;/code&gt; or a &lt;code&gt;for_each&lt;/code&gt; is an error.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replace it with &lt;code&gt;coalesce(var.port, 8080)&lt;/code&gt;&lt;/strong&gt; when the fallback is a plain value, with &lt;strong&gt;&lt;code&gt;var.name != null ? var.name : &amp;quot;app-default&amp;quot;&lt;/code&gt;&lt;/strong&gt; when the fallback is an expression, with &lt;strong&gt;&lt;code&gt;try(var.settings.owner, &amp;quot;nobody&amp;quot;)&lt;/code&gt;&lt;/strong&gt; when the attribute may not exist at all, and with &lt;strong&gt;&lt;code&gt;optional(number, 1)&lt;/code&gt;&lt;/strong&gt; inside &lt;code&gt;object&lt;/code&gt; variables so callers can omit keys.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;nullable = false&lt;/code&gt;&lt;/strong&gt; on a variable makes &lt;code&gt;null&lt;/code&gt; a plan-time error (&lt;code&gt;Required variable not set&lt;/code&gt;), which is what you want for a region or an account ID.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Three traps I hit on 1.16.2:&lt;/strong&gt; &lt;code&gt;coalesce(null, &amp;quot;&amp;quot;)&lt;/code&gt; fails because &lt;code&gt;coalesce&lt;/code&gt; treats the empty string as no value too; &lt;code&gt;-var region=null&lt;/code&gt; on the CLI sets the &lt;em&gt;string&lt;/em&gt; &lt;code&gt;&amp;quot;null&amp;quot;&lt;/code&gt;, not the null value; and &lt;code&gt;a = 1; b = 2&lt;/code&gt; is &lt;code&gt;Invalid character&lt;/code&gt;, HCL has no semicolons.&lt;/li&gt;
&lt;li&gt;Every output below is from Terraform v1.16.2 on Windows, run on 2026-10-17 with no provider and no cloud credentials, so you can copy the file and get the same results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/how-to-use-terraform-locals/"&gt;How to use Terraform locals?&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2023 version of this post explained what null is. For this rewrite I put every technique in one &lt;code&gt;main.tf&lt;/code&gt;, applied it, and pushed the edge cases through &lt;code&gt;terraform console&lt;/code&gt;, so the behaviour of each function is shown, not described.&lt;/p&gt;</description></item><item><title>Terraform Use Module Output as Input for Another Module: Wiring, Type Errors and the for_each Trap (Terraform 1.17)</title><link>https://jhooq.com/terraform-ouput-module-input-another-module/</link><pubDate>Mon, 19 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-ouput-module-input-another-module/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Two steps: declare &lt;code&gt;output &amp;quot;instance_id&amp;quot;&lt;/code&gt; inside module A, then pass &lt;code&gt;module.ec2_module.instance_id&lt;/code&gt; as an argument of module B in the root module. Modules never talk to each other directly; the root module is the wire.&lt;/li&gt;
&lt;li&gt;That one reference is also the dependency: Terraform creates A first and B second. You do not need &lt;code&gt;depends_on&lt;/code&gt; (&lt;a href="https://raw.githubusercontent.com/hashicorp/web-unified-docs/main/content/terraform/v1.17.x/docs/language/meta-arguments/depends_on.mdx"&gt;Terraform docs&lt;/a&gt; reserve it for hidden dependencies).&lt;/li&gt;
&lt;li&gt;The three errors you will meet: &lt;code&gt;Unsupported attribute&lt;/code&gt; (output not declared), &lt;code&gt;Missing required argument&lt;/code&gt; (B needs the input), and &lt;code&gt;string required, but have tuple&lt;/code&gt; (wrong type, found by &lt;code&gt;plan&lt;/code&gt;, not by &lt;code&gt;validate&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Do not use an apply-time output as a &lt;code&gt;for_each&lt;/code&gt; key: it fails with &lt;code&gt;Invalid for_each argument&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Only reading the output of a child inside the same root works like this. Not your case? See &lt;a href="https://jhooq.com/terraform-reference-module-output/"&gt;reading a module output and sensitive outputs&lt;/a&gt; or &lt;a href="https://jhooq.com/terraform-module/"&gt;how Terraform modules work&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/G41EpGwh5JQ?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;I wrote the first version of this post in 2023 with an EC2 example I never ran. This is the rewrite: a small lab you can reproduce offline with two local modules and the &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;local&lt;/code&gt; providers, so there is no cloud account involved. Everything below ran with Terraform 1.17.1 (null 3.3.2, local 2.9.1) on 2026-11-02. If you are new to the &lt;code&gt;output&lt;/code&gt; block itself, start with the &lt;a href="https://jhooq.com/how-to-use-terraform-output-values/"&gt;output values post&lt;/a&gt;; the full list of posts is in the &lt;a href="https://jhooq.com/terraform-index/"&gt;Terraform index&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Terraform Reference Module Output: module.name.output, Sensitive Outputs and Passing Values Between Modules (Terraform 1.17)</title><link>https://jhooq.com/terraform-reference-module-output/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-reference-module-output/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inside a module you cannot see resources of a sibling or parent module. The only way out is an &lt;code&gt;output&lt;/code&gt; block in the child, read from the caller as &lt;code&gt;module.&amp;lt;module_name&amp;gt;.&amp;lt;output_name&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A reference to a name the child never declared fails at validate time with &lt;code&gt;Unsupported attribute&lt;/code&gt;; I show the exact text below.&lt;/li&gt;
&lt;li&gt;A root output that carries a sensitive child output must itself say &lt;code&gt;sensitive = true&lt;/code&gt;. &lt;code&gt;terraform validate&lt;/code&gt; passes without it, &lt;code&gt;terraform apply&lt;/code&gt; fails.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sensitive&lt;/code&gt; only hides the value in normal CLI output. It is stored in state in plain text and &lt;code&gt;terraform output -raw&lt;/code&gt; prints it (&lt;a href="https://raw.githubusercontent.com/hashicorp/web-unified-docs/main/content/terraform/v1.17.x/docs/language/values/outputs.mdx"&gt;Terraform docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Using a module output as another module's input is enough to order them; you do not need &lt;code&gt;depends_on&lt;/code&gt;. Not the problem you have? Start with &lt;a href="https://jhooq.com/terraform-module/"&gt;How Terraform modules work&lt;/a&gt; or &lt;a href="https://jhooq.com/terraform-ouput-module-input-another-module/"&gt;passing an output into another module&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/G41EpGwh5JQ?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;This post is a lab that anybody can reproduce offline: two local modules, the &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;local&lt;/code&gt; providers, no cloud account. Everything below was run with Terraform 1.17.1 (null 3.3.2, local 2.9.1) on 2026-11-02. If you want the basics of the &lt;code&gt;output&lt;/code&gt; block first, the &lt;a href="https://jhooq.com/how-to-use-terraform-output-values/"&gt;output values post&lt;/a&gt; covers them, and the whole series is in the &lt;a href="https://jhooq.com/terraform-index/"&gt;Terraform index&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Understanding Terraform Escape Sequences</title><link>https://jhooq.com/terraform-escape-sequences/</link><pubDate>Sun, 18 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-escape-sequences/</guid><description>
&lt;p&gt;In this blog post share with you another fascinating aspect of &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; - escape sequences. I remember when I first learned about escape sequences, and the moment it all clicked was magical. So, let's get ready to dive in!&lt;/p&gt;
&lt;p&gt;Just like in any language, &lt;strong&gt;escape sequences&lt;/strong&gt; in &lt;a href="https://jhooq.com/terraform-index"&gt;Terraform&lt;/a&gt; are our way of communicating non-graphic characters or characters with special meanings. We often find them in &lt;a href="https://jhooq.com/terraform-string-handling"&gt;string literals&lt;/a&gt;, surrounded by a &lt;strong&gt;backslash ()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Today, I will take you through various Terraform escape sequences, and we'll see them in action together.&lt;/p&gt;</description></item><item><title>(docker run -d) Why Does a Docker Container Stop Automatically?</title><link>https://jhooq.com/docker-stop-container-after-docker-run/</link><pubDate>Sat, 17 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-stop-container-after-docker-run/</guid><description>
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; has become an indispensable tool in modern software development, offering the ability to package applications and their dependencies into lightweight containers.&lt;/p&gt;
&lt;p&gt;However, if you're like me, you may have encountered a puzzling situation where your &lt;strong&gt;Docker container unexpectedly stops&lt;/strong&gt; after running the &lt;strong&gt;docker run -d&lt;/strong&gt; command.&lt;/p&gt;
&lt;p&gt;In this blog post, I'll guide you through the reasons behind this behavior and provide practical examples and solutions to help you overcome this challenge. Whether you're a Docker novice or an experienced user, together we'll unravel the mystery and ensure your containers stay up and running seamlessly.&lt;/p&gt;</description></item><item><title>How to fix private-dns-enabled cannot be set because there is already a conflicting DNS domain?</title><link>https://jhooq.com/terraform-error-private-dbs-enabled/</link><pubDate>Sat, 17 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-error-private-dbs-enabled/</guid><description>
&lt;p&gt;Navigating the intricacies of &lt;strong&gt;&lt;a href="https://aws.amazon.com/"&gt;Amazon Web Services (AWS)&lt;/a&gt;&lt;/strong&gt; can be a complex task. Even seasoned developers working with &lt;a href="https://www.hashicorp.com/products/terraform"&gt;Infrastructure as Code (IaC)&lt;/a&gt; tools like Terraform and &lt;a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html"&gt;CloudFormation&lt;/a&gt; may occasionally face frustrating obstacles.&lt;/p&gt;
&lt;p&gt;A common stumbling block arises from &lt;strong&gt;conflicts in Virtual Private Cloud &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.htmls"&gt;(VPC)&lt;/a&gt; settings&lt;/strong&gt;, particularly when managing &lt;strong&gt;private DNS domains&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In this blog post, I'll guide you through resolving an error stating -&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;private-dns-enabled cannot be set because there is already a conflicting DNS domain for secretsmanager.us-east-2.amazonaws.com in the VPC.&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Detach from a Docker container without stopping it - docker attach, Ctrl-P Ctrl-Q, --sig-proxy and --detach-keys (tested on Docker 28)</title><link>https://jhooq.com/docker-attach-detach-process/</link><pubDate>Wed, 14 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-attach-detach-process/</guid><description>
&lt;!-- no-video: no companion video for attach and detach yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Detach without stopping: press Ctrl-P, then Ctrl-Q.&lt;/strong&gt; Docker prints &lt;code&gt;read escape sequence&lt;/code&gt;, &lt;code&gt;docker attach&lt;/code&gt; exits with code 1, and the container keeps running.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It only works when the container has a TTY&lt;/strong&gt; - started with &lt;code&gt;docker run -it&lt;/code&gt; or &lt;code&gt;-dit&lt;/code&gt;. On a container started with &lt;code&gt;-d&lt;/code&gt; only, Ctrl-P Ctrl-Q is just two bytes, and &lt;strong&gt;Ctrl-C is forwarded to PID 1 as SIGINT, so nginx stopped&lt;/strong&gt; in my test.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;exit&lt;/code&gt; or Ctrl-D in the attached shell ends PID 1, so the container stops&lt;/strong&gt; (&lt;code&gt;Exited (0)&lt;/code&gt;). Attaching again then fails with &lt;code&gt;You cannot attach to a stopped container, start it first&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Change the keys&lt;/strong&gt; with &lt;code&gt;docker attach --detach-keys=ctrl-x,x&lt;/code&gt; or once for good with &lt;code&gt;&amp;quot;detachKeys&amp;quot;: &amp;quot;ctrl-e,e&amp;quot;&lt;/code&gt; in &lt;code&gt;~/.docker/config.json&lt;/code&gt;. A &lt;code&gt;--detach-keys&lt;/code&gt; given to &lt;code&gt;docker run&lt;/code&gt; only applies to that run's own session, not to a later &lt;code&gt;docker attach&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The safer habits:&lt;/strong&gt; &lt;code&gt;docker exec -it NAME sh&lt;/code&gt; for a shell (exit leaves the container alone) and &lt;code&gt;docker logs -f NAME&lt;/code&gt; to watch output (no keys or signals reach the container).&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 on Ubuntu 24.04, captured on 2026-10-14.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-error-executable-file/"&gt;exec&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-attach-detach/attach-detach-keys.svg"
title="What Ctrl-P Ctrl-Q, Ctrl-C and exit do while attached to a Docker container"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;What Ctrl-P Ctrl-Q, Ctrl-C and exit do while attached to a Docker container&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Use SSH credentials in Jenkins with SSH, SCP, SFTP</title><link>https://jhooq.com/jenkins-ssh-with-scp-sftp/</link><pubDate>Thu, 08 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/jenkins-ssh-with-scp-sftp/</guid><description>
&lt;p&gt;There are various ways in &lt;a href="https://www.jenkins.io/"&gt;Jenkins&lt;/a&gt; for using the SSH credentials to perform &lt;strong&gt;SSH, SCP or SFTP&lt;/strong&gt;. You have to choose which one is more suitable for your need and project setup.&lt;/p&gt;
&lt;p&gt;In this blog post I will walk you through the couple of options with which you can accomplish the &lt;strong&gt;SSH, SCP or SFTP&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-using-ssh-agent-plugin"&gt;Using SSH Agent Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-credentials-binding-plugin"&gt;Credentials Binding Plugin&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-using-ssh-agent-plugin"&gt;1. Using SSH Agent Plugin&lt;/h2&gt;
&lt;h3 id="11-install-necessary-plugins"&gt;1.1 Install necessary plugins&lt;/h3&gt;
&lt;p&gt;Make sure that you've installed the &amp;quot;&lt;a href="https://plugins.jenkins.io/ssh-agent/"&gt;SSH Agent Plugin&lt;/a&gt;&amp;quot; and &amp;quot;Pipeline: Groovy Plugin&amp;quot; in Jenkins. These plugins will allow Jenkins to use SSH credentials in your pipeline.&lt;/p&gt;</description></item><item><title>docker rename image - How to Rename a Docker Image or Change Its Repository Name (docker tag + docker rmi, with Real Output)</title><link>https://jhooq.com/docker-change-repository-name/</link><pubDate>Wed, 07 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-change-repository-name/</guid><description>
&lt;!-- no-video: no companion video for image renaming yet; the docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;There is no &lt;code&gt;docker rename&lt;/code&gt; for images&lt;/strong&gt; - that command renames &lt;em&gt;containers&lt;/em&gt;. For an image the rename is two commands: &lt;code&gt;docker tag old:tag new:tag&lt;/code&gt; adds the new name, &lt;code&gt;docker rmi old:tag&lt;/code&gt; removes the old one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The image ID does not change&lt;/strong&gt; and no bytes are copied: a name is a label pointing at the same layers. &lt;code&gt;docker rmi&lt;/code&gt; of a name that still has other names prints &lt;code&gt;Untagged&lt;/code&gt;, not &lt;code&gt;Deleted&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Only the repository part must be lowercase&lt;/strong&gt;; the tag may contain capitals. &lt;code&gt;docker tag jhooq/web:1.0 JHOOQ/Web:1.0&lt;/code&gt; fails with &lt;code&gt;repository name (Web) must be lowercase&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retag before you push&lt;/strong&gt; - the registry decides the shape: &lt;code&gt;rahulwagh/web:1.0&lt;/code&gt; for Docker Hub, &lt;code&gt;ghcr.io/rahulwagh/web:1.0&lt;/code&gt; for GitHub, &lt;code&gt;&amp;lt;account&amp;gt;.dkr.ecr.&amp;lt;region&amp;gt;.amazonaws.com/web:1.0&lt;/code&gt; for AWS ECR, &lt;code&gt;host:5000/web:1.0&lt;/code&gt; for a private registry (no &lt;code&gt;https://&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Registries do not rename repositories.&lt;/strong&gt; Create the new one, push the tags under the new name, delete the old repository.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 on Ubuntu 24.04, captured on 2026-10-12.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/invalid-reference-format-error/"&gt;docker&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Have you ever found yourself needing to change the repository name or rename a &lt;a href="https://www.docker.com/"&gt;Docker image&lt;/a&gt;?&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Step-By-Step Guide to Setting Up SSH Keys for Jenkins</title><link>https://jhooq.com/jenkins-setup-ssh-keys/</link><pubDate>Wed, 07 Jun 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/jenkins-setup-ssh-keys/</guid><description>
&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.jenkins.io/"&gt;Jenkins&lt;/a&gt;&lt;/strong&gt;, the popular open-source automation server that's been making waves in the tech industry.&lt;/p&gt;
&lt;p&gt;Today, we'll go through an important aspect of &lt;a href="https://www.jenkins.io/"&gt;Jenkins&lt;/a&gt; - setting up Secure Shell (SSH) keys for securely publishing and transferring files. It may sound daunting, but trust me, I'll guide you every step of the way. Let's get started!&lt;/p&gt;
&lt;h2 id="step-1-creating-an-ssh-key-pair-on-your-jenkins-server"&gt;Step 1. Creating an SSH Key Pair on Your Jenkins Server&lt;/h2&gt;
&lt;p&gt;We're going to kick things off by &lt;a href="https://www.ssh.com/academy/ssh/keygen"&gt;generating a new &lt;strong&gt;SSH key pair&lt;/strong&gt;&lt;/a&gt; right on your &lt;strong&gt;Jenkins server&lt;/strong&gt;. These keys, &lt;strong&gt;one public&lt;/strong&gt; and &lt;strong&gt;one private&lt;/strong&gt;, are the secret handshake that lets your Jenkins server chat with other servers securely.&lt;/p&gt;</description></item><item><title>Add an SSH key permanently to ssh-agent on Linux, macOS and Windows - why ssh-add is forgotten after a reboot and the four fixes that stick (tested on OpenSSH 9.6 and 9.5)</title><link>https://jhooq.com/ssh-key-add-permanently/</link><pubDate>Fri, 26 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ssh-key-add-permanently/</guid><description>
&lt;!-- no-video: no companion video for ssh-agent persistence yet --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ssh-add&lt;/code&gt; is not permanent because the agent is not permanent.&lt;/strong&gt; The key lives in the memory of one &lt;code&gt;ssh-agent&lt;/code&gt; process; a new login, a reboot, or a terminal without &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt; set does not see it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Could not open a connection to your authentication agent&lt;/code&gt;&lt;/strong&gt; (Linux, macOS) and &lt;strong&gt;&lt;code&gt;Error connecting to agent: No such file or directory&lt;/code&gt;&lt;/strong&gt; (Windows) both mean no agent is reachable, not that the key is wrong.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux, simplest:&lt;/strong&gt; &lt;code&gt;AddKeysToAgent yes&lt;/code&gt; and &lt;code&gt;IdentityFile&lt;/code&gt; in &lt;code&gt;~/.ssh/config&lt;/code&gt;. The key is added to the agent the first time you use it, passphrase typed once per login session.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux, every terminal and every login:&lt;/strong&gt; &lt;code&gt;eval $(keychain --eval --quiet --agents ssh ~/.ssh/id_ed25519)&lt;/code&gt; in &lt;code&gt;~/.bashrc&lt;/code&gt;, or a systemd user service so one agent survives logout.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;macOS:&lt;/strong&gt; &lt;code&gt;UseKeychain yes&lt;/code&gt; in the config and &lt;code&gt;ssh-add --apple-use-keychain ~/.ssh/id_ed25519&lt;/code&gt;; the passphrase goes into the login keychain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows:&lt;/strong&gt; the &lt;code&gt;ssh-agent&lt;/code&gt; service is &lt;code&gt;Disabled&lt;/code&gt; by default; enable it once from an elevated PowerShell, then &lt;code&gt;ssh-add&lt;/code&gt; persists across reboots.&lt;/li&gt;
&lt;li&gt;Linux output below is from OpenSSH 9.6p1 on Ubuntu 24.04 (2026-10-16); Windows output is from OpenSSH for Windows 9.5p1 on my own laptop (2026-10-17).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/github-permission-denied-publickey/"&gt;git@github.com&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2023 version of this post listed the commands per operating system. The question people actually arrive with is &lt;em&gt;why&lt;/em&gt; the key they added yesterday is gone today, so this rewrite starts from that, reproduces the failures, and shows which fix survives what.&lt;/p&gt;</description></item><item><title>Terraform AWS IAM - How to Create IAM Users, Roles and Policies (with aws_iam_policy_document examples)</title><link>https://jhooq.com/terraform-manage-user-roles-policy/</link><pubDate>Tue, 09 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-manage-user-roles-policy/</guid><description>
&lt;p&gt;This blog post is going to be a comprehensive guide on &lt;em&gt;&lt;strong&gt;managing AWS IAM Users, IAM Roles and IAM Policies using Terraform&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Managing IAM Users, Roles and Policies is always crucial from a security perspective. Proper management of the IAM User, IAM Roles and IAM Policies can really reduce the operational burden as well as improve the security of your AWS environment. And once it is in Terraform, every permission change goes through a pull request where somebody can review it - which is exactly what an auditor wants to see.&lt;/p&gt;</description></item><item><title>How to split Your Terraform main.tf File into Multiple Files</title><link>https://jhooq.com/terraform-split-main-tf/</link><pubDate>Thu, 04 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-split-main-tf/</guid><description>
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-why-someone-need-to-split-the-terraform-maintf-into-multiple-files"&gt;Why someone need to split the terraform main.tf into multiple files?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-how-to-split-the-maintf-file-a-step-by-step-approach"&gt;How to split the main.tf file: A Step-by-Step Approach&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#21-identify-resources-and-data-sources"&gt;2.1 Identify Resources and Data Sources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#22-create-separate-tf-files-for-resources-and-data-sources"&gt;2.2 Create Separate .tf Files for Resources and Data Sources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#23-migrate-resource-and-data-source-blocks-into-individual-tf-files"&gt;2.3 Migrate Resource and Data Source Blocks into individual .tf files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#24-define-variables-and-outputs"&gt;2.4 Define Variables and Outputs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-run-terraform-init-terraform-validate-terraform-plan-and-terraform-apply-commands"&gt;Run terraform init, terraform validate, terraform plan and terraform apply commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-why-someone-need-to-split-the-terraform-maintf-into-multiple-files"&gt;1. Why someone need to split the terraform main.tf into multiple files?&lt;/h2&gt;
&lt;p&gt;There are several good reasons to split a &lt;a href="https://developer.hashicorp.com/terraform"&gt;Terraform&lt;/a&gt; main.tf file into different files. Some of the main reasons why you might want to break up a Terraform setup into smaller parts are:&lt;/p&gt;</description></item><item><title>Terraform Variable Within Variable: Why It Fails and the Three Patterns That Work (Terraform 1.17)</title><link>https://jhooq.com/terraform-var-within-var/</link><pubDate>Thu, 04 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-var-within-var/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Terraform variable cannot refer to another variable.&lt;/strong&gt; &lt;code&gt;default = &amp;quot;app-${var.env}&amp;quot;&lt;/code&gt; fails with &lt;code&gt;Error: Variables not allowed ... Variables may not be used here.&lt;/code&gt; The same error appears for a reference inside &lt;code&gt;terraform.tfvars&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix is to compute the combined value in a &lt;code&gt;locals&lt;/code&gt; block&lt;/strong&gt;: &lt;code&gt;full_name = &amp;quot;${var.name_prefix}-${var.env}&amp;quot;&lt;/code&gt;. A local can use any variable and any other local.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To pick a value of one variable based on another&lt;/strong&gt;, make the first one a map and index it: &lt;code&gt;lookup(var.instance_types, var.env, &amp;quot;t3.micro&amp;quot;)&lt;/code&gt;. The third argument is the fallback when the key is missing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Precedence when several sources set the same variable:&lt;/strong&gt; &lt;code&gt;-var&lt;/code&gt; beats &lt;code&gt;*.auto.tfvars&lt;/code&gt;, which beats &lt;code&gt;terraform.tfvars&lt;/code&gt;, which beats &lt;code&gt;TF_VAR_&lt;/code&gt; environment variables, which beat the &lt;code&gt;default&lt;/code&gt;. I verified this order with Terraform 1.17.1 on 2026-11-03.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you are seeing a different variable error, read &lt;a href="https://jhooq.com/value-for-undeclared-variable/"&gt;Value for undeclared variable&lt;/a&gt;; if you want to test expressions without applying, read &lt;a href="https://jhooq.com/terraform-console/"&gt;terraform console&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/oB7l8GOpVaY?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#quick-reference"&gt;Quick reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#lab-setup"&gt;Lab setup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-a-variable-cannot-use-a-variable"&gt;Why a variable cannot use a variable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pattern-1-locals"&gt;Pattern 1: locals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pattern-2-lookup-with-a-map-variable"&gt;Pattern 2: lookup with a map variable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#pattern-3-pass-a-local-to-a-module"&gt;Pattern 3: pass a local to a module&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#precedence-which-value-wins"&gt;Precedence: which value wins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#trade-offs-and-best-practices"&gt;Trade-offs and best practices&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="quick-reference"&gt;Quick reference&lt;/h2&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt="Where a variable can and cannot refer to another variable in Terraform"
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/var-within-var/variable-in-variable-patterns.svg"
/&gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Mastering the Terraform Lookup Function for Dynamic Keys</title><link>https://jhooq.com/terraform-lookup-function/</link><pubDate>Wed, 03 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-lookup-function/</guid><description>
&lt;h2 id="1-introduction"&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Infrastructure as code (IaC)&lt;/strong&gt;&lt;/em&gt; is a key part of gaining efficiency, scalability, and manageability in the rapidly changing tech world of today. Many DevOps teams now use &lt;a href="https://developer.hashicorp.com/terraform/"&gt;Terraform&lt;/a&gt;, which is a famous IaC tool.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;&lt;strong&gt;Terraform lookup function&lt;/strong&gt;&lt;/em&gt; for dynamic keys has become a powerful way to improve your IaC workflows. This is one of its many benefits. In this piece, we'll go over the Terraform &lt;a href="https://developer.hashicorp.com/terraform/language/functions/lookup"&gt;lookup function&lt;/a&gt; for dynamic keys and show you how to use it to its full potential.&lt;/p&gt;</description></item><item><title>How to Use SSH Keys with Ansible for Secure Server Management?</title><link>https://jhooq.com/ansible-ssh-keys-for-server-mgmt/</link><pubDate>Tue, 02 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-ssh-keys-for-server-mgmt/</guid><description>
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;There are a couple of ways in which you can &lt;a href="https://docs.ansible.com/projects/ansible/latest/inventory_guide/connection_details.html#setting-up-ssh-keys"&gt;securely connect to a remote server using Ansible&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using the SSH Keys (Public, Private)&lt;/li&gt;
&lt;li&gt;Using the remote server password&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both methods are widely used by DevOps practitioners, and both are secure. But still, if I would like to vote for &lt;em&gt;&lt;strong&gt;Using the SSH keys&lt;/strong&gt;&lt;/em&gt; for secure server management,&lt;/p&gt;
&lt;p&gt;In this blog post, we are going to take a look at:&lt;/p&gt;</description></item><item><title>Why YAML is so important in Ansible?</title><link>https://jhooq.com/ansible-yaml-is-so-important/</link><pubDate>Tue, 02 May 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-yaml-is-so-important/</guid><description>
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-how-do-i-setup-your-ssh-keys"&gt;What is YAML?&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#example-of-yaml"&gt;Example of YAML?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-how-to-use-ssh-keys-in-ansible-playbooks"&gt;Why Ansible needs YAML?&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#example-of-ansible-playbook-written-in-yaml"&gt;Example of Ansible Playbook written in YAML&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-securing-your-ssh-keys-in-ansible"&gt;What are rules for writing Ansible Playbook using YAMLs?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-troubleshooting-the-ssh-keys-issues"&gt;Advantages of YAML in Ansible&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-conclusion"&gt;YAML vs Other Data Serialization Formats&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/8AQsk0PI_r8?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="what-is-yaml"&gt;What is YAML?&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;YAML&lt;/strong&gt;&lt;/em&gt; is a recipe for &lt;em&gt;&lt;strong&gt;computers&lt;/strong&gt;&lt;/em&gt; that helps them understand &lt;em&gt;&lt;strong&gt;what information means&lt;/strong&gt;&lt;/em&gt;. It looks like a plan with items and steps, but it tells the computer what to do instead of making food.&lt;/p&gt;</description></item><item><title>Copy files to EC2 and S3 bucket using Terraform</title><link>https://jhooq.com/terraform-copy-file-ec2-s3/</link><pubDate>Fri, 28 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-copy-file-ec2-s3/</guid><description>
&lt;p&gt;This blog post will guide you on how to use &lt;a href="https://jhooq.com/terraform-provisioner/"&gt;Terraform-Provisioners&lt;/a&gt; to copy/upload files to EC2 as well as the S3 bucket.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-pre-requisites"&gt;Pre-requisites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-setup-aws-credentials-in-the-terraform-file"&gt;Setup AWS credentials in the Terraform file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-setup-an-ec2-instance-a-security-group-and-ssh-key-pair-resources"&gt;Setup an EC2 instance, a security group, and SSH key pair resources.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-use-file-provisioner-to-upload-the-file-to-ec2"&gt;Use file provisioner to upload the file to EC2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-upload-files-to-the-s3-bucket-using-terraform"&gt;Upload files to the S3 bucket using Terraform.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-initialize-and-apply-the-terraform-configuration"&gt;Initialize and Apply the Terraform configuration.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let's take a look at the prerequisites:&lt;/p&gt;</description></item><item><title>Troubleshooting Error creating EC2 Subnet InvalidSubnet Range The CIDR is Invalid</title><link>https://jhooq.com/terraform-invalid-subnet/</link><pubDate>Thu, 27 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-invalid-subnet/</guid><description>
&lt;p&gt;In this blog post we will take a look on how to fix the issue of &lt;em&gt;&lt;strong&gt;Error: Creating EC2 Subnet: InvalidSubnet.Range: The &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/subnet-cidr-reservation.html"&gt;CIDR&lt;/a&gt; '100.1.1.0/24' is Invalid&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/terraaform-subnet-error/terraform-subnet-error.webp"
title="Error: creating EC2 Subnet: InvalidSubnet.Range: The CIDR &amp;#39;100.1.1.0/24&amp;#39; is invalid"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Error: creating EC2 Subnet: InvalidSubnet.Range: The CIDR '100.1.1.0/24' is invalid&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-introduction-to-error"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-understanding-the-error"&gt;Understanding the Error&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#21-invalidsubnetrange-error"&gt;InvalidSubnet.Range Error&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#22-cidr-notation"&gt;CIDR Notation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-prerequisites-for-troubleshooting"&gt;Prerequisites for Troubleshooting&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#31-aws-account"&gt;AWS Account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#32-aws-cli"&gt;AWS CLI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-troubleshooting-the-error"&gt;Troubleshooting the Error&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#41-identifying-the-incorrect-cidr-block"&gt;Identifying the Incorrect CIDR Block&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#42-correcting-the-cidr-block"&gt;Correcting the CIDR Block&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#43-re-creating-the-ec2-subnet"&gt;Re-creating the EC2 Subnet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-best-practices-for-subnet-configuration"&gt;Best Practices for Subnet Configuration&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#51-planning-ip-addressing"&gt;Planning IP Addressing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#52-private-vs-public-subnets"&gt;Private vs. Public Subnets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#53-subnet-size"&gt;Subnet Size&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-faqs"&gt;FAQs&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-introduction-to-error"&gt;1. Introduction to error&lt;/h2&gt;
&lt;p&gt;While working on &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-subnets.html"&gt;AWS with VPC and Subnet&lt;/a&gt;, it is very often that you might run into the issues where you stuck with the error - &lt;em&gt;&lt;strong&gt;Error: Creating EC2 Subnet: InvalidSubnet.Range: The CIDR '100.1.1.0/24' is Invalid&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Troubleshooting InvalidParameter Security group and subnet belong to different networks</title><link>https://jhooq.com/terraform-security-group-with-different-subnet/</link><pubDate>Thu, 27 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-security-group-with-different-subnet/</guid><description>
&lt;p&gt;I got stuck with the error &lt;em&gt;&lt;strong&gt;InvalidParameter: Security group sg-08e153383fca86934 and subnet subnet-00e3adcfceb3cf8ee belong to different networks&lt;/strong&gt;&lt;/em&gt; when I was working on one of AWS project where I need to set-up following using &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"&gt;VPC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-subnets.html"&gt;Subnet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Internet Gate, NAT&lt;/li&gt;
&lt;li&gt;Route Table&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/terraform-ec2-instance-setup/"&gt;EC2 Instance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Security group&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Here is the screenshot of the error which I got -&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/terraaform-subnet-error/sg-with-different-vpc.webp"
title="InvalidParameter: Security group sg-08e153383fca86934 and subnet subnet-00e3adcfceb3cf8ee belong to different networks"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;InvalidParameter: Security group sg-08e153383fca86934 and subnet subnet-00e3adcfceb3cf8ee belong to different networks&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to set-up Cron Jobs in Docker Containers?</title><link>https://jhooq.com/docker-run-cron-job-inside-container/</link><pubDate>Wed, 26 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-run-cron-job-inside-container/</guid><description>
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Cron jobs&lt;/strong&gt;&lt;/em&gt; are undoubtedly among the easiest and most often used methods for task scheduling. It is easy to see why every Linux user is familiar with &lt;em&gt;&lt;strong&gt;cron jobs&lt;/strong&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;they are highly helpful&lt;/li&gt;
&lt;li&gt;Simple to set up&lt;/li&gt;
&lt;li&gt;Need very little maintenance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We will go through using Cron Jobs in Docker containers in this tutorial.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#why-use-cron-jobs-in-a-docker-container"&gt;Why Use Cron Jobs In A Docker Container?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#how-do-you-set-up-and-run-a-cron-job-in-a-docker-container"&gt;How Do You Set-up and Run A Cron Job In A Docker Container?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#benefits-of-using-cron-jobs-in-docker-containers"&gt;Benefits of using Cron Jobs in Docker Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#how-to-troubleshoot-cron-jobs-in-docker-containers"&gt;How to Troubleshoot Cron Jobs in Docker Containers?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#best-practices-for-running-cron-jobs-in-docker-containers"&gt;Best Practices for Running Cron Jobs in Docker Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="why-use-cron-jobs-in-a-docker-container"&gt;Why Use Cron Jobs In A Docker Container?&lt;/h2&gt;
&lt;p&gt;In &lt;em&gt;&lt;strong&gt;Docker containers&lt;/strong&gt;&lt;/em&gt;, cron jobs are often used to automate recurring processes like -&lt;/p&gt;</description></item><item><title>Docker Copy File from Host to Container - docker cp, Bind Mounts, Docker Compose and Dockerfile COPY (Complete Guide)</title><link>https://jhooq.com/docker-copy-file-localhost-to-container/</link><pubDate>Tue, 25 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-copy-file-localhost-to-container/</guid><description>
&lt;p&gt;When working with &lt;a href="https://www.docker.com/"&gt;Docker containers&lt;/a&gt;, one of the most common tasks is to copy a file from the local host into a container - a config file you want to try, a certificate, a script, a database dump. And almost as often, the other way round - a log file or a generated report out of the container onto your laptop.&lt;/p&gt;
&lt;p&gt;In this post we will go through &lt;em&gt;&lt;strong&gt;four different ways of copying files from a local host into a Docker container&lt;/strong&gt;&lt;/em&gt;, when to use which one, and the errors you are going to run into. I have used all four in real projects, and the right answer depends on one question - &lt;em&gt;do you want the file in this one container right now, or do you want it in the image so that every container has it?&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Docker Compose command with multiple commands and multiple lines - sh -c, the list form, $$ and depends_on (tested on Compose v2.38)</title><link>https://jhooq.com/docker-compose-execute-multiple-commands/</link><pubDate>Mon, 24 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-compose-execute-multiple-commands/</guid><description>
&lt;!-- no-video: no companion video for Compose commands yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Wrap the commands in a shell:&lt;/strong&gt; &lt;code&gt;command: sh -c &amp;quot;echo one &amp;amp;&amp;amp; echo two&amp;quot;&lt;/code&gt;. Compose does not run a shell for you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Without &lt;code&gt;sh -c&lt;/code&gt;, Compose silently drops everything after &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;;&lt;/code&gt; or &lt;code&gt;|&lt;/code&gt;.&lt;/strong&gt; &lt;code&gt;command: echo one &amp;amp;&amp;amp; echo two&lt;/code&gt; printed only &lt;code&gt;one&lt;/code&gt;, and &lt;code&gt;docker compose config&lt;/code&gt; shows the parsed command as &lt;code&gt;[echo, one]&lt;/code&gt;. No warning, exit code 0.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;For many lines, use the list form with a block:&lt;/strong&gt; &lt;code&gt;command: [&amp;quot;sh&amp;quot;, &amp;quot;-c&amp;quot;, ...]&lt;/code&gt; written as a YAML list ending in &lt;code&gt;- |&lt;/code&gt;, one command per line, starting with &lt;code&gt;set -e&lt;/code&gt; so the first failure stops the rest.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Write &lt;code&gt;$$VAR&lt;/code&gt; inside the command&lt;/strong&gt; for variables the container should expand. A single &lt;code&gt;$VAR&lt;/code&gt; is replaced by Compose from &lt;strong&gt;your&lt;/strong&gt; shell before the container starts - mine printed &lt;code&gt;[]&lt;/code&gt; and a warning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A one-shot setup step belongs in its own service&lt;/strong&gt; with &lt;code&gt;depends_on: condition: service_completed_successfully&lt;/code&gt;. In my runs that made &lt;code&gt;docker compose up -d&lt;/code&gt; wait about 2.5 to 3 seconds for a 2 second migration, against about 440 ms without the wait.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 and Docker Compose v2.38.2 on Ubuntu 24.04, captured on 2026-10-14.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-compose-multiple-commands/compose-command-forms.svg"
title="What Docker Compose runs for each form of the command key"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;What Docker Compose runs for each form of the command key&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Ansible git clone - clone public and private repositories with the git module (key_file, accept_hostkey, version, depth, force, update), tested on ansible-core 2.21</title><link>https://jhooq.com/ansible-git-clone-repository/</link><pubDate>Fri, 21 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-git-clone-repository/</guid><description>
&lt;!-- no-video: no companion video for the git module yet; the Ansible series is in the Ansible playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Public repository:&lt;/strong&gt; &lt;code&gt;ansible.builtin.git&lt;/code&gt; with &lt;code&gt;repo&lt;/code&gt;, &lt;code&gt;dest&lt;/code&gt; and &lt;code&gt;version&lt;/code&gt;. The first run reports &lt;code&gt;changed=true&lt;/code&gt; and the commit it checked out; the second run reports &lt;code&gt;changed=false&lt;/code&gt; because the module compares the commit before and after.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Private repository over SSH:&lt;/strong&gt; add &lt;code&gt;key_file&lt;/code&gt; pointing at a deploy key on the target and &lt;code&gt;accept_hostkey: true&lt;/code&gt;. Leave out &lt;code&gt;accept_hostkey&lt;/code&gt; and the task fails with &lt;code&gt;Host key verification failed&lt;/code&gt;; use the wrong key and it fails with &lt;code&gt;Permission denied (publickey,password)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;version&lt;/code&gt; takes a branch, a tag or a commit.&lt;/strong&gt; Switching the same task from &lt;code&gt;v1.0&lt;/code&gt; to &lt;code&gt;release-1&lt;/code&gt; moved the checkout and reported the new commit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;depth: 1&lt;/code&gt; is worth it:&lt;/strong&gt; 3,336 ms and 1.4 MB in &lt;code&gt;.git&lt;/code&gt; against 4,362 ms and 1.7 MB for the full history of the same small repository, about 24% faster.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local edits on the server stop the module&lt;/strong&gt; (&lt;code&gt;Local modifications exist in the destination ... (force=no)&lt;/code&gt;); &lt;code&gt;force: true&lt;/code&gt; resets them, &lt;code&gt;update: false&lt;/code&gt; leaves an existing checkout alone for ever.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The shell module is not a substitute:&lt;/strong&gt; &lt;code&gt;git clone&lt;/code&gt; in &lt;code&gt;shell&lt;/code&gt; works once and fails every run after that because the directory exists.&lt;/li&gt;
&lt;li&gt;Every output below is from ansible-core 2.21.5 with git 2.55 on Ubuntu 24.04, cloning from GitHub and from a private bare repository over SSH on 2026-10-16.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/github-permission-denied-publickey/"&gt;git@github.com&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/ansible/ansible-git-repo-clone/ansible-git-module-flow.svg"
title="What the Ansible git module needs for a public and a private repository, and what the second run does"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;What the Ansible git module needs for a public and a private repository, and what the second run does&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>ansible --limit - Run a Playbook on One Host, a Group or a Pattern (Exclude with !, Intersect with &amp;, Wildcards, Ranges, @retry File) with Real Output from ansible-core 2.21</title><link>https://jhooq.com/ansible-limit-hosts/</link><pubDate>Mon, 17 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-limit-hosts/</guid><description>
&lt;!-- no-video: no companion video for --limit yet; the Ansible playlist covers inventories and playbooks --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--limit&lt;/code&gt; (or &lt;code&gt;-l&lt;/code&gt;) is an intersection:&lt;/strong&gt; the play runs on the hosts matched by its &lt;code&gt;hosts:&lt;/code&gt; line &lt;strong&gt;and&lt;/strong&gt; by your pattern. It can shrink the host list, never grow it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The patterns:&lt;/strong&gt; &lt;code&gt;web1&lt;/code&gt; (one host), &lt;code&gt;db&lt;/code&gt; (a group), &lt;code&gt;web1,db2&lt;/code&gt; (a list), &lt;code&gt;'web*'&lt;/code&gt; (wildcard), &lt;code&gt;'all:!db'&lt;/code&gt; (exclude), &lt;code&gt;'prod:&amp;amp;web'&lt;/code&gt; (intersect), &lt;code&gt;'web[0:1]'&lt;/code&gt; (position in the group), &lt;code&gt;'~web-0[1-3]'&lt;/code&gt; (regex), &lt;code&gt;@site.retry&lt;/code&gt; (hosts from a file). Quote anything with &lt;code&gt;!&lt;/code&gt;, &lt;code&gt;&amp;amp;&lt;/code&gt; or &lt;code&gt;*&lt;/code&gt;, or the shell eats it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Preview first:&lt;/strong&gt; add &lt;code&gt;--list-hosts&lt;/code&gt; and Ansible prints the matched hosts without running a task. &lt;code&gt;--limit 'web[0:1]' --list-hosts&lt;/code&gt; printed &lt;code&gt;hosts (2): web1 web2&lt;/code&gt; on my inventory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When nothing matches&lt;/strong&gt; (a typo, a DNS name instead of the inventory name) ansible-core 2.21 prints &lt;code&gt;[WARNING]: Could not match supplied host pattern, ignoring: nosuchhost&lt;/code&gt; and then &lt;code&gt;[ERROR]: Specified inventory, host pattern and/or --limit leaves us with no hosts to target.&lt;/code&gt; and exits with code 1.&lt;/li&gt;
&lt;li&gt;Every PLAY RECAP below is real output from ansible-core 2.21.4 on 2026-10-12, against a 6-host inventory (&lt;code&gt;web1..3&lt;/code&gt;, &lt;code&gt;db1..2&lt;/code&gt;, &lt;code&gt;stage1&lt;/code&gt;, all &lt;code&gt;ansible_connection=local&lt;/code&gt; so the runs are fast and harmless).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/ansible-roles-inventory-hosts-tasks/"&gt;Demystifying Hosts, Inventory Roles, and Tasks&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Infrastructure as code management is possible with the help of the robust automation tool &lt;a href="https://docs.ansible.com/"&gt;Ansible&lt;/a&gt;. Using playbooks, which are YAML files that provide a series of tasks to apply to a group of machines, you can build and automate complicated IT operations.&lt;/p&gt;</description></item><item><title>Easy Fix for 'zsh command not found ansible' Error After Installing Ansible with Pip</title><link>https://jhooq.com/ansible-zsh-command-not-found/</link><pubDate>Sun, 16 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-zsh-command-not-found/</guid><description>
&lt;p&gt;It's conceivable that the directory where &lt;em&gt;&lt;strong&gt;pip installed Ansible is not in your system's PATH environment variable&lt;/strong&gt;&lt;/em&gt; if you used pip to install Ansible and are getting the error message -&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;zsh: &lt;span class="nb"&gt;command&lt;/span&gt; not found: ansible.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There are a few options for fixing this issue depending on your local &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; configuration. So please go over both alternatives and choose the one that makes the most sense.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#solution-1-adding-ansible-installation-path-to-system-path-variable"&gt;Solution 1: Adding Ansible installation path to system $PATH variable &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#solution-2-use-full-path-to-the-ansible-binary-not-recommended"&gt;Solution 2: Use full path to the Ansible Binary (Not recommended)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#solution-3-create-an-alias-for-the-ansible-command"&gt;Solution 3: Create an alias for the Ansible command&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#solution-4-install-ansible-using-a-package-manager"&gt;Solution 4: Install Ansible using a package manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#solution-5-check-if-pip-installed-ansible-in-a-user-specific-location"&gt;Solution 5: Check if pip installed Ansible in a user-specific location&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="solution-1-adding-ansible-installation-path-to-system-path-variable"&gt;Solution 1: Adding Ansible installation path to system $PATH variable&lt;/h2&gt;
&lt;p&gt;This problem may be resolved by setting the PATH environment variable on your system to include the location where Ansible is installed. Follow these steps to accomplish this:&lt;/p&gt;</description></item><item><title>Demystifying Hosts, Inventory Roles, and Tasks</title><link>https://jhooq.com/ansible-roles-inventory-hosts-tasks/</link><pubDate>Sat, 15 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-roles-inventory-hosts-tasks/</guid><description>
&lt;p&gt;Are you interested in finding out how to automate your IT infrastructure and manage your servers with &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;You've come to the proper location if so! We'll go in-depth on the in this blog article and demonstrate how to use the following -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Inventory file&lt;/strong&gt; - &lt;a href="#1-what-are-hosts-or-inventory-files"&gt;What are Hosts or Inventory Files?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tasks&lt;/strong&gt; - &lt;a href="#2-how-to-define-roles-in-ansible-playbook"&gt;How to define Roles in Ansible Playbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Main playbook&lt;/strong&gt; - &lt;a href="#3-how-to-write-your-ansible-playbook"&gt;How to write your ansible playbook?&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ansible is an open-source automation tool that supports server, app, and network device management. It can simultaneously run the tasks you specify on one or more servers and utilizes a simple language called &lt;em&gt;&lt;strong&gt;YAML&lt;/strong&gt;&lt;/em&gt; to do it.&lt;/p&gt;</description></item><item><title>Unable to start service apache2: Job for apache2.service failed because the control process exited with error code - the three real causes and the Ansible playbook that shows you which one (reproduced on Ubuntu 24.04)</title><link>https://jhooq.com/ansible-apache-failed-to-start/</link><pubDate>Fri, 14 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-apache-failed-to-start/</guid><description>
&lt;!-- no-video: no companion video for this error yet; the Ansible full course covers the service module --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The message is a relay, not a reason.&lt;/strong&gt; Ansible's &lt;code&gt;service&lt;/code&gt; module ran &lt;code&gt;systemctl start apache2&lt;/code&gt;, systemd ran &lt;code&gt;apachectl start&lt;/code&gt;, apachectl exited non-zero. The reason is in &lt;code&gt;journalctl -u apache2 -n 20&lt;/code&gt; on the target.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Three causes cover almost every case:&lt;/strong&gt; something else on port 80 (&lt;code&gt;AH00072: make_sock: could not bind to address 0.0.0.0:80&lt;/code&gt;), a syntax error in a config file (&lt;code&gt;AH00526: Syntax error on line 1 of ...: Invalid command 'Lisen'&lt;/code&gt;), and a directive from a module that is not enabled (&lt;code&gt;Invalid command 'SSLEngine'&lt;/code&gt;, fix with &lt;code&gt;a2enmod ssl&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;apache2ctl configtest&lt;/code&gt; finds the second and third in 18 ms&lt;/strong&gt; without touching the running service. Run it as a task before &lt;code&gt;service: state=started&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The playbook pattern:&lt;/strong&gt; a &lt;code&gt;block&lt;/code&gt; with configtest then &lt;code&gt;service&lt;/code&gt;, and a &lt;code&gt;rescue&lt;/code&gt; that prints the last 15 journal lines, so the failure message tells you what happened instead of sending you to the server.&lt;/li&gt;
&lt;li&gt;Every output below is real, from ansible-core 2.21.5 against an Ubuntu 24.04 container with Apache 2.4.58 on 2026-10-16.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/ansible-handlers/"&gt;Ansible Handlers Explained&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2023 version of this post listed things to check. This time I broke Apache three ways on purpose, ran the same playbook against each, and kept the output, so you can match your journal lines to one of the three.&lt;/p&gt;</description></item><item><title>Why Ansible is the Ultimate Tool for DevOps Teams - A Beginner's Guide?</title><link>https://jhooq.com/why-ansible-is-ultimate-tool-for-devops/</link><pubDate>Mon, 03 Apr 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/why-ansible-is-ultimate-tool-for-devops/</guid><description>
&lt;p&gt;DevOps practices have grown in popularity as businesses try to produce software more quickly and effectively. &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; is one of the tools that DevOps teams need to help automate and streamline their processes. &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; is an open-source automation tool that makes it simple for users to automate their network devices, applications, and infrastructure.&lt;/p&gt;
&lt;p&gt;It is a popular option for DevOps teams all over the world thanks to its agentless design, straightforward syntax, and powerful features. In this blog article, we'll look at why &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; is the best tool for DevOps teams and how it can make infrastructure management and automation simpler.&lt;/p&gt;</description></item><item><title>Terraform concat strings, multiline strings and every string function - tested in terraform console (v1.16)</title><link>https://jhooq.com/terraform-string-handling/</link><pubDate>Sun, 22 Jan 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-string-handling/</guid><description>
&lt;!-- no-video: no companion video for the string functions yet; the Terraform series is in the Terraform playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;To concatenate strings, use interpolation&lt;/strong&gt; - &lt;code&gt;&amp;quot;${var.app}-${var.env}&amp;quot;&lt;/code&gt; gave &lt;code&gt;&amp;quot;Payments-API-prod&amp;quot;&lt;/code&gt;. Use &lt;code&gt;format()&lt;/code&gt; for a fixed pattern or padding, and &lt;code&gt;join(&amp;quot;,&amp;quot;, list)&lt;/code&gt; for a list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;concat()&lt;/code&gt; does not join strings.&lt;/strong&gt; It merges &lt;strong&gt;lists&lt;/strong&gt;; &lt;code&gt;concat(&amp;quot;payments&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;prod&amp;quot;)&lt;/code&gt; fails with &lt;code&gt;all arguments must be lists or tuples; got string&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiline strings are heredocs.&lt;/strong&gt; &lt;code&gt;&amp;lt;&amp;lt;EOT&lt;/code&gt; keeps every leading space, &lt;code&gt;&amp;lt;&amp;lt;-EOT&lt;/code&gt; strips the common indentation. Strip the trailing newline with &lt;code&gt;chomp()&lt;/code&gt; when it matters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regex patterns need double backslashes in HCL:&lt;/strong&gt; &lt;code&gt;&amp;quot;\\d{12}&amp;quot;&lt;/code&gt;. A single &lt;code&gt;&amp;quot;\d&amp;quot;&lt;/code&gt; fails with &lt;code&gt;Invalid escape sequence&lt;/code&gt;. Wrap &lt;code&gt;regex()&lt;/code&gt; in &lt;code&gt;can()&lt;/code&gt; when &amp;quot;no match&amp;quot; is a normal case, because &lt;code&gt;regex()&lt;/code&gt; raises an error instead of returning nothing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;For lines built in a loop, &lt;code&gt;join(&amp;quot;\n&amp;quot;, [for ...])&lt;/code&gt; beats a &lt;code&gt;%{ for }&lt;/code&gt; directive&lt;/strong&gt; - in my run the directive either kept 4 spaces of indentation or added blank lines.&lt;/li&gt;
&lt;li&gt;Every result below is real output from &lt;code&gt;terraform console&lt;/code&gt; and &lt;code&gt;terraform apply&lt;/code&gt; on Terraform v1.16.2, captured on 2026-10-14. No provider or cloud account is needed to try any of it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/terraform-template/"&gt;Terraform Templates Explained&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/terraform-string-handling/terraform-join-strings-map.svg"
title="Which Terraform function joins strings - interpolation, format, join, formatlist - and why concat fails"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Which Terraform function joins strings - interpolation, format, join, formatlist - and why concat fails&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to use terraform depends_on meta argument?</title><link>https://jhooq.com/terraform-depends-on/</link><pubDate>Fri, 13 Jan 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-depends-on/</guid><description>
&lt;p&gt;The &lt;a href="https://developer.hashicorp.com/terraform/language/meta-arguments/depends_on"&gt;&amp;quot;depends_on&amp;quot;&lt;/a&gt; meta argument in &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; is used to specify dependencies between resources within a Terraform configuration.&lt;/p&gt;
&lt;p&gt;This allows Terraform to properly order the creation, modification, and destruction of resources, ensuring that dependent resources are created or modified only after the resources they depend on have been created or modified.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For example -&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let's say you have a Terraform configuration that creates an &lt;strong&gt;Amazon S3 bucket&lt;/strong&gt; and an &lt;strong&gt;&lt;a href="https://jhooq.com/terraform-ec2-instance-setup"&gt;Amazon EC2 Instance&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Amazon EC2 Instance&lt;/strong&gt; depends on the &lt;strong&gt;Amazon S3 bucket&lt;/strong&gt;, so it needs to be created the bucket before creating the EC2 instance. To specify this dependency, you would use the &amp;quot;depends_on&amp;quot; argument in the object resource block of &lt;strong&gt;EC2 Instance&lt;/strong&gt;, like this:&lt;/p&gt;</description></item><item><title>fatal: destination path already exists and is not an empty directory - Ansible git module, 4 Fixes (and Proof That force=yes Is Not One of Them)</title><link>https://jhooq.com/ansible-destination-path-already-exist/</link><pubDate>Thu, 12 Jan 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-destination-path-already-exist/</guid><description>
&lt;!-- no-video: no companion video for this error yet; the Ansible playlist covers the git module and roles --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The message is git's, not Ansible's.&lt;/strong&gt; &lt;code&gt;ansible.builtin.git&lt;/code&gt; runs &lt;code&gt;git clone&lt;/code&gt; on the remote host, and git refuses to clone into a directory that already has files. The module reports it as &lt;code&gt;FAILED! =&amp;gt; {&amp;quot;cmd&amp;quot;: &amp;quot;/usr/bin/git clone --origin origin &amp;lt;repo&amp;gt; &amp;lt;dest&amp;gt;&amp;quot;, &amp;quot;msg&amp;quot;: &amp;quot;fatal: destination path '&amp;lt;dest&amp;gt;' already exists and is not an empty directory.&amp;quot;, &amp;quot;rc&amp;quot;: 128}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;force: yes&lt;/code&gt; does not fix it.&lt;/strong&gt; I ran the same task with &lt;code&gt;force=yes&lt;/code&gt; on ansible-core 2.21.4 and got the identical error. &lt;code&gt;force&lt;/code&gt; only applies when &lt;code&gt;dest&lt;/code&gt; is already a git repository with local changes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fixes:&lt;/strong&gt; remove the directory with the &lt;code&gt;file&lt;/code&gt; module and clone (first run &lt;code&gt;changed=2&lt;/code&gt;, second run &lt;code&gt;ok=1 changed=0&lt;/code&gt;), clone into a fresh &lt;code&gt;dest&lt;/code&gt; or a subdirectory (&lt;code&gt;dest: /tmp/app/src&lt;/code&gt; worked around the leftover file), or &lt;code&gt;stat&lt;/code&gt; for &lt;code&gt;dest/.git&lt;/code&gt; and clean up only when the directory is not a repository.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A second run on a real clone is fine:&lt;/strong&gt; the module fetches and reports &lt;code&gt;ok&lt;/code&gt;, not an error. The error only means &amp;quot;files, but not a clone of this repo&amp;quot;.&lt;/li&gt;
&lt;li&gt;Use an absolute &lt;code&gt;dest&lt;/code&gt;; a relative one resolves against the remote user's home directory.&lt;/li&gt;
&lt;li&gt;Every output below is from ansible-core 2.21.4 on Ubuntu 24.04, captured on 2026-10-12.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/ansible-ssh-keys-for-server-mgmt/"&gt;How to Use SSH Keys with Ansible for Secure Server Management?&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I got this error when I was trying to do a &lt;code&gt;git clone&lt;/code&gt; on a remote machine using &lt;a href="https://docs.ansible.com/projects/ansible/latest/index.html"&gt;Ansible&lt;/a&gt;, and the error message was &lt;em&gt;&lt;strong&gt;destination path already exists and is not an empty directory&lt;/strong&gt;&lt;/em&gt; -&lt;/p&gt;</description></item><item><title>Terraform user_data on AWS EC2 - inline script, file(), templatefile(), the 16 KB limit, first-boot-only, and why a change recreates the instance (AWS provider 6.69)</title><link>https://jhooq.com/terraform-user-data/</link><pubDate>Mon, 02 Jan 2023 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-user-data/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;user_data&lt;/code&gt; is a string that EC2 passes to cloud-init on the instance's first boot.&lt;/strong&gt; Start it with &lt;code&gt;#!/bin/bash&lt;/code&gt; for a shell script or &lt;code&gt;#cloud-config&lt;/code&gt; for cloud-init YAML; without a recognised first line nothing runs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Three ways to write it:&lt;/strong&gt; inline with &lt;code&gt;&amp;lt;&amp;lt;-EOT ... EOT&lt;/code&gt;, &lt;code&gt;file(&amp;quot;${path.module}/setup.sh&amp;quot;)&lt;/code&gt; for a script you keep next to the code, &lt;code&gt;templatefile(&amp;quot;setup.sh.tftpl&amp;quot;, { port = var.app_port })&lt;/code&gt; when the script needs variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limits:&lt;/strong&gt; 16 KB of raw script before base64 (EC2 encodes it, adding about 33%); runs only on the first boot, not after a reboot; output lands in &lt;code&gt;/var/log/cloud-init-output.log&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Changing it is not free:&lt;/strong&gt; by default the AWS provider stops and starts the instance (new public IP unless you have an Elastic IP); with &lt;code&gt;user_data_replace_on_change = true&lt;/code&gt; it destroys and recreates it.&lt;/li&gt;
&lt;li&gt;Plans below are from Terraform 1.16.2 with AWS provider 6.69.1 on 2026-10-17; a plan with mock credentials takes 7210 ms and shows the rendered script exactly as the instance will receive it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/terraform-copy-file-ec2-s3/"&gt;Copy files to EC2 and S3 bucket using Terraform&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/aLrperAAV2M?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;The 2023 version of this post walked through the video. The questions that bring people here now are specific: &amp;quot;my user_data did not run&amp;quot;, &amp;quot;how do I pass a variable into it&amp;quot;, &amp;quot;why did Terraform recreate my instance&amp;quot;. Those have precise answers, so for this rewrite I put all three forms in one configuration and read the plan, which prints the script byte for byte.&lt;/p&gt;</description></item><item><title>Why you should not store terraform state file(.tfstate) inside Git Repository?</title><link>https://jhooq.com/terraform-do-not-store-tfstate-in-git/</link><pubDate>Tue, 27 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-do-not-store-tfstate-in-git/</guid><description>
&lt;p&gt;It is generally not recommended to commit &lt;code&gt;.tfstate&lt;/code&gt; files to Git or any other version control system. &lt;code&gt;.tfstate&lt;/code&gt; files contain sensitive information about the infrastructure managed by Terraform, including the current state of resources and the configurations used to create them. If these files are committed to version control and made publicly available, they could potentially be accessed by unauthorized users, posing a security risk.&lt;/p&gt;
&lt;p&gt;Instead of committing &lt;code&gt;.tfstate&lt;/code&gt; files to version control, it is recommended to store them remotely using a &lt;a href="https://developer.hashicorp.com/terraform/language/settings/backends/remote"&gt;backend&lt;/a&gt; such as &lt;a href="https://aws.amazon.com/s3/"&gt;S3&lt;/a&gt;, &lt;a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-introduction"&gt;Azure Storage&lt;/a&gt;, or &lt;a href="https://cloud.google.com/storage"&gt;Google Cloud Storage&lt;/a&gt;. This allows you to version and track changes to your infrastructure configurations without exposing sensitive information. You can then use tools such as &lt;code&gt;terraform init&lt;/code&gt; and &lt;code&gt;terraform workspace&lt;/code&gt; to &lt;a href="https://jhooq.com/terraform-manage-state"&gt;manage the state of your infrastructure&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to import existing resource using terraform import comand?</title><link>https://jhooq.com/terraform-import-resource/</link><pubDate>Fri, 23 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-import-resource/</guid><description>
&lt;p&gt;To import an existing infrastructure resource into Terraform, you can use the &lt;code&gt;terraform import&lt;/code&gt; command. This command allows you to take an existing resource that was created outside of Terraform and bring it under Terraform management.&lt;/p&gt;
&lt;p&gt;In this blog, we will take &lt;strong&gt;two examples&lt;/strong&gt; -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#how-to-import-ec2-instance-using-terraform-import"&gt;How to import &lt;em&gt;&lt;strong&gt;EC2 Instance&lt;/strong&gt;&lt;/em&gt;?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#how-to-import-s3-bucket-using-terraform-import"&gt;How to import &lt;em&gt;&lt;strong&gt;S3 Bucket&lt;/strong&gt;&lt;/em&gt;?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#how-to-import-the-module"&gt;How to import &lt;em&gt;&lt;strong&gt;module&lt;/strong&gt;&lt;/em&gt;?&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Also, we are going to take a look on the -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#in-which-situation-you-should-use-terraform-import"&gt;In which situation you should use terraform import?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#drawbacks-of-terraform-import"&gt;Drawbacks of Terraform import?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#always-use-terraform-output-during-the-terraform-import"&gt;Always use terraform output during the terraform import&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But before that here's the basic syntax for the &lt;a href="https://developer.hashicorp.com/terraform/cli/import"&gt;terraform import&lt;/a&gt; command:&lt;/p&gt;</description></item><item><title>Terraform - A detailed guide on setting up ALB(Application Load Balancer) and SSL?</title><link>https://jhooq.com/terraform-guide-alb-ssl/</link><pubDate>Tue, 20 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-guide-alb-ssl/</guid><description>
&lt;h2 id="why-do-we-need-an-ssl-certificate-for-an-application-load-balancer-alb-in-aws"&gt;Why do we need an SSL Certificate for an Application Load Balancer (ALB) in AWS?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.digicert.com/what-is-an-ssl-certificate"&gt;SSL certificates&lt;/a&gt; are used to establish secure connections between clients and servers over the internet. They are particularly important for protecting sensitive information, such as login credentials or financial data, when it is transmitted between the client and the server.&lt;/p&gt;
&lt;p&gt;In the context of an &lt;a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html"&gt;Application Load Balancer (ALB) in AWS&lt;/a&gt;, SSL certificates are used to terminate SSL connections to the ALB. This means that the ALB decrypts incoming SSL connections from clients, and then sends the decrypted traffic to the target group. By terminating SSL connections at the ALB, you can offload the SSL processing from the targets, which can improve the performance and scalability of your application.&lt;/p&gt;</description></item><item><title>How to release(delete) Elastic IP from AWS?</title><link>https://jhooq.com/aws-release-elastic-ip/</link><pubDate>Thu, 15 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-release-elastic-ip/</guid><description>
&lt;p&gt;I thought of writing this blog because I have a personal AWS account which I generally use for learning purposes but a couple of months ago assigned the Elastic IP address to one of my experimental EC2 accounts and forgot about deleting the EC2 instance as well as &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-eips-releasing"&gt;releasing(deleting) Elastic IP address&lt;/a&gt;for about a month.&lt;/p&gt;
&lt;p&gt;Although I have used &lt;em&gt;&lt;strong&gt;t2.micro&lt;/strong&gt;&lt;/em&gt; &lt;a href="https://docs.aws.amazon.com/ec2/index.html"&gt;EC2 instance&lt;/a&gt; but still, I have to pay for the price of Elastic IP which I was using along with other resources. Here is the cost graph which was constant for the month of November &lt;em&gt;(purple line)&lt;/em&gt; -&lt;/p&gt;</description></item><item><title>Testing Infrastructure as Code with Terraform?</title><link>https://jhooq.com/terraform-testing-infra-as-code/</link><pubDate>Tue, 13 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-testing-infra-as-code/</guid><description>
&lt;p&gt;&lt;a href="https://www.terraform.io/"&gt;Testing infrastructure as code (IaC)&lt;/a&gt; involves verifying the functionality and behavior of the code used to manage and provision infrastructure in a cloud environment. IaC allows organizations to automate the provisioning and management of their infrastructure, which can improve efficiency, reduce errors, and enable faster deployment of applications and services.&lt;/p&gt;
&lt;p&gt;Testing IaC involves using a combination of manual and automated testing techniques to verify the correctness, reliability, and maintainability of the code. This can include -&lt;/p&gt;</description></item><item><title>How to remove a resource from Terraform state?</title><link>https://jhooq.com/terraform-remove-resource-from-state/</link><pubDate>Mon, 12 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-remove-resource-from-state/</guid><description>
&lt;p&gt;To remove a resource from the Terraform state, you can use the &lt;em&gt;&lt;strong&gt;&lt;a href="https://developer.hashicorp.com/terraform/cli/commands/state/rm"&gt;$ terraform state rm&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; command. This command allows you to remove resources from the &lt;a href="https://jhooq.com/terraform-manage-state/"&gt;Terraform state file&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="1-how-to-remove-a-single-resource-from-terraform-state-file"&gt;1. How to remove a single resource from terraform state file?&lt;/h2&gt;
&lt;p&gt;Here are the steps which you should follow before you remove any resource -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;List the resource-&lt;/strong&gt; Using the following terraform list resource command first you can check how many resources you are planning to remove from the state file.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# List all the resources&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;terraform state list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;&lt;strong&gt;Remove the resource -&lt;/strong&gt; If you want to remove a resource named &lt;code&gt;my_resource&lt;/code&gt; from the state, you can use the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Remove the resource name - my_resource &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;terraform state rm my_resource
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;&lt;strong&gt;$terraform apply -&lt;/strong&gt; Previous command will remove the resource and all of its associated data from the state file. You can then use the &lt;em&gt;&lt;strong&gt;$terraform apply&lt;/strong&gt;&lt;/em&gt; command to apply the changes and remove the resource from your infrastructure.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It's important to note that removing a resource from the Terraform state does not destroy the resource itself. If you want to destroy the resource and remove it from your infrastructure, you will need to use the &lt;em&gt;&lt;strong&gt;$terraform destroy&lt;/strong&gt;&lt;/em&gt; command.&lt;/p&gt;</description></item><item><title>Terraform null_resource Explained - Triggers, local-exec and remote-exec Examples, and When to Use terraform_data Instead</title><link>https://jhooq.com/terraform-null-resource/</link><pubDate>Fri, 09 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-null-resource/</guid><description>
&lt;p&gt;Terraform &lt;em&gt;&lt;strong&gt;null_resource&lt;/strong&gt;&lt;/em&gt; is one of the features which is underused by DevOps professionals. When I first looked at Terraform's documentation for &lt;em&gt;null_resource&lt;/em&gt; I felt they had not put much effort into explaining it. But once I tried it myself, I started using it in almost every project - it is the standard way to run a script or a command as part of &lt;code&gt;terraform apply&lt;/code&gt; when there is no real resource to attach it to.&lt;/p&gt;</description></item><item><title>In terraform how to skip creation of resource if the resource already exist?</title><link>https://jhooq.com/terraform-check-if-resource-exist/</link><pubDate>Wed, 07 Dec 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-check-if-resource-exist/</guid><description>
&lt;p&gt;In a &lt;em&gt;&lt;strong&gt;&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; project there are situations where a &lt;em&gt;&lt;strong&gt;Developer&lt;/strong&gt;&lt;/em&gt; feels a need to pre-check if the resource exists or not and many times I also wondered if is it possible to check the existence of the resource to avoid the duplicity of the resource. In this blog, we are gonna see -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-why-it-is-not-possible-to-decide-dynamically-if-the-resource-exists-or-not"&gt;Why it is not possible to decide dynamically if the resource exists or not?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-what-alternate-ways-do-we-have-in-terraform-to-check-the-existence-of-resources"&gt;What are alternate ways we have in Terraform to check the existence of resources?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-why-it-is-not-possible-to-decide-dynamically-if-the-resource-exists-or-not"&gt;1. Why it is not possible to decide dynamically if the resource exists or not?&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Why it is not possible? -&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>How to setup Virtual machine on Google Cloud Platform</title><link>https://jhooq.com/how-to-setup-virtual-machine-on-google-cloud-platform/</link><pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/how-to-setup-virtual-machine-on-google-cloud-platform/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Working on a cloud platform always sounds interesting but what if you have some framework where you can automate your cloud infrastructure. In this article, we are going to see &lt;strong&gt;How to set up your first Virtual Machine on Google Cloud The platform using Terraform&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This article is aimed at the beginner who is just starting with Terraform and Google Cloud Platform(GCP).&lt;/p&gt;
&lt;h2 id="prerequisite"&gt;Prerequisite&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;The only prerequisite is - &lt;a href="https://jhooq.com/install-terrafrom/"&gt;You must install Terraform&lt;/a&gt; before jumping to
Google Cloud Setup.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Going further:&lt;/strong&gt; once you have a VM working, the next step on Google Cloud is usually a managed service. I wrote up a production setup with Cloud Run, Cloud SQL, Secret Manager and Cloud Build, all in Terraform, in &lt;a href="https://jhooq.com/deploy-nextjs-saas-google-cloud-run-terraform/"&gt;Deploying a Next.js SaaS on Google Cloud Run with Terraform&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to use Terraform locals?</title><link>https://jhooq.com/how-to-use-terraform-locals/</link><pubDate>Mon, 28 Nov 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/how-to-use-terraform-locals/</guid><description>
&lt;br/&gt;
&lt;p&gt;In programming world we have concept of &lt;strong&gt;variables&lt;/strong&gt;, similar to that in &lt;strong&gt;Terraform&lt;/strong&gt; we also have concept of &lt;strong&gt;Terraform Locals&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is Terraform locals?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is an very basic example code which show - &lt;em&gt;&amp;quot;How to create &lt;a href="https://www.terraform.io/"&gt;locals&lt;/a&gt; in Terraform?&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Example of local with static value &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;locals &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;my_local&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;value&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see in the above code locals are very easy to define. In the later section of this blog we will take a look on &lt;em&gt;dynamic way&lt;/em&gt; to assign the value.&lt;/p&gt;</description></item><item><title>Fix docker login 'error saving credentials: error storing credentials - err: exit status 1' (AWS ECR on macOS, Windows, Linux and WSL)</title><link>https://jhooq.com/aws-ecr-docker-login-error-credential/</link><pubDate>Sun, 02 Oct 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-ecr-docker-login-error-credential/</guid><description>
&lt;p&gt;This is a troubleshooting blog post on how to fix the following error when running &lt;code&gt;aws ecr get-login-password --region &amp;lt;region&amp;gt; | docker login ...&lt;/code&gt; to log in to AWS Elastic Container Registry -&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;Error saving credentials: error storing credentials - err: &lt;span class="nb"&gt;exit&lt;/span&gt; status 1, out: &lt;span class="sb"&gt;`&lt;/span&gt;Post http://ipc/registry/credstore-updated: dial unix backend.sock: connect: connection refused&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Here is the screenshot of the error -&lt;/strong&gt;
&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/aws/aws-ecr-docker-login-error/aws-ecr-login-error.webp"
title="AWS ECR docker login error storing credentials err exit status 1"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;AWS ECR docker login error storing credentials err exit status 1&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Terraform Guide - Docker Containers &amp; AWS ECR(elastic container registry)?</title><link>https://jhooq.com/terraform-docker-container-guide/</link><pubDate>Wed, 28 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-docker-container-guide/</guid><description>
&lt;p&gt;Terraform is the most popular IaC(Infrastructure as Code) tool for provisioning your cloud infrastructure on AWS,
GCP and Azure.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs"&gt;Terraform capabilities&lt;/a&gt; are not limited to cloud infrastructure instead you can use Terraform for other
container infrastructure provisioning also. In this blog post, we will take a look at &lt;em&gt;&amp;quot;How to Use Terraform for
provisioning(setup/start/stop) of Docker container?&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Objective-&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#1-create-a-nodejs-app"&gt;Setup Application&lt;/a&gt;-&lt;/strong&gt; Setup a simple server application using &lt;em&gt;Node.js&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#2-create-dockerfile"&gt;Create Dockerfile&lt;/a&gt;-&lt;/strong&gt; Create Dockerfile for &lt;em&gt;Node.js&lt;/em&gt; application&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#3-build-docker-image-by-tagging-it-with-a-suitable-name"&gt;Build Docker Image&lt;/a&gt;-&lt;/strong&gt; Build Docker Image of &lt;em&gt;Node.js&lt;/em&gt; application&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#4-test-docker-image"&gt;Test Docker Image&lt;/a&gt;-&lt;/strong&gt; Start, Run and Stop Node.js docker container using Docker commands&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#4-test-docker-image"&gt;Create Terraform Manifest for Docker&lt;/a&gt;-&lt;/strong&gt; Create Terraform Manifest for the &lt;em&gt;Node.js&lt;/em&gt; Docker image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#5-create-terraform-manifest-for-docker"&gt;Start and Stop Docker image using Terraform&lt;/a&gt;-&lt;/strong&gt; Finally we will only use &lt;em&gt;terraform init, terraform plan and
terraform apply&lt;/em&gt; command to start and stop the Docker container of our &lt;em&gt;Node.js&lt;/em&gt; application.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#7-how-to-push-docker-image-to-ecrelastic-container-registry-on-aws"&gt;How to Push Docker Image to ECR(elastic container registry) on AWS&lt;/a&gt;-&lt;/strong&gt; A detailed instructions on how to push Docker image to ECR&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="#6-start-and-stop-docker-image-using-terraform"&gt;Conclusion&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Here are the prerequisites for this blog post. Since this is a little advanced topic of Terraform where you need
to have the following software component already installed onto your laptop/desktop -&lt;/p&gt;</description></item><item><title>How to generate an SSH key in Terraform with tls_private_key and register it as an AWS key pair</title><link>https://jhooq.com/terraform-generate-ssh-key/</link><pubDate>Mon, 19 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-generate-ssh-key/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Three resources do the whole job: &lt;code&gt;tls_private_key&lt;/code&gt; creates the key pair, &lt;code&gt;aws_key_pair&lt;/code&gt; registers the public key with AWS, and &lt;code&gt;local_sensitive_file&lt;/code&gt; writes the private key to disk with &lt;code&gt;file_permission = &amp;quot;0600&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;AWS never receives the private key. &lt;code&gt;aws_key_pair&lt;/code&gt; takes only &lt;code&gt;public_key&lt;/code&gt;, so pass it &lt;code&gt;tls_private_key.&amp;lt;name&amp;gt;.public_key_openssh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The private key is stored unencrypted in &lt;code&gt;terraform.tfstate&lt;/code&gt;. In my run the marker &lt;code&gt;BEGIN OPENSSH PRIVATE KEY&lt;/code&gt; appeared on 2 lines of the state file, so protect the state like a secret.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rsa_bits&lt;/code&gt; defaults to 2048 and &lt;code&gt;ecdsa_curve&lt;/code&gt; defaults to &lt;code&gt;P224&lt;/code&gt;, so set them explicitly or use &lt;code&gt;ED25519&lt;/code&gt;, which needs neither.&lt;/li&gt;
&lt;li&gt;Without credentials, &lt;code&gt;terraform plan&lt;/code&gt; stops with &lt;code&gt;Error: No valid credential sources found&lt;/code&gt;. If you only want the key and file, read my &lt;a href="https://jhooq.com/terraform-tls-private-key/"&gt;tls_private_key deep dive&lt;/a&gt; which needs no cloud account at all.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you already have a key and just want to log in to an instance, the &lt;a href="https://jhooq.com/terraform-ssh-into-aws-ec2/"&gt;manual SSH key post&lt;/a&gt; is the shorter path.&lt;/p&gt;</description></item><item><title>How to fix-Terraform Error acquiring the state lock ConditionalCheckFiledException?</title><link>https://jhooq.com/terraform-conidtional-check-failed/</link><pubDate>Mon, 12 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-conidtional-check-failed/</guid><description>
&lt;br/&gt;
&lt;p&gt;It might be possible that you are in the middle of running &lt;code&gt;terraform plan&lt;/code&gt; or &lt;code&gt;terraform apply&lt;/code&gt; command but
unfortunately, you ended up with the error - &lt;em&gt;Error locking state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here is one of the same errors which I have faced while I was working on one of my terraform projects for &lt;a href="https://jhooq.com/terraform-state-file-locking"&gt;saving
terraform state using DynamoDB&lt;/a&gt;&lt;br&gt;
&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/conditional-check-fail/error-conditional-check-fail.webp"
title="Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Terraform Templates Explained - templatefile(), .tftpl Files, Loops and If Directives, with Real Rendered Output (EC2 user_data and IAM policy examples)</title><link>https://jhooq.com/terraform-template/</link><pubDate>Fri, 09 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-template/</guid><description>
&lt;p&gt;In this blog post, we are gonna talk about &lt;a href="https://developer.hashicorp.com/terraform/language/expressions/strings#string-templates"&gt;Terraform templates&lt;/a&gt;. If you have ever needed to generate a cloud-init script, a JSON IAM policy, an nginx config or a Kubernetes manifest from your Terraform variables, then a Terraform template is the tool for the job.&lt;/p&gt;
&lt;p&gt;We are gonna cover the following topics for Terraform template -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-is-terraform-template-and-whats-the-importance-of-terraform-template"&gt;What is Terraform template and what's the importance of Terraform template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-what-is-the-extension-by-which-you-can-save-your-terraform-template-tftpl-vs-tpl"&gt;What is the extension by which you can save your Terraform template (.tftpl vs .tpl)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-project-structure-and-terraform-template-location-in-the-project"&gt;Project structure and Terraform template location in the project?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-how-to-call-a-terraform-template-inside-your-terraform-script-templatefile-function"&gt;How to call a Terraform template inside your Terraform script (templatefile function)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-passing-lists-and-maps-for-loops-and-if-conditions-inside-a-terraform-template"&gt;Passing lists and maps, for loops and if conditions inside a Terraform template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-terraform-template-example---ec2-user-data-with-templatefile"&gt;Terraform template example - EC2 user_data with templatefile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-aws-example-using-terraform-template---set-up-aws-iam-users-and-iam-role-permissions-for-iam-user"&gt;&lt;strong&gt;AWS Example using Terraform Template&lt;/strong&gt; - Set up AWS IAM users and IAM role permissions for IAM user&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-common-terraform-template-errors-and-how-to-fix-them"&gt;Common Terraform template errors and how to fix them&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;Terraform template&lt;/strong&gt; is a text file with &lt;code&gt;${placeholders}&lt;/code&gt; and &lt;code&gt;%{ directives }&lt;/code&gt; that &lt;code&gt;templatefile(path, vars)&lt;/code&gt; turns into a string at plan time - the right tool for cloud-init scripts, IAM policies, nginx configs and Kubernetes manifests that depend on your variables.&lt;/li&gt;
&lt;li&gt;Save it as &lt;strong&gt;&lt;code&gt;.tftpl&lt;/code&gt;&lt;/strong&gt; (recommended since Terraform 1.0, editors highlight it); &lt;code&gt;.tpl&lt;/code&gt; still works, Terraform ignores the extension.&lt;/li&gt;
&lt;li&gt;Call it with &lt;strong&gt;&lt;code&gt;templatefile(&amp;quot;${path.module}/templates/x.tftpl&amp;quot;, { key = value })&lt;/code&gt;&lt;/strong&gt;. Always &lt;code&gt;path.module&lt;/code&gt;, never a bare relative path, or it breaks the moment the code becomes a module.&lt;/li&gt;
&lt;li&gt;Lists and maps go through &lt;strong&gt;&lt;code&gt;%{ for }&lt;/code&gt; loops&lt;/strong&gt;, conditions through &lt;strong&gt;&lt;code&gt;%{ if }&lt;/code&gt;&lt;/strong&gt;, and inside JSON templates wrap lists and maps in &lt;strong&gt;&lt;code&gt;jsonencode()&lt;/code&gt;&lt;/strong&gt; or AWS rejects the policy. Use &lt;strong&gt;&lt;code&gt;~}&lt;/code&gt;&lt;/strong&gt; on loop lines or every iteration adds a blank line - the real output below shows exactly that.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;template_file&lt;/code&gt; data source is deprecated&lt;/strong&gt;: the &lt;code&gt;hashicorp/template&lt;/code&gt; provider's last release is v2.2.0 (2020) and it has no &lt;code&gt;darwin_arm64&lt;/code&gt; build, so it fails outright on Apple Silicon. Replace &lt;code&gt;data.template_file.x.rendered&lt;/code&gt; with &lt;code&gt;templatefile()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Every example and every error in this post was rendered with &lt;strong&gt;Terraform v1.16.2 on 2026-10-12&lt;/strong&gt;; the outputs are pasted, not typed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/terraform-string-handling/"&gt;Terraform concat strings, multiline strings and every string function&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/6SQwoLv3N98?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-what-is-terraform-template-and-whats-the-importance-of-terraform-template"&gt;1. What is Terraform template and what's the importance of Terraform template&lt;/h2&gt;
&lt;p&gt;Let's first try to answer the question &amp;quot;What is Terraform template&amp;quot;?&lt;/p&gt;</description></item><item><title>Fixing terraform x509 certificate signed by unknown authority?</title><link>https://jhooq.com/x509-certificate-signed/</link><pubDate>Wed, 07 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/x509-certificate-signed/</guid><description>
&lt;p&gt;The error &lt;strong&gt;x509: certificate signed by unknown authority&lt;/strong&gt; is a very common problem faced by developers.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/ssl/509x-ssl-certificate/terraform-x509-ssl-main-error.webp"
title="terraform x509: certificate signed by unknown authority"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;terraform x509: certificate signed by unknown authority&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;There are many reasons behind this issue -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;self-signed certificate not issued by a trusted certificate authority (CA)&lt;/li&gt;
&lt;li&gt;Expiration of the current certificate&lt;/li&gt;
&lt;li&gt;Due to a changed hostname&lt;/li&gt;
&lt;li&gt;Corporate network where the traffic is intercepted by firewall and it replaces the certificates by adding own self-signed certificate&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="how-to-fix-it"&gt;&lt;strong&gt;How to Fix it?&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This issue could happen with tools such as - &lt;em&gt;Git, Docker, Terraform, Kubernetes, Jenkins,AWS etc.&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Learn $ grep command with 15 examples</title><link>https://jhooq.com/linux-grep-command/</link><pubDate>Mon, 05 Sep 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/linux-grep-command/</guid><description>
&lt;p&gt;In this blog post we are gonna talk about one of the most basic command of &lt;a href="https://www.linux.org/"&gt;linux&lt;/a&gt; which is &lt;strong&gt;&lt;a href="https://jhooq.com/how-to-learn-devops"&gt;grep&lt;/a&gt;&lt;/strong&gt;, also we
are going to see the 15 different examples on &amp;quot;&lt;strong&gt;How to use grep?&lt;/strong&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;It doesn't matter you are an experienced developer or you are just a beginner out of these 15 examples you're just gonna learn something new.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is grep&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;grep&lt;/strong&gt; command in the linux is used to search a text present inside a file.&lt;/p&gt;</description></item><item><title>AWS S3 - How to host static website?</title><link>https://jhooq.com/aws-deploy-static-website/</link><pubDate>Wed, 24 Aug 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-deploy-static-website/</guid><description>
&lt;p&gt;Websites differ in the type of content they offer. The content can be divided into two categories, static and dynamic. A website built on static content consists of -&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HTML files&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Javascript&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And it does not change based on user interaction. No matter how many times a user visits a static website, the content remains uniform in nature.&lt;/p&gt;
&lt;p&gt;The data or web pages presented by the website will not change unless the creator or developer of the site updates the files or publishes any new content. This makes managing a static website very straightforward as it is low cost, has a very simple design and requires very limited administration.&lt;/p&gt;</description></item><item><title>AWS ECS &amp; Fargate - How to deploy docker container</title><link>https://jhooq.com/aws-fargate-docker-container/</link><pubDate>Wed, 17 Aug 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-fargate-docker-container/</guid><description>
&lt;p&gt;When developers are working to &lt;a href="https://www.docker.com/resources/what-container/"&gt;containerize an application&lt;/a&gt;, there are several steps involved. Getting the source code ready is merely half the job done. To package it in a container and get it into a runnable state, a developer will need to build a Dockerfile, which will contain all the necessary packages, runtimes, and dependencies, in addition to the application source code.&lt;/p&gt;
&lt;p&gt;Once the Dockerfile has been successfully built, the resulting container image will have to be published in a central image registry, which can be either local or online. Once the image has been published in a registry, it can then be downloaded to a system and launched in the form of a container.&lt;/p&gt;</description></item><item><title>How to push Docker Images to AWS ECR(Elastic Container registry)?</title><link>https://jhooq.com/docker-push-image-to-ecr/</link><pubDate>Tue, 02 Aug 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-push-image-to-ecr/</guid><description>
&lt;p&gt;&lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; is all about containerizing your applications. For a developer, running containers locally through docker can be a bit overwhelming as there are multiple dimensions involved, such as ensuring that containers can communicate over a network, provisioning persistent storage, pushing, pulling, and copying images from one environment to another, and managing image registries. All these factors add complexity to the development process and can increase the deployment time of the application.&lt;/p&gt;</description></item><item><title>How to Copy Docker images from one host to another host?</title><link>https://jhooq.com/docker-copy-images/</link><pubDate>Wed, 27 Jul 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-copy-images/</guid><description>
&lt;p&gt;&lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; uses prebuilt images to run containers. If there's a need to run a particular container on multiple hosts, we first need to ensure that the required container image is present on all hosts. The container images can vary in size and their actual size depends upon the type of packages present in the container.&lt;/p&gt;
&lt;p&gt;If we’re working with large sized &lt;a href="https://docs.docker.com/engine/reference/commandline/images/"&gt;images&lt;/a&gt; in an environment with low network bandwidth, pulling container images from online registries can be time consuming. In such cases, we need to avoid accessing external registries frequently and find a way to copy images locally between hosts.&lt;/p&gt;</description></item><item><title>How manage access-control, permission and authorization with Permit.io</title><link>https://jhooq.com/using-permit-io/</link><pubDate>Mon, 25 Jul 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/using-permit-io/</guid><description>
&lt;p&gt;Permit.io is a platform for managing your permission infrastructure and allowing you to focus on the actual business requirement. With Permit.io you do not have to build your own solution to implement authorization, it has all the features(GUI Interface, Developer SDK) which comes really handy to manage the users roles and their authorization.&lt;/p&gt;
&lt;p&gt;As being an external tool for handling access-control, permission and authorization, permit.io can be integrated with your web application or mobile app with their powerful SDK.&lt;/p&gt;</description></item><item><title>Install Ansible on Ubuntu, Fedora, CentOS, macOS and Windows (WSL) in 2026: pip, pipx, and the Python Version Trap</title><link>https://jhooq.com/ansible-installation/</link><pubDate>Wed, 06 Jul 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/ansible-installation/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ansible only needs to be installed on the control node&lt;/strong&gt;, the machine you run &lt;code&gt;ansible&lt;/code&gt; from. Managed nodes need Python and SSH, not Ansible (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/installation_guide/intro_installation.rst"&gt;installation guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fastest route on Linux and macOS:&lt;/strong&gt; &lt;code&gt;python3 -m venv ansible-env&lt;/code&gt;, &lt;code&gt;ansible-env/bin/pip install ansible&lt;/code&gt;, then &lt;code&gt;ansible --version&lt;/code&gt;. On 2026-11-03 this gave me Ansible 12.3.0 with ansible-core 2.19.15 and a working &lt;code&gt;ansible localhost -m ping&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The trap:&lt;/strong&gt; pip picks the newest release your Python supports. ansible-core 2.20 and 2.21 need Python 3.12 or newer, 2.22 needs 3.13 or newer, so on Python 3.11 you silently stay on 2.19.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows:&lt;/strong&gt; there is no native control node. Install WSL and follow the Linux steps inside it (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/os_guide/intro_windows.rst"&gt;Windows guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you already have Ansible and need to target one machine, read &lt;a href="https://jhooq.com/ansible-limit-hosts/"&gt;ansible --limit and hosts&lt;/a&gt;; if you want a safe lab first, read &lt;a href="https://jhooq.com/ansible-lab-on-laptop-with-docker/"&gt;Ansible lab on a laptop with Docker&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/5bEAZ0La_Xo?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-you-are-installing-and-where"&gt;What you are installing and where&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-pick-the-route"&gt;Pick the route&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-install-with-pip-in-a-venv-linux-and-macos"&gt;Install with pip in a venv (Linux and macOS)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-install-with-pipx"&gt;Install with pipx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-ubuntu-and-debian-packages"&gt;Ubuntu and Debian packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-fedora-centos-stream-rocky-and-almalinux"&gt;Fedora, CentOS Stream, Rocky and AlmaLinux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-macos"&gt;macOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-windows-with-wsl"&gt;Windows with WSL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-verify-with-ad-hoc-commands"&gt;Verify with ad-hoc commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#11-next-steps"&gt;Next steps&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-what-you-are-installing-and-where"&gt;1. What you are installing and where&lt;/h2&gt;
&lt;p&gt;Ansible is agentless. You install it once on the control node, and it talks to managed nodes over SSH (or WinRM for Windows targets). The managed node needs a Python interpreter to run the modules Ansible copies over, with the exception of network modules (&lt;a href="https://raw.githubusercontent.com/ansible/ansible-documentation/devel/docs/docsite/rst/installation_guide/intro_installation.rst"&gt;installation guide&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>How to deploy site to Netlify manually and How to automate site deployment using FTP on other hosting service provider?</title><link>https://jhooq.com/netlify-deploy-site-with-ftp-manually/</link><pubDate>Fri, 01 Jul 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/netlify-deploy-site-with-ftp-manually/</guid><description>
&lt;p&gt;&lt;a href="https://www.netlify.com/"&gt;Netlify hosting&lt;/a&gt; has excellent integration with &lt;a href="https://github.com"&gt;Github&lt;/a&gt;, so if you own a static website like me then
you can rely on Netlify automated infrastructure for automatic deployment as well as update of your website.&lt;/p&gt;
&lt;p&gt;But there might be a situation where you need to manually control the deployment of your static website by uploading
the files with some &lt;a href="https://en.wikipedia.org/wiki/File_Transfer_Protocol"&gt;FTP&lt;/a&gt; tool. I have prepared this guide keeping in mind the following scenario -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Deploying manually on Netlify-&lt;/strong&gt; You are using Netlify as your preferred hosting service provider and you want to
manually upload the files to the Netlify server&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automating the deployment on other hosting services-&lt;/strong&gt; You are not using Netlify but rather other hosting services
where you want to automate the process of uploading
file manually to the server.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have personally used both the options(&lt;a href="https://www.netlify.com/"&gt;Netlify hosting&lt;/a&gt;, &lt;a href="https://siteground.com"&gt;Siteground Hosting&lt;/a&gt;) for deploying my static
website.
If you
are on Netlify then you have to manually upload the files using their UI feature because Netlify does not support FTP.&lt;/p&gt;</description></item><item><title>Fixing the Hugo Theme on Netlify Hosting?</title><link>https://jhooq.com/netlify-fixing-hugo-theme/</link><pubDate>Wed, 29 Jun 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/netlify-fixing-hugo-theme/</guid><description>
&lt;p&gt;This is a detailed blog post on how to fix the &lt;a href="https://www.netlify.com/"&gt;Hugo theme&lt;/a&gt; on Netlify hosting. I personally run this website with Hugo and I am impressed with the performance and configurations provided by the &lt;a href="https://www.netlify.com/"&gt;GoHugo&lt;/a&gt; as well as &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt;. If you are new to this setup then I would recommend reading this beginner's guide on - &lt;a href="https://jhooq.com/hosting-static-website-on-netlify"&gt;Hosting a website on Netlify&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now let's talk about the issues which you might face while working with Hugo theme and Netlify. I have broken down each issue along with the troubleshooting steps so I would recommend at least going through the solution and identifying your root cause -
&lt;em&gt;(Note - For this blog post I will be taking hugo-clarity as my reference theme but the instructions and troubleshooting steps should work with all hugo-based themes)&lt;/em&gt;&lt;/p&gt;</description></item><item><title>What is persistent storage in docker and how to manage it</title><link>https://jhooq.com/docker-manage-persistent-storage/</link><pubDate>Mon, 27 Jun 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-manage-persistent-storage/</guid><description>
&lt;p&gt;When working with containers, one major point of concern is the persistent storage of data. Container storage is ephemeral, meaning that the data written by the containerized application is not preserved if the container is removed. Containerized applications work on the assumption that they always start with empty storage.&lt;/p&gt;
&lt;h2 id="container-image-layers"&gt;Container Image layers&lt;/h2&gt;
&lt;p&gt;By design, container images are immutable and layered. The running container processes use an immutable view of the container image. This allows us to launch multiple containers which can reuse the same image simultaneously. The images are composed of several layers that add or override the contents of layers below them.&lt;/p&gt;</description></item><item><title>Docker Installation on MacOS, Linux and Windows</title><link>https://jhooq.com/docker-installation/</link><pubDate>Tue, 21 Jun 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-installation/</guid><description>
&lt;p&gt;This is blog series on Docker we will start with &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; installation on all the Machines . i.e. macOS, Linux and
Windows. Also along with the installation, we will focus on all the possible issues which you can encounter during
the pre-installation as well as post-installation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Table of Content&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-installation-of-docker-on-macos"&gt;Installation of Docker on MacOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-installation-of-docker-on-windows"&gt;Installation of Docker on Windows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-installation-of-docker-on-linux"&gt;Installation of Docker on Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-troubleshooting-docker-installation"&gt;Troubleshooting Docker Installation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-installation-of-docker-on-macos"&gt;1. Installation of Docker on macOS&lt;/h2&gt;
&lt;p&gt;With the introduction of Apple's new Silicon chip, you need to choose the correct &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; Desktop &lt;em&gt;dmg&lt;/em&gt; package for the
installation of Docker Desktop. Here is the &lt;a href="https://docs.docker.com/desktop/mac/install/"&gt;official documentation&lt;/a&gt; of Docker for macOS. Here are the links for
downloading the correct package based on your MacBook Chip -&lt;/p&gt;</description></item><item><title>How to set up Netlify CMS for static website?</title><link>https://jhooq.com/netlify-cms-for-static-website/</link><pubDate>Fri, 17 Jun 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/netlify-cms-for-static-website/</guid><description>
&lt;p&gt;&lt;a href="https://www.netlifycms.org/"&gt;Netlify CMS&lt;/a&gt; is one of the most requested features by all the authors who own static websites. I'm personally running my
blog from last 3 years on &lt;a href="https://gohugo.io/"&gt;Hugo static site framework&lt;/a&gt; and I am really happy with my website performance but when I
read some posts on the &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt; forum about &lt;a href="https://www.netlifycms.org/"&gt;Netlify CMS&lt;/a&gt;, it made me curious as well as surprised because how come a
the static website is managed via CMS when it does not have any kind of database layer to store the information.&lt;/p&gt;</description></item><item><title>Hosting a website on Netlify</title><link>https://jhooq.com/hosting-static-website-on-netlify/</link><pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/hosting-static-website-on-netlify/</guid><description>
&lt;p&gt;This blog post is inspired by a lot of questions I received from my readers and they generally ask -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;How did you design your website?&lt;/li&gt;
&lt;li&gt;Which hosting service I am using?&lt;/li&gt;
&lt;li&gt;How much does it cost to run a website with its domain name?&lt;/li&gt;
&lt;li&gt;Is it possible to run a website free? &lt;em&gt;(Disclaimer - Yes you can run the website for free with your own domain name)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Which hosting service provider I should choose?&lt;/li&gt;
&lt;li&gt;Do you have steps that can be followed for building and maintaining a website?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So I thought of composing all of those questions and preparing a detailed blog post to answer them in the best possible way.&lt;/p&gt;</description></item><item><title>How to use Terragrunt?</title><link>https://jhooq.com/terragrunt-guide/</link><pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terragrunt-guide/</guid><description>
&lt;br/&gt;
&lt;p&gt;Terragrunt is an additional wrapper that is built on top of the Terraform. Terraform is a great &lt;em&gt;Infrastructure as
Code&lt;/em&gt; tool for managing your cloud infrastructure. But as the project size grows and you have multiple environments
(Development, Testing, Staging, Production, etc..) to manage then you will realize Terraform has a lot of gaps for
managing a complex and large project.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Challenges with Terraform -&lt;/strong&gt; If you are managing multiple environments (Development, Testing, Staging, and Production
etc..) infrastructure with Terraform then here are the challenges you might face with Terraform -&lt;/p&gt;</description></item><item><title>Terraform and AWS Multi account Setup?</title><link>https://jhooq.com/terraform-aws-multi-account/</link><pubDate>Wed, 18 May 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-aws-multi-account/</guid><description>
&lt;br/&gt;
&lt;p&gt;This article is focused on how to use AWS multiple account setup with Terraform. Terraform is a great tool for provisioning your cloud infrastructure but as you start using Terraform for managing your cloud infrastructure you will always feel a need for multiple AWS accounts that can cater to some specific environment such as - development, test, stage, and production.&lt;/p&gt;
&lt;p&gt;If you are following DevOps practices for managing the AWS account then it is also recommended by AWS to use multiple accounts for managing your cloud infrastructure.&lt;/p&gt;</description></item><item><title>Terraform and AWS Credentials: Environment Variables, Shared Files and Profiles Compared (AWS Provider 6.71)</title><link>https://jhooq.com/terraform-aws-credentials-handling/</link><pubDate>Tue, 10 May 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-aws-credentials-handling/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The AWS provider reads credentials from six places, first match wins:&lt;/strong&gt; provider block arguments, environment variables, the shared credentials file, the shared config file, container credentials, then the EC2 instance profile. I confirmed the first three with Terraform 1.17.1 and AWS provider 6.71.0 on 2026-11-04.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Never put &lt;code&gt;access_key&lt;/code&gt; and &lt;code&gt;secret_key&lt;/code&gt; in the provider block.&lt;/strong&gt; They beat everything else, including the environment variables you set to override them, and they end up in Git.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use &lt;code&gt;AWS_PROFILE&lt;/code&gt; or the environment variables on a laptop, and a role (container credentials or an instance profile) in CI.&lt;/strong&gt; AWS itself recommends temporary credentials over long-term access keys.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;shared_credentials_file&lt;/code&gt; is gone.&lt;/strong&gt; In provider 6.71.0 it fails with &lt;code&gt;Unsupported argument ... Did you mean &amp;quot;shared_credentials_files&amp;quot;?&lt;/code&gt;. The new argument takes a list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Different error?&lt;/strong&gt; If Terraform complains about a variable instead, read &lt;a href="https://jhooq.com/value-for-undeclared-variable/"&gt;Value for undeclared variable&lt;/a&gt;; if you want the full secrets-with-Vault story, read &lt;a href="https://jhooq.com/hashi-vault-aws-secret-terraform/"&gt;Securing AWS secrets with HashiCorp Vault and Terraform&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/pw-g-9N5pLk?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Every Terraform project on AWS starts with the same question: where do the keys live? I first wrote this post in 2022 with three options (hard-coded, shared file, environment variables). The options are still the same, but the provider has changed underneath them, so on 2026-11-04 I re-ran all of it. This version shows the real precedence, the real error messages, and what I would pick today.&lt;/p&gt;</description></item><item><title>My experience of hosting static website hosting on Siteground</title><link>https://jhooq.com/using-siteground-for-static-website/</link><pubDate>Sun, 08 May 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/using-siteground-for-static-website/</guid><description>
&lt;p&gt;My experience of hosting static website hosting on Siteground&lt;/p&gt;
&lt;p&gt;It is been around 4 years ago I start my DevOps blog but along the way, I learned a lot about what goes behind hosting a website that receives thousands of users each day. I always wanted to document my journey but there is nothing much to share when your blog does not receive that much organic traffic. To put things into perspective I set a milestone of reaching 100k monthly users on my website and I reached that goal in February-2022 and now sitting on 130k monthly users.&lt;/p&gt;</description></item><item><title>How to use CommandLineRunner in Spring Boot Application?</title><link>https://jhooq.com/commandlinerunner-spring-boot/</link><pubDate>Thu, 24 Mar 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/commandlinerunner-spring-boot/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/CommandLineRunner.html"&gt;CommandLineRunner Interface&lt;/a&gt; is a functional interface provided by Spring Boot. The main purpose of this
interface to execute a code block once before the application has finished startup. In this article, I will be
addressing the need for the CommandLineRunner Interface as well as how and when to use it.&lt;/p&gt;
&lt;p&gt;GitHub Source Code - &lt;a href="https://github.com/rahulwagh/springboot.git"&gt;Clone Repo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://spring.io/projects/spring-boot"&gt;Spring Boot&lt;/a&gt; provides two Interface (Remember its an interface) CommandLineRunner and &lt;a href="https://jhooq.com/applicationrunner-spring-boot"&gt;ApplicationRunner&lt;/a&gt;.
Since CommandLineRunner is an interface so we must implement the CommandLineRunner interface into our class.&lt;/p&gt;</description></item><item><title>Prometheus + Grafana vs Zabbix - Architecture, Kubernetes Support, Alerting, Cost and How to Choose (Updated for Prometheus 3 and Zabbix 7)</title><link>https://jhooq.com/prometheous-grafana-vs-zabbix/</link><pubDate>Sat, 12 Mar 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/prometheous-grafana-vs-zabbix/</guid><description>
&lt;!-- no-video: no video on the channel compares Prometheus with Zabbix yet; suggested title is in docs/content-queue.md --&gt;
&lt;p&gt;To monitor modern cloud infrastructure, an SRE or DevOps engineer has to rely on automated monitoring tools such as &lt;a href="https://jhooq.com/prometheous-grafan-setup/"&gt;Prometheus with Grafana&lt;/a&gt; or Zabbix. Both collect metrics from your servers, containers, network devices and applications, store them, show them on dashboards and wake you up when something is wrong. And both are open source and mature.&lt;/p&gt;</description></item><item><title>How to setup Prometheus, Grafana dashboard for Kubernetes monitoring on AWS</title><link>https://jhooq.com/prometheous-k8s-aws-setup/</link><pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/prometheous-k8s-aws-setup/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://prometheus.io/"&gt;Prometheus&lt;/a&gt; and &lt;a href="https://grafana.com/"&gt;Grafana&lt;/a&gt; are the two popular open-source tools for collecting and visualizing performance
metrics.
In this blog post, we are going to set up Kubernetes cluster on AWS, later we are gonna set up Prometheus server for
collecting the performance metrics and Grafana for.&lt;/p&gt;
&lt;p&gt;Prometheus and Grafana are always a great combination when it comes to measuring the site reliability index. SREs
(Software Reliability Engineers) heavily rely on Prometheus and Grafana because apart from collecting performance
metrics, you can also set up some alerts, live views, and custom dashboards.&lt;/p&gt;</description></item><item><title>How to setup Prometheus, Node Exporter and Grafana on Ubuntu (Step by Step, with systemd services and the Node Exporter Full dashboard)</title><link>https://jhooq.com/prometheous-grafan-setup/</link><pubDate>Fri, 18 Feb 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/prometheous-grafan-setup/</guid><description>
&lt;br/&gt;
&lt;p&gt;Performance monitoring and alerting are crucial to measure how an application and the servers under it behave in production. In this blog post we are going to set up the most popular open-source monitoring stack there is - &lt;a href="https://prometheus.io/docs/introduction/overview/"&gt;Prometheus&lt;/a&gt; to collect and store the metrics, &lt;a href="https://github.com/prometheus/node_exporter"&gt;Node Exporter&lt;/a&gt; to expose the CPU, memory, disk and network numbers of each Linux server, and &lt;a href="https://grafana.com/docs/grafana/latest/"&gt;Grafana&lt;/a&gt; to put them on a dashboard.&lt;/p&gt;
&lt;p&gt;I first wrote this guide in 2022 for Prometheus 2.33. Since then Prometheus 3 has shipped with a new UI, Grafana has gone through several major versions and changed how you install it (the old &lt;code&gt;apt-key&lt;/code&gt; method no longer works), and &lt;code&gt;node_exporter&lt;/code&gt; is at 1.12. So this is the refreshed version - same beginner-friendly order, current commands, and this time we run everything as proper systemd services instead of leaving a &lt;code&gt;./prometheus&lt;/code&gt; process hanging in a terminal.&lt;/p&gt;</description></item><item><title>How to fix-error configuring S3 Backend no valid credential sources for S3 Backend found?</title><link>https://jhooq.com/terraform-error-config-s3/</link><pubDate>Sun, 06 Feb 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-error-config-s3/</guid><description>
&lt;br/&gt;
&lt;p&gt;I had an issue while I was trying to &lt;a href="https://jhooq.com/terraform-manage-state"&gt;setup Remote S3 bucket for storing Terraform state file&lt;/a&gt;. The issue faced is
&lt;strong&gt;error configuring &lt;a href="https://aws.amazon.com/s3/"&gt;S3 Backend&lt;/a&gt; no valid credential sources for S3 Backend found&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;After spending some time on my local terraform setup and AWS CLI configuration I realised that my AWS CLI was using
incorrect &lt;strong&gt;Access Key&lt;/strong&gt; and &lt;strong&gt;Secret Key&lt;/strong&gt; with my AWS CLI.&lt;/p&gt;
&lt;p&gt;Here is the screenshot of the error when I issued &lt;em&gt;terraform init&lt;/em&gt; -&lt;/p&gt;</description></item><item><title>MacOS - How to fix Mounting of NFS shared folders on Vagrant?</title><link>https://jhooq.com/vagrant-nfs-shared-volume-error/</link><pubDate>Wed, 02 Feb 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/vagrant-nfs-shared-volume-error/</guid><description>
&lt;br/&gt;
&lt;p&gt;To give you a little background on the &lt;a href="https://www.vagrantup.com/docs/synced-folders/nfs#enabling-nfs-synced-folders"&gt;Vagrant NFS shared folder issue&lt;/a&gt; which I have struggled with this issue for
almost a week before I found the root cause of the problem.&lt;/p&gt;
&lt;p&gt;Here is the &lt;em&gt;vagrant's mount.nfs:connection timed out error&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;default: Mounting NFS shared folders...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;The following SSH &lt;span class="nb"&gt;command&lt;/span&gt; responded with a non-zero &lt;span class="nb"&gt;exit&lt;/span&gt; status. Vagrant assumes that this means the &lt;span class="nb"&gt;command&lt;/span&gt; failed!
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;mount -o &lt;span class="nv"&gt;vers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3,udp 192.168.0.1:/System/Volumes/Data/Users/rwagh/Git/jhooq.com/src /var/www/jhooq
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;Stdout from the &lt;span class="nb"&gt;command&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;Stderr from the command:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;mount.nfs: Connection timed out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;If you are also having the same &lt;a href="https://www.vagrantup.com/docs/synced-folders/nfs#enabling-nfs-synced-folders"&gt;issue mounting the shared volume&lt;/a&gt; then I would suggest going through the
following
key points because your MacBook and Development setup might be a little different than mine, so validate your Vagrant and Development setup based on the key troubleshooting steps which I mentioned in the post.&lt;/p&gt;</description></item><item><title>How to fix-Support for password authentication was removed. Please use a personal access token instead?</title><link>https://jhooq.com/git-personal-access-token/</link><pubDate>Sat, 22 Jan 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/git-personal-access-token/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/"&gt;GitHub&lt;/a&gt; has &lt;a href="https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/"&gt;recently announced&lt;/a&gt; their migration to use token-based authentication which means &lt;em&gt;you can no
longer use your username and password for GtiHub authentication&lt;/em&gt;. You need to create personal access token to
continue use of your GitHub Repository.&lt;/p&gt;
&lt;p&gt;Here is my private GitHub repository which I was trying to clone and prompted with the error message -&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/ssl/git-personal-access-token/git-personal-access-token-error.webp"
title="Support for password authentication was removed. Please use a personal access token instead"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Support for password authentication was removed. Please use a personal access token instead&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Kubernetes Cheat Sheet for day to day DevOps operations?</title><link>https://jhooq.com/kubernetes-cheat-sheet/</link><pubDate>Sat, 15 Jan 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-cheat-sheet/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Note -&lt;/strong&gt; This Kubernetes Cheat sheet is really long and detailed. &lt;em&gt;&lt;strong&gt;I would highly recommend to use CTRL+F from the
browser to
search for the specific command&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table Of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-pods"&gt;Pods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-deployments"&gt;Deployments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-port-forwarding"&gt;Port Forwarding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4services"&gt;Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5nodes"&gt;Nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6namespaces"&gt;Namespace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-service-accounts"&gt;Service Accounts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8documentation"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9describing-resources"&gt;Describing Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10editing-resources"&gt;Editing Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#11deleting-resources"&gt;Deleting Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#12all-get-commands"&gt;All get commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#13abbreviations--short-forms-of-resource-types"&gt;Abbreviations / Short forms of resource types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#14verbose-kubectl"&gt;Verbose Kubectl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#15cluster"&gt;Cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#16kubectl-context"&gt;Kubectl Context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#17alias"&gt;Alias&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#17alias"&gt;Kubectl imperative(create) vs declarative(apply)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-pods"&gt;1. Pods&lt;/h2&gt;
&lt;h4 id="list-all-pods-in-namespace"&gt;List all pods in namespace &lt;default&gt;&lt;/h4&gt;
&lt;p&gt;kubectl get pods&lt;/p&gt;</description></item><item><title>Terraform state locking using DynamoDB (aws_dynamodb_table)?</title><link>https://jhooq.com/terraform-state-file-locking/</link><pubDate>Wed, 12 Jan 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-state-file-locking/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/terraform-manage-state"&gt;Terraform state&lt;/a&gt; is the backbone of your terraform project for provisioning your cloud
infrastructure.
When you work on large infrastructure provisioning with Terraform then it is always more than one developer or
team of a developer working on the same terraform project.&lt;/p&gt;
&lt;p&gt;The problems arise when two developers try to update the same terraform state file which is stored remotely(S3
Bucket). Ideally, the update on the state file should be done incrementally so that when one developer finishes
pushing its state file changes another developer can push their changes after taking the update.&lt;/p&gt;</description></item><item><title>Docker environment variables - ENV vs ARG, -e and --env-file, Compose environment and .env, precedence, PATH, and why you cannot change a running container's variables (tested on Docker 28)</title><link>https://jhooq.com/docker-manage-environment-variable/</link><pubDate>Fri, 07 Jan 2022 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-manage-environment-variable/</guid><description>
&lt;!-- no-video: no companion video for environment variables yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dockerfile:&lt;/strong&gt; &lt;code&gt;ENV&lt;/code&gt; sets a variable for the build &lt;em&gt;and&lt;/em&gt; the container; &lt;code&gt;ARG&lt;/code&gt; exists only during the build and is gone at run time. &lt;code&gt;export&lt;/code&gt; inside a &lt;code&gt;RUN&lt;/code&gt; line dies with that line.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run time:&lt;/strong&gt; &lt;code&gt;docker run -e KEY=value&lt;/code&gt; and &lt;code&gt;--env-file app.env&lt;/code&gt;. Flags override &lt;code&gt;ENV&lt;/code&gt; from the image, and &lt;code&gt;-e KEY&lt;/code&gt; with no value copies the variable from your shell.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compose:&lt;/strong&gt; &lt;code&gt;environment:&lt;/code&gt; in the service, &lt;code&gt;env_file:&lt;/code&gt; for a file of &lt;code&gt;KEY=value&lt;/code&gt; lines, and the &lt;code&gt;.env&lt;/code&gt; file next to &lt;code&gt;compose.yaml&lt;/code&gt; for substituting &lt;code&gt;${VAR}&lt;/code&gt; in the file itself. &lt;code&gt;environment:&lt;/code&gt; beats &lt;code&gt;env_file:&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You cannot change a running container's environment.&lt;/strong&gt; &lt;code&gt;docker exec -e&lt;/code&gt; only affects that one command, &lt;code&gt;export&lt;/code&gt; in an exec shell is gone when the shell exits, and &lt;code&gt;docker update&lt;/code&gt; has no environment option at all. Recreate the container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secrets do not belong in ENV:&lt;/strong&gt; &lt;code&gt;docker inspect&lt;/code&gt; prints every variable, including &lt;code&gt;DB_PASSWORD=hunter2&lt;/code&gt;, to anyone with access to the Docker socket.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 and Docker Compose v2.38.2 on Ubuntu 24.04, captured on 2026-10-16.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-error-executable-file/"&gt;exec&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 2022 version of this post answered &amp;quot;how do I use an environment variable in Docker&amp;quot; with a few examples. The questions that bring people here today are more specific: &lt;em&gt;dockerfile export environment variable&lt;/em&gt;, &lt;em&gt;dockerfile add to path&lt;/em&gt;, &lt;em&gt;docker update environment variables&lt;/em&gt;. Those have precise answers, and some of them are &amp;quot;you cannot&amp;quot;, so for this rewrite I ran every case and kept the output.&lt;/p&gt;</description></item><item><title>Terraform State File Explained: terraform.tfstate, Remote State on S3, Locking, Pull and Push</title><link>https://jhooq.com/terraform-manage-state/</link><pubDate>Thu, 30 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-manage-state/</guid><description>
&lt;br/&gt;
&lt;p&gt;Terraform has its backbone known as the &lt;em&gt;&lt;strong&gt;terraform.tfstate file&lt;/strong&gt;&lt;/em&gt;. Any change you make to your infrastructure will have its presence in the &lt;em&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/state"&gt;terraform.tfstate&lt;/a&gt;&lt;/em&gt; file. So when you work with Terraform for managing and provisioning your infrastructure, Terraform will always create a &lt;em&gt;terraform.tfstate&lt;/em&gt; file for you.&lt;/p&gt;
&lt;p&gt;I have been using Terraform since the 0.12 days and I can tell you that 9 out of 10 Terraform problems I have seen in real projects were state file problems - a state file committed to git, two developers applying at the same time, a lost state file, or a state file that no longer matches what is running in the cloud.&lt;/p&gt;</description></item><item><title>docker failed to compute cache key: failed to calculate checksum of ref - not found (the 6 causes, tested on Docker 28)</title><link>https://jhooq.com/docker-failed-to-compute-cache-key/</link><pubDate>Mon, 20 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-failed-to-compute-cache-key/</guid><description>
&lt;!-- no-video: no companion video for the cache key error yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;quot;failed to compute cache key ... not found&amp;quot; is COPY telling you the source path is not in the build context.&lt;/strong&gt; It happens before any layer is built, which is why &lt;code&gt;--no-cache&lt;/code&gt; changes nothing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The context is the last argument of &lt;code&gt;docker build&lt;/code&gt;, not the folder with the Dockerfile.&lt;/strong&gt; &lt;code&gt;cd docker &amp;amp;&amp;amp; docker build .&lt;/code&gt; sends only the &lt;code&gt;docker/&lt;/code&gt; folder; &lt;code&gt;docker build -f docker/Dockerfile .&lt;/code&gt; from the project root is the fix.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The six causes I reproduced:&lt;/strong&gt; a typo in the file name, the wrong context directory, a &lt;code&gt;.dockerignore&lt;/code&gt; rule, wrong letter case (&lt;code&gt;App.py&lt;/code&gt; vs &lt;code&gt;app.py&lt;/code&gt;), a multi-stage &lt;code&gt;COPY --from&lt;/code&gt; path that does not exist in that stage, and the same mistakes on the legacy builder, which words it as &lt;code&gt;COPY failed: file not found in build context or excluded by .dockerignore&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;See what BuildKit really received:&lt;/strong&gt; a two-line throwaway Dockerfile with &lt;code&gt;COPY . /ctx&lt;/code&gt; and &lt;code&gt;RUN find /ctx -type f&lt;/code&gt; lists the context.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 with BuildKit (buildx 0.38) on Ubuntu 24.04, captured on 2026-10-15.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-copy-vs-docker-add/"&gt;Docker COPY vs Docker ADD?&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-failed-to-compute-cache-key/build-context-vs-dockerfile.svg"
title="COPY reads the build context, not your disk - the five ways a file ends up not found"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;COPY reads the build context, not your disk - the five ways a file ends up not found&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint - Bind for 0.0.0.0:8080 failed: port is already allocated (Fix in One Minute)</title><link>https://jhooq.com/docker-driver-failed-programming/</link><pubDate>Thu, 09 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-driver-failed-programming/</guid><description>
&lt;!-- no-video: no companion video for this docker error yet; the docker basics are in the Docker playlist --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Meaning:&lt;/strong&gt; the host port in your &lt;code&gt;-p HOST:CONTAINER&lt;/code&gt; is already in use. Docker could not bind it, so the container was created but never started (&lt;code&gt;docker ps -a&lt;/code&gt; shows it as &lt;code&gt;Created&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two wordings, same cause.&lt;/strong&gt; &lt;code&gt;Bind for 0.0.0.0:8080 failed: port is already allocated&lt;/code&gt; means &lt;strong&gt;another container&lt;/strong&gt; publishes that port. &lt;code&gt;failed to bind host port for 0.0.0.0:8080:172.17.0.2:80/tcp: address already in use&lt;/code&gt; means a &lt;strong&gt;normal process&lt;/strong&gt; on the host (a dev server, nginx, another daemon) has it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find the holder in one command:&lt;/strong&gt; &lt;code&gt;sudo ss -ltnp 'sport = :8080'&lt;/code&gt; (Linux) or &lt;code&gt;lsof -i :8080&lt;/code&gt; (macOS). If the process is &lt;code&gt;docker-proxy&lt;/code&gt;, &lt;code&gt;docker ps --filter publish=8080&lt;/code&gt; names the container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fix:&lt;/strong&gt; use a free port (&lt;code&gt;-p 8081:80&lt;/code&gt;), or stop whatever holds the port, then &lt;code&gt;docker rm&lt;/code&gt; the half-created container and run again. In docker compose, change the &lt;code&gt;ports:&lt;/code&gt; entry or &lt;code&gt;docker compose down&lt;/code&gt; the other stack.&lt;/li&gt;
&lt;li&gt;If nothing holds the port and it still fails, &lt;code&gt;sudo systemctl restart docker&lt;/code&gt; clears a stale &lt;code&gt;docker-proxy&lt;/code&gt; or iptables rule. Deleting &lt;code&gt;local-kv.db&lt;/code&gt; by hand, which older posts (including the first version of this one) recommended, is not needed on any current Docker and can break your networks.&lt;/li&gt;
&lt;li&gt;Everything below was reproduced on 2026-10-12 with Docker 28.0.4 on Ubuntu 24.04; the outputs are pasted, not typed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-restart-single-container/"&gt;docker restart container&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-the-error-reproduced-and-what-each-part-of-it-means"&gt;The error, reproduced, and what each part of it means&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-find-out-who-holds-the-port"&gt;Find out who holds the port&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-fix-1---start-the-container-on-a-different-port"&gt;Fix 1 - Start the container on a different port&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-fix-2---stop-the-container-or-process-that-holds-the-port"&gt;Fix 2 - Stop the container or process that holds the port&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-fix-3---restart-the-docker-daemon-stale-docker-proxy-or-iptables"&gt;Fix 3 - Restart the Docker daemon (stale docker-proxy or iptables)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-docker-compose-the-same-error-and-the-same-fixes"&gt;docker compose: the same error and the same fixes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-the-error-reproduced-and-what-each-part-of-it-means"&gt;1. The error, reproduced, and what each part of it means&lt;/h2&gt;
&lt;p&gt;I first hit this years ago trying to run a Spring Boot container on port 1313 while a Hugo dev server was already listening there. Here is the modern version of the error, which I reproduced on 2026-10-12 by starting two nginx containers on the same host port -&lt;/p&gt;</description></item><item><title>Delete Kubernetes POD stuck in terminating state?</title><link>https://jhooq.com/k8s-delete-pod-stuck-terminating-state/</link><pubDate>Wed, 08 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/k8s-delete-pod-stuck-terminating-state/</guid><description>
&lt;br/&gt;
&lt;p&gt;The deletion of the &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/"&gt;Kubernetes POD&lt;/a&gt; depends on many factors, before you execute the &lt;em&gt;&lt;strong&gt;kubectl delete pod&lt;/strong&gt;&lt;/em&gt; command you should go through the following checkpoint -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is the container associated with POD still running?&lt;/li&gt;
&lt;li&gt;Are there any active Kubernetes deployment associated with POD?&lt;/li&gt;
&lt;li&gt;Check if the POD &lt;a href="https://jhooq.com/k8s-delete-pv-pvc"&gt;persistent volume and persistent volume claim&lt;/a&gt; still exist?&lt;/li&gt;
&lt;li&gt;Check if the host is running out of memory?&lt;/li&gt;
&lt;li&gt;Are there any &lt;a href="https://kubernetes.io/blog/2021/05/14/using-finalizers-to-control-deletion/#understanding-finalizers"&gt;Finalizer&lt;/a&gt; associated with the POD?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you have done the preliminary check based on the above-mentioned points then you can aim for deletion of the POD otherwise you should not issue &lt;em&gt;kubectl delete pod&lt;/em&gt; command because it will lead you to &lt;em&gt;&lt;strong&gt;terminating&lt;/strong&gt;&lt;/em&gt; state forever.&lt;/p&gt;</description></item><item><title>How to Delete PV(Persistent Volume) and PVC(Persistent Volume Claim) stuck in terminating state?</title><link>https://jhooq.com/k8s-delete-pv-pvc/</link><pubDate>Tue, 07 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/k8s-delete-pv-pvc/</guid><description>
&lt;br/&gt;
&lt;p&gt;The &lt;strong&gt;deletion of PV(Persistent Volume) and PVC(Persistent Volume claim)&lt;/strong&gt; is pretty much dependent on the Delete
reclaim policy. When you are planning to delete the &lt;strong&gt;Persistent Volume&lt;/strong&gt; as well as &lt;strong&gt;Persistent Volume Claim&lt;/strong&gt;
then you must follow an order -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First delete - Persistent Volume Claim&lt;/li&gt;
&lt;li&gt;Second delete- Persistent Volume&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;(Note* - You should never delete PV(Persistent Volume) without deleting its PVC(Persistent Volume Claim))&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this blog we will address on -&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Securing AWS secrets using HashiCorp Vault with Terraform?</title><link>https://jhooq.com/hashi-vault-aws-secret-terraform/</link><pubDate>Sun, 05 Dec 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/hashi-vault-aws-secret-terraform/</guid><description>
&lt;br/&gt;
&lt;p&gt;For managing the &lt;em&gt;cloud resources(EC2, S3 Bucket)&lt;/em&gt; on &lt;em&gt;AWS&lt;/em&gt; you need to supply the &lt;em&gt;AWS secrets(region, access_key, secret_key)&lt;/em&gt; inside the terraform file. You can use the plain text &lt;a href="https://aws.amazon.com/secrets-manager/"&gt;&lt;em&gt;AWS Secrets&lt;/em&gt;&lt;/a&gt; inside your terraform file and it should work fine. But from the security standpoint, it is strongly discouraged to use &lt;em&gt;plain text AWS Secretes&lt;/em&gt; for provisioning your infrastructure using terraform.&lt;/p&gt;
&lt;p&gt;Also &lt;em&gt;AWS credentials&lt;/em&gt; have a long-lived scoped which makes it more vulnerable for security attacks and if you are storing long-lived &lt;em&gt;AWS secrets&lt;/em&gt; as plain text then you are putting the complete AWS cloud infra at security risk because of bad security practices.&lt;/p&gt;</description></item><item><title>exec - executable file not found in $PATH (or %PATH%) in Docker - every cause and fix, inside the container and on the host</title><link>https://jhooq.com/docker-error-executable-file/</link><pubDate>Thu, 25 Nov 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-error-executable-file/</guid><description>
&lt;!-- no-video: no companion video for this error yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read the line before the error.&lt;/strong&gt; &lt;code&gt;OCI runtime create failed ... exec: &amp;quot;bash&amp;quot;&lt;/code&gt; is &lt;strong&gt;inside the container&lt;/strong&gt;: the image cannot find that program. &lt;code&gt;error: exec: &amp;quot;docker&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;docker-compose&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;docker-credential-desktop&amp;quot;&lt;/code&gt; is &lt;strong&gt;on your host&lt;/strong&gt;: a tool cannot find a Docker binary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inside the container&lt;/strong&gt;, the five causes are: the program is not in the image (&lt;code&gt;bash&lt;/code&gt; on alpine - use &lt;code&gt;sh&lt;/code&gt;), an exec-form &lt;code&gt;CMD [&amp;quot;python app.py&amp;quot;]&lt;/code&gt; with the whole command in one string (split it: &lt;code&gt;[&amp;quot;python&amp;quot;, &amp;quot;app.py&amp;quot;]&lt;/code&gt;), a tool installed outside &lt;code&gt;PATH&lt;/code&gt;, an entrypoint without the execute bit (exit 126, &lt;code&gt;permission denied&lt;/code&gt;), and Windows CRLF line endings in the shebang (exit 255, &lt;code&gt;no such file or directory&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On the host&lt;/strong&gt;: put the Docker CLI on &lt;code&gt;PATH&lt;/code&gt; (on Windows the message says &lt;code&gt;%PATH%&lt;/code&gt;), replace &lt;code&gt;docker-compose&lt;/code&gt; with &lt;code&gt;docker compose&lt;/code&gt; because Compose v1 is retired, and remove &lt;code&gt;&amp;quot;credsStore&amp;quot;: &amp;quot;desktop&amp;quot;&lt;/code&gt; from &lt;code&gt;~/.docker/config.json&lt;/code&gt; on machines without Docker Desktop.&lt;/li&gt;
&lt;li&gt;Exit code tells you which: &lt;strong&gt;127&lt;/strong&gt; = not found, &lt;strong&gt;126&lt;/strong&gt; = found but not executable.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 and Go 1.24.13 on Ubuntu 24.04, captured on 2026-10-14.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-edit-file-inside-container/"&gt;How to edit file within Docker container or edit a file after I shell into a...&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-executable-file-not-found/executable-not-found-where.svg"
title="Where executable file not found in PATH comes from - the container or the host"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Where executable file not found in PATH comes from - the container or the host&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>download s3 bucket - How to Download an Entire S3 Bucket or Folder with aws s3 sync and aws s3 cp --recursive (Real Output), Plus MinIO mc, s3cmd and Cyberduck</title><link>https://jhooq.com/aws-download-s3-bucket/</link><pubDate>Sat, 20 Nov 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-download-s3-bucket/</guid><description>
&lt;!-- no-video: no companion video for S3 bulk download yet; the S3 course playlist covers buckets and the CLI --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The command:&lt;/strong&gt; &lt;code&gt;aws s3 sync s3://&amp;lt;bucket&amp;gt;[/prefix] /local/dir&lt;/code&gt;. It downloads everything under the bucket or prefix, keeps the folder structure, and on the next run transfers &lt;strong&gt;only what changed&lt;/strong&gt; - the second &lt;code&gt;sync&lt;/code&gt; in my test printed nothing and exited 0.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Measure first:&lt;/strong&gt; &lt;code&gt;aws s3 ls s3://&amp;lt;bucket&amp;gt;/&amp;lt;prefix&amp;gt; --recursive --summarize --human-readable | tail -2&lt;/code&gt; tells you how much you are about to pull. The prefix in this post is &lt;strong&gt;113.5 GiB in 141,310 objects&lt;/strong&gt;, which is why the examples filter it down to 5.6 MiB.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Filter:&lt;/strong&gt; &lt;code&gt;--exclude '*' --include 'AE*.csv'&lt;/code&gt; in that order (the last matching rule wins). &lt;code&gt;--dryrun&lt;/code&gt; prints what would be downloaded without downloading.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;aws s3 cp --recursive&lt;/code&gt;&lt;/strong&gt; does the same first download, but re-downloads everything on every run. Use it for a one-off copy, &lt;code&gt;sync&lt;/code&gt; for anything you will repeat.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No credentials?&lt;/strong&gt; Public buckets work with &lt;code&gt;--no-sign-request&lt;/code&gt;; everything else needs an identity, and AWS CLI 2.37 now says so with &lt;code&gt;Unable to locate credentials. You can configure credentials by running &amp;quot;aws login&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The alternatives (MinIO &lt;code&gt;mc&lt;/code&gt;, &lt;code&gt;s3cmd&lt;/code&gt;, Cyberduck) are below for machines where the AWS CLI is not an option. Every CLI output in this post is from aws-cli 2.37.11, captured on 2026-10-12 on Windows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/aws-s3-course/"&gt;Learn AWS S3&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-why-the-console-cannot-do-it-and-what-the-cli-does-instead"&gt;Why the console cannot do it, and what the CLI does instead&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-step-1---list-the-bucket-and-measure-what-you-are-about-to-download"&gt;Step 1 - List the bucket and measure what you are about to download&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-step-2---download-with-aws-s3-sync-with-filters-and-a-dry-run"&gt;Step 2 - Download with aws s3 sync (with filters and a dry run)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-sync-versus-cp---recursive"&gt;sync versus cp --recursive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-errors-you-will-see"&gt;Errors you will see&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-alternative-1---minio-mc"&gt;Alternative 1 - MinIO mc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-alternative-2---s3cmd"&gt;Alternative 2 - s3cmd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-alternative-3---cyberduck-gui"&gt;Alternative 3 - Cyberduck (GUI)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-why-the-console-cannot-do-it-and-what-the-cli-does-instead"&gt;1. Why the console cannot do it, and what the CLI does instead&lt;/h2&gt;
&lt;p&gt;Amazon S3 holds anything - text, images, data lakes, whole static websites - and the console lets you browse it, upload to it and download &lt;strong&gt;one object at a time&lt;/strong&gt;. Select more than one and the Download button goes grey -&lt;/p&gt;</description></item><item><title>Share kubernetes secrets between namespaces?</title><link>https://jhooq.com/kubernetes-share-secrets-namespaces/</link><pubDate>Fri, 12 Nov 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-share-secrets-namespaces/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://kubernetes.io/docs/concepts/configuration/secret/"&gt;Kubernetes secrets&lt;/a&gt; are API objects which can only be referenced by POD, so if you are working in multiple
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/"&gt;namespaces&lt;/a&gt; then &lt;em&gt;&lt;strong&gt;you can not share the same kubernetes secrets.&lt;/strong&gt;&lt;/em&gt; Although &lt;em&gt;&lt;strong&gt;it is possible to copy the same
kubernetes into the desired namespace&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/kubernetes/kubernetes-share-secret/kubernetes-secret-share.webp"
title="Create kubernetes
namespace testns1"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Create kubernetes
namespace testns1&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;In this blog post we are going to talk about alternate ways to share the secret between the multiple kubernetes namespace.&lt;/p&gt;</description></item><item><title>How to use Kubernetes secrets?</title><link>https://jhooq.com/kubernetes-secrets/</link><pubDate>Mon, 08 Nov 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-secrets/</guid><description>
&lt;br/&gt;
&lt;p&gt;Before we jump onto &lt;a href="https://kubernetes.io/docs/concepts/configuration/secret/"&gt;kubernetes secrets&lt;/a&gt; let’s first try to understand &lt;em&gt;&lt;strong&gt;What is Secret?&lt;/strong&gt;&lt;/em&gt; - Secret is sensitive
information which can not be written in a plain text or shared with others. The best example of Secrets would be the &lt;em&gt;&lt;strong&gt;password&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But &lt;em&gt;&lt;strong&gt;Why do we need to use Kubernetes Secret?&lt;/strong&gt;&lt;/em&gt; - Running a bare minimum kubernetes cluster does need a kubernetes secret but when you start deploying a docker container application then there is need of Kubernetes Secret for storing sensitive data.&lt;/p&gt;</description></item><item><title>Validating Kubernetes Configurations with Datree</title><link>https://jhooq.com/using-datree/</link><pubDate>Mon, 08 Nov 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/using-datree/</guid><description>
&lt;br/&gt;
&lt;p&gt;Working with &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; is fun when your Kubernetes cluster is up and your nodes are working as you expected. But as a DevOps enthusiast who follows the principles of Continuous Integration and Continuous Delivery, you are aware that new changes or feature requests are always coming through the &lt;a href="https://www.jenkins.io/"&gt;Jenkins Pipeline&lt;/a&gt;, and eventually, you’ll have to deploy changes into the Kubernetes cluster which feeds into your production environment.&lt;/p&gt;
&lt;p&gt;In most cases, you will need to update your Kubernetes manifest YAMLs or &lt;a href="https://helm.sh/"&gt;Helm charts&lt;/a&gt; (Deployment, Service, or Pod) and apply those changes either directly into the Production or Staging or into the Test environment.&lt;/p&gt;</description></item><item><title>kubectl delete pod - delete one pod, all pods in a namespace, by label or status, force delete, and a pod stuck in Terminating (tested on Kubernetes v1.37)</title><link>https://jhooq.com/kubernetes-delete-pod/</link><pubDate>Sun, 24 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-delete-pod/</guid><description>
&lt;!-- no-video: the video previously attached here was about probes, not deleting pods; no companion video for this topic yet --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One pod:&lt;/strong&gt; &lt;code&gt;kubectl delete pod NAME -n NAMESPACE&lt;/code&gt;. If a Deployment owns it, the ReplicaSet creates a replacement within seconds; in my run the delete took 2.3 seconds and the new pod was &lt;code&gt;Running&lt;/code&gt; 5 seconds later.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All pods in a namespace:&lt;/strong&gt; &lt;code&gt;kubectl delete pods --all -n NAMESPACE&lt;/code&gt;. Owned pods come back, bare pods are gone for good.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stop them coming back:&lt;/strong&gt; delete the owner, &lt;code&gt;kubectl delete deployment NAME&lt;/code&gt;, not the pods.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Only the broken ones:&lt;/strong&gt; &lt;code&gt;kubectl delete pods --field-selector=status.phase=Failed -n NAMESPACE&lt;/code&gt; removes crashed and evicted pods and leaves running ones alone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Force:&lt;/strong&gt; &lt;code&gt;--grace-period=0 --force&lt;/code&gt; returned in 70 ms where a normal delete of a pod ignoring SIGTERM took 60.7 seconds. It does &lt;strong&gt;not&lt;/strong&gt; help with a pod stuck in &lt;code&gt;Terminating&lt;/code&gt; because of a finalizer; &lt;code&gt;kubectl patch pod NAME -p '{&amp;quot;metadata&amp;quot;:{&amp;quot;finalizers&amp;quot;:null}}' --type=merge&lt;/code&gt; does.&lt;/li&gt;
&lt;li&gt;Every output below is from a kind cluster running Kubernetes v1.37.0 with kubectl v1.37.1, captured on 2026-10-15.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/kubernetes-pod-recreated/"&gt;kubectl recreate pods&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/kubernetes/kubernetes-delete-pod/kubectl-delete-pod-decision.svg"
title="Which kubectl delete command to use, by what you want to happen"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Which kubectl delete command to use, by what you want to happen&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>kubectl recreate pods - Why a Deleted Pod Comes Back in Seconds, How to Recreate Pods on Purpose (rollout restart) and How to Delete Them for Good (Deployment, ReplicaSet, DaemonSet, StatefulSet, Job)</title><link>https://jhooq.com/kubernetes-pod-recreated/</link><pubDate>Fri, 22 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-pod-recreated/</guid><description>
&lt;!-- no-video: no companion video for this one yet; the Kubernetes playlist covers deployments and pods --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A deleted pod comes back because a controller owns it.&lt;/strong&gt; On my test cluster the ReplicaSet replaced the pod &lt;strong&gt;9 seconds&lt;/strong&gt; after &lt;code&gt;kubectl delete pod&lt;/code&gt;. Deleting the ReplicaSet does not help either - the Deployment recreated it within 5 seconds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Find the owner in one command:&lt;/strong&gt; &lt;code&gt;kubectl get pod &amp;lt;name&amp;gt; -o jsonpath='{.metadata.ownerReferences[*].kind}/{.metadata.ownerReferences[*].name}'&lt;/code&gt; (or &lt;code&gt;kubectl describe pod &amp;lt;name&amp;gt; | grep &amp;quot;Controlled By&amp;quot;&lt;/code&gt;), then repeat on the owner until there is none. Act on the &lt;strong&gt;top&lt;/strong&gt; of the chain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To recreate pods on purpose&lt;/strong&gt; (new image, new ConfigMap, &amp;quot;just restart it&amp;quot;): &lt;code&gt;kubectl rollout restart deployment/&amp;lt;name&amp;gt;&lt;/code&gt;. It replaces the pods one by one; &lt;code&gt;rollout status&lt;/code&gt; tells you when it is done. Deleting pods by hand does the same thing with downtime and no rollback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;To stop the pods:&lt;/strong&gt; &lt;code&gt;kubectl scale deployment &amp;lt;name&amp;gt; --replicas=0&lt;/code&gt; keeps everything else; &lt;code&gt;kubectl delete deployment &amp;lt;name&amp;gt;&lt;/code&gt; removes the application. For a StatefulSet scale or delete the StatefulSet (PVCs stay), for a DaemonSet delete it or relabel the node, for a CronJob suspend it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A bare pod&lt;/strong&gt; (&lt;code&gt;kubectl run&lt;/code&gt;, no owner) stays deleted. &lt;strong&gt;Static pods&lt;/strong&gt;, Helm releases, operators and GitOps controllers recreate things from outside the ownerReferences chain - &lt;a href="#9-no-owner-but-it-still-comes-back---static-pods-helm-operators-and-gitops"&gt;section 9&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;All output below is from a kind v0.33.0 cluster running Kubernetes v1.37.0 with kubectl v1.37.1, captured on 2026-10-12.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/get-yaml-for-deployed-kubernetes-resources/"&gt;kubectl get YAML&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One day I was working with my local &lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;Kubernetes cluster which I set up using Kubespray&lt;/a&gt; and I was deploying my docker container into it. Since it was a local cluster I had done a couple of deployments before, and after each one I was deleting the &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/"&gt;Kubernetes POD&lt;/a&gt;, the deployment and the service.&lt;/p&gt;</description></item><item><title>How to use Helmfile for managing helm chart?</title><link>https://jhooq.com/helmfile-manage-helmchart/</link><pubDate>Sat, 16 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/helmfile-manage-helmchart/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://github.com/roboll/helmfile"&gt;Helmfile&lt;/a&gt; is an another wrapper working on top of &lt;a href="https://helm.sh/docs/topics/charts/"&gt;Helm Chart&lt;/a&gt;. Just like Helm Chart, Helmfile also uses the &lt;a href="https://yaml.org/"&gt;YAML&lt;/a&gt; for writing the configurations.&lt;/p&gt;
&lt;p&gt;But why do you need &lt;strong&gt;Helmfile&lt;/strong&gt; if you are working with &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; and Helm Chart?&lt;/p&gt;
&lt;p&gt;Here are some key benfits of using &lt;strong&gt;Helmfile&lt;/strong&gt; -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can bundle several Helm Charts into a Single Helmfile to manage your kubernetes eco system&lt;/li&gt;
&lt;li&gt;Helmfile helps you to keep isolation between the different environments(developemnt, staging, production)&lt;/li&gt;
&lt;li&gt;It can help you to identify the differences between the new changes which you want to apply against the existing running deployment inside kubernetes cluster&lt;/li&gt;
&lt;li&gt;Helmfile uses the &lt;a href="https://godoc.org/text/template"&gt;Go Templates&lt;/a&gt; which lets you templatify your &lt;strong&gt;Helmfile&lt;/strong&gt; and also you can use &lt;a href="https://pkg.go.dev/github.com/Masterminds/sprig"&gt;Sprig Library&lt;/a&gt; with functions - requiredEnv, exec, readFile, toYaml, fromYaml, setValueAtPath, get, tpl, required, fetchSecretValue, expandSecretRefs&lt;/li&gt;
&lt;li&gt;With the help of HelmFile you can deploy multi-tier applications inside kubernetes cluster.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This blog post will be a complete guide for anyone who want to learn Helfile for managing the HelmChart.&lt;/p&gt;</description></item><item><title>How to ssh into vagrant without using vagrant SSH?</title><link>https://jhooq.com/vagrant-ssh-without-vagrant-ssh/</link><pubDate>Sun, 10 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/vagrant-ssh-without-vagrant-ssh/</guid><description>
&lt;br/&gt;
&lt;p&gt;I have been using &lt;a href="https://www.vagrantup.com/"&gt;vagrant&lt;/a&gt; for quite some time on my development laptop for work as well as for learning purposes. But one thing which I noticed working with Vagrant is you have to use &lt;a href="https://www.vagrantup.com/docs/cli/ssh"&gt;&lt;strong&gt;vagrant ssh&lt;/strong&gt;&lt;/a&gt; every time whenever you want to login into your virtual machine and in case if you have multiple virtual machine configured into your &lt;strong&gt;Vagrantfile&lt;/strong&gt; then you have to put down the config.vm.hostname along with vagrant ssh command for example &lt;em&gt;&lt;strong&gt;vagrant ssh myvirtualmachine&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>4 Ways to Add SSH public key to Vagrant VM(Virtual Machine)?</title><link>https://jhooq.com/vagrant-copy-public-key/</link><pubDate>Fri, 08 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/vagrant-copy-public-key/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.vagrantup.com/"&gt;Vagrant&lt;/a&gt; helped developers to create a very lightweight, portable development machine which can be destroyed and recreated on the fly. When it comes to starting a virtual machine onto your development environment vagrant helps you to spin up the virtual machine with very few lines of codes.&lt;/p&gt;
&lt;p&gt;But while working with Vagrant on my development environment one day I had a need to copy my public ssh keys to one of my virtual machines which I started using vagrant.&lt;/p&gt;</description></item><item><title>Implementing Kubernetes liveness, Readiness and Startup probes with Spring Boot Microservice Application?</title><link>https://jhooq.com/kubernetes-liveness-readiness-startup-probes/</link><pubDate>Fri, 08 Oct 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-liveness-readiness-startup-probes/</guid><description>
&lt;br/&gt;
&lt;p&gt;Maintaining a healthy &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; cluster is really challenging especially if you have not configured the Liveness, Readiness and Startup Probes correctly for your containers deployed under kubernetes containers.&lt;/p&gt;
&lt;p&gt;If I have to put in a simple way -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Liveness probes -&lt;/strong&gt; It is responsible for restarting your container, if it senses a deadlock.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/kubernetes/kubernetes-probes/liveness-probes.webp"
title="Kubernetes liveness probes"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Kubernetes liveness probes&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;&lt;strong&gt;Readiness probes -&lt;/strong&gt; This probe will tell when the container is ready to start traffic.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/kubernetes/kubernetes-probes/startup-probes.webp"
title="Kubernetes readiness probes"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Kubernetes readiness probes&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to expose port on live containers?</title><link>https://jhooq.com/expose-port-on-live-container/</link><pubDate>Tue, 21 Sep 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/expose-port-on-live-container/</guid><description>
&lt;br/&gt;
&lt;p&gt;As DevOps, we often make quite a lot of mistakes and one of the most oversight mistakes we generally do is &lt;em&gt;&lt;strong&gt;forget to expose a port for the container&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;When you realize that you have not exposed any port for the container then you start looking for ways to change the port mapping of a live container or in other words, we can say &lt;em&gt;&lt;strong&gt;Is there a way to expose a port on a live running container&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>How to expose multiple ports with Docker?</title><link>https://jhooq.com/expose-multiple-ports-of-docker/</link><pubDate>Thu, 16 Sep 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/expose-multiple-ports-of-docker/</guid><description>
&lt;br/&gt;
&lt;p&gt;When we package any application using Docker then either we create &lt;strong&gt;Dockerfile&lt;/strong&gt; or &lt;strong&gt;docker-compose.yaml&lt;/strong&gt;, even you can create both the files and share the files with others. There is one important aspect in both the files .i.e. &lt;em&gt;&lt;strong&gt;PORT&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Any container which you build and ship to other developers has to have one or more defined &lt;em&gt;&lt;strong&gt;PORT&lt;/strong&gt;&lt;/em&gt; on which it can run and expose the services. As a rule of thumb, there should be at least one &lt;em&gt;&lt;strong&gt;PORT&lt;/strong&gt;&lt;/em&gt; defined inside either &lt;strong&gt;Dockerfile&lt;/strong&gt; or &lt;strong&gt;docker-compose.yaml&lt;/strong&gt;. In some cases, the docker container can take some random port that is available inside the host machine in case you haven't defined any specific port.&lt;/p&gt;</description></item><item><title>How to delete all the Git, BitBucket branches which have been merged?</title><link>https://jhooq.com/git-delete-merged-branches/</link><pubDate>Thu, 26 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/git-delete-merged-branches/</guid><description>
&lt;br/&gt;
&lt;p&gt;I usually work with multiple projects at once and whenever there is a new feature on which I had to work, I usually create a &lt;em&gt;&lt;strong&gt;new Branch&lt;/strong&gt;&lt;/em&gt; from my &lt;em&gt;&lt;strong&gt;Master branch&lt;/strong&gt;&lt;/em&gt; and once I am done with the new feature I do create a pull request and after the approval, I do merge my changes from my &lt;em&gt;&lt;strong&gt;new Branch&lt;/strong&gt;&lt;/em&gt; to my &lt;em&gt;&lt;strong&gt;Master branch&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Well, this workflow of creating &lt;em&gt;&lt;strong&gt;new Branch&lt;/strong&gt;&lt;/em&gt; from &lt;em&gt;&lt;strong&gt;Master&lt;/strong&gt;&lt;/em&gt; is pretty widely used across the developer community for the &lt;a href="https://www.redhat.com/en/topics/devops/what-is-ci-cd"&gt;Continuous Integration and Continuous delivery&lt;/a&gt; but there are some side effects with this workflow.&lt;/p&gt;</description></item><item><title>fatal: unable to update url base from redirection - What It Means and the 5 Causes (git clone, git push, proxy login page, wrong URL, renamed repo)</title><link>https://jhooq.com/github-unable-to-update-URL/</link><pubDate>Mon, 23 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/github-unable-to-update-URL/</guid><description>
&lt;!-- no-video: no companion video for this git error yet; the GitHub SSH and SSL errors are covered in the SSL playlist --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it means:&lt;/strong&gt; git sent its first request (&lt;code&gt;GET &amp;lt;your-url&amp;gt;/info/refs?service=git-upload-pack&lt;/code&gt; for clone and fetch, &lt;code&gt;git-receive-pack&lt;/code&gt; for push) and the server answered with a &lt;strong&gt;redirect to a different path&lt;/strong&gt;. git only follows a redirect that keeps the same &lt;code&gt;/info/refs?service=...&lt;/code&gt; tail; anything else, for example &lt;code&gt;/404.html&lt;/code&gt; or &lt;code&gt;/login&lt;/code&gt;, triggers &lt;em&gt;unable to update url base from redirection&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The two lines under the error tell you everything:&lt;/strong&gt; &lt;code&gt;asked for:&lt;/code&gt; is the URL git built from your remote, &lt;code&gt;redirect:&lt;/code&gt; is where the server tried to send it. If the redirect ends in &lt;code&gt;404.html&lt;/code&gt;, the repository URL is wrong or the repository is gone. If it ends in a login page, you are behind a proxy, VPN portal or captive Wi-Fi page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix in 90% of cases:&lt;/strong&gt; &lt;code&gt;git remote -v&lt;/code&gt;, then &lt;code&gt;git remote set-url origin https://github.com/&amp;lt;user&amp;gt;/&amp;lt;repo&amp;gt;.git&lt;/code&gt; with the URL copied from the repository page. For the proxy case, connect to the VPN or clear &lt;code&gt;http.proxy&lt;/code&gt; and &lt;code&gt;HTTPS_PROXY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On GitHub, a missing &lt;code&gt;.git&lt;/code&gt; suffix is fine&lt;/strong&gt; (I checked with git 2.55: &lt;code&gt;git ls-remote https://github.com/rahulwagh/vpc-subnet-planner&lt;/code&gt; works). A deleted or private repository gives a different error, &lt;code&gt;remote: Repository not found.&lt;/code&gt; The redirect error on GitHub today almost always means a typo that lands on a user page, or a proxy in between.&lt;/li&gt;
&lt;li&gt;Reproduced below on 2026-10-12 with git 2.55.0 for both &lt;code&gt;clone&lt;/code&gt; and &lt;code&gt;push&lt;/code&gt;, against a server that redirects to a 404 page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/github-permission-denied-publickey/"&gt;git@github.com&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-the-error-means-with-the-real-output"&gt;What the error means, with the real output&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-5-causes-and-how-to-tell-them-apart-in-one-command"&gt;The 5 causes and how to tell them apart in one command&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-cause-1---the-repository-url-is-wrong-or-the-repository-is-gone"&gt;Cause 1 - the repository URL is wrong or the repository is gone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-cause-2---a-proxy-vpn-portal-or-captive-wi-fi-page-answers-instead-of-the-server"&gt;Cause 2 - a proxy, VPN portal or captive Wi-Fi page answers instead of the server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-cause-3---the-remote-url-is-stale-after-a-rename-or-transfer"&gt;Cause 3 - the remote URL is stale after a rename or transfer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-cause-4---http-instead-of-https-or-a-mirror-that-moved"&gt;Cause 4 - http instead of https, or a mirror that moved&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-cause-5---an-editor-or-tool-with-its-own-proxy-setting"&gt;Cause 5 - an editor or tool with its own proxy setting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-errors-that-look-similar-but-are-not-this-one"&gt;Errors that look similar but are not this one&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-what-the-error-means-with-the-real-output"&gt;1. What the error means, with the real output&lt;/h2&gt;
&lt;p&gt;I first hit this years ago while &lt;a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository"&gt;cloning one of my own repositories&lt;/a&gt; with a URL I had copied wrong. Here is the error exactly as git 2.55.0 prints it today. I reproduced it on 2026-10-12 with a small local server that answers the way a 404 page or a proxy login page does - it redirects git's very first request to a different path -&lt;/p&gt;</description></item><item><title>How to use Workspaces in Terraform?</title><link>https://jhooq.com/terraform-workspaces/</link><pubDate>Wed, 18 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-workspaces/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.terraform.io/docs/language/state/workspaces.html"&gt;Terraform worksapces&lt;/a&gt; is a very logical concept where you can have multiple states of your infrastructure configuration. To put this in simple words if you are running an infrastructure configuration in &lt;em&gt;development&lt;/em&gt; environment then the same infrastructure can be run in the &lt;em&gt;production&lt;/em&gt; environment.&lt;/p&gt;
&lt;p&gt;The main benefit of terraforming workspaces we get is we can have more than one state associated with a single terraform configuration.&lt;/p&gt;
&lt;p&gt;If you have not defined any workspace then there is always a &lt;code&gt;default&lt;/code&gt; workspace created by terraform, so you always work in a default workspace of terraform. You can list the number of terraform workspaces by running the command &lt;code&gt;terraform workspace show&lt;/code&gt;. Also, you can not delete the &lt;code&gt;default&lt;/code&gt; workspace&lt;/p&gt;</description></item><item><title>How to run specific terraform resource, module, target?</title><link>https://jhooq.com/terraform-run-specific-resource/</link><pubDate>Sun, 15 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-run-specific-resource/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; file always grows as you span your infrastructure and add multiple servers to your cloud-hosted infrastructure.&lt;/p&gt;
&lt;p&gt;But imagine you have terraform file which contains lots of resources but you only do not want to apply the complete terraform configuration but instead, you just want to run one specific or some specific resource out of your Terraform configuration.&lt;/p&gt;
&lt;p&gt;So to run specific resources in &lt;a href="https://www.hashicorp.com/blog/resource-targeting-in-terraform"&gt;terraform you should use &lt;code&gt;-target=resource&lt;/code&gt; which will help you to target specific resources&lt;/a&gt; instead of applying complete terraform configuration.&lt;/p&gt;</description></item><item><title>docker restart container - Restart One Container (or One Compose Service) Without Touching the Others, with Real Output from Docker 28</title><link>https://jhooq.com/docker-restart-single-container/</link><pubDate>Wed, 11 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-restart-single-container/</guid><description>
&lt;!-- no-video: no companion video for this one yet; the docker basics are in the Docker playlist --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One container:&lt;/strong&gt; &lt;code&gt;docker restart &amp;lt;name-or-id&amp;gt;&lt;/code&gt;. Only that container stops and starts again; the others keep running. Reproduced below with nginx, redis and postgres side by side.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grace period:&lt;/strong&gt; &lt;code&gt;docker restart --timeout 30 &amp;lt;name&amp;gt;&lt;/code&gt; waits up to 30 seconds for the process to exit cleanly before killing it. The default is &lt;strong&gt;10 seconds&lt;/strong&gt;, and &lt;code&gt;--time&lt;/code&gt; still works but prints &lt;code&gt;Flag --time has been deprecated, use --timeout instead&lt;/code&gt; on Docker 28.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Several or all:&lt;/strong&gt; &lt;code&gt;docker restart api cache&lt;/code&gt;, or &lt;code&gt;docker restart $(docker ps -q)&lt;/code&gt; for every running container.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What survives:&lt;/strong&gt; files written inside the container's own filesystem survive a restart (it is the same container, only the process is replaced). What does &lt;strong&gt;not&lt;/strong&gt; survive is anything in memory, and the container's IP address can change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compose:&lt;/strong&gt; &lt;code&gt;docker compose restart web&lt;/code&gt; restarts one service's containers. It does &lt;strong&gt;not&lt;/strong&gt; re-read the compose file or pull a new image - for that use &lt;code&gt;docker compose up -d web&lt;/code&gt; (or &lt;code&gt;--force-recreate&lt;/code&gt;), which recreates only the containers whose definition changed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic restarts:&lt;/strong&gt; &lt;code&gt;--restart unless-stopped&lt;/code&gt; (or &lt;code&gt;restart: unless-stopped&lt;/code&gt; in compose) makes Docker restart the container after a crash or a reboot, so you do not have to.&lt;/li&gt;
&lt;li&gt;All output below is from Docker 28.0.4 and Compose v2.38.2 on Ubuntu 24.04, captured on 2026-10-12.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-attach-detach-process/"&gt;Detach from a Docker container without stopping it&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-restart-a-single-container-with-docker-restart"&gt;Restart a single container with docker restart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-grace-period---timeout-and-the-deprecated---time"&gt;The grace period: --timeout (and the deprecated --time)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-restart-several-containers-or-all-of-them"&gt;Restart several containers, or all of them&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-what-survives-a-restart-and-what-does-not"&gt;What survives a restart and what does not&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-docker-compose-restart-one-service"&gt;docker compose: restart one service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-when-restart-is-not-enough-recreate-with-up--d-or-rebuild-from-scratch"&gt;When restart is not enough: recreate with up -d, or rebuild from scratch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-let-docker-restart-it-for-you-restart-policies"&gt;Let Docker restart it for you: restart policies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-restart-a-single-container-with-docker-restart"&gt;1. Restart a single container with docker restart&lt;/h2&gt;
&lt;p&gt;I use Docker every day precisely because it isolates things, and the question I had early on was simple: with five containers running, how do I restart just one after a config change without disturbing the rest? The answer is the &lt;a href="https://docs.docker.com/reference/cli/docker/container/restart/"&gt;docker restart&lt;/a&gt; command with the container's name or ID.&lt;/p&gt;</description></item><item><title>How Terraform Modules Work: Write a Module, Test It with terraform test, Version It and Rename It with moved Blocks (Terraform 1.17)</title><link>https://jhooq.com/terraform-module/</link><pubDate>Mon, 09 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-module/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; A Terraform module is any directory of &lt;code&gt;.tf&lt;/code&gt; files; the directory you run &lt;code&gt;terraform apply&lt;/code&gt; in is the root module, and every &lt;code&gt;module&lt;/code&gt; block calls a child module from it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A module needs three files to be useful: &lt;code&gt;main.tf&lt;/code&gt;, &lt;code&gt;variables.tf&lt;/code&gt; and &lt;code&gt;outputs.tf&lt;/code&gt;, which is the layout &lt;a href="https://raw.githubusercontent.com/hashicorp/web-unified-docs/main/content/terraform/v1.17.x/docs/language/modules/develop/structure.mdx"&gt;the Terraform docs recommend&lt;/a&gt; for a minimal module.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;terraform test&lt;/code&gt; needs Terraform 1.6.0 or later and finds files ending in &lt;code&gt;.tftest.hcl&lt;/code&gt; or &lt;code&gt;.tftest.json&lt;/code&gt;. On 2026-10-30 with Terraform 1.17.1 my test file passed 3 of 3 runs.&lt;/li&gt;
&lt;li&gt;Renaming a &lt;code&gt;module&lt;/code&gt; block without a &lt;code&gt;moved&lt;/code&gt; block plans 1 to add and 1 to destroy. With the &lt;code&gt;moved&lt;/code&gt; block the same plan is 0 to add, 0 to change, 0 to destroy. &lt;code&gt;moved&lt;/code&gt; needs Terraform 1.1 or later.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;version&lt;/code&gt; on a module with a local path source fails at &lt;code&gt;terraform init&lt;/code&gt;. Only registry modules are versioned.&lt;/li&gt;
&lt;li&gt;If your problem is a module output that another module cannot read, go to &lt;a href="https://jhooq.com/terraform-reference-module-output/"&gt;Terraform: reference a module output&lt;/a&gt; instead.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;The first version of this post, from 2021, built two modules that installed Apache on EC2 instances. It needed an AWS account and a security group open to the world just to see a module work. I rewrote it so that every command runs on your laptop with no cloud credentials, and added the two things people actually search for after the basics: how to test a module and how to rename one safely. The EC2 version of the idea is in &lt;a href="https://jhooq.com/terraform-ec2-instance-setup/"&gt;Terraform EC2 instance setup&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to edit file within Docker container or edit a file after I shell into a Docker container?</title><link>https://jhooq.com/docker-edit-file-inside-container/</link><pubDate>Thu, 05 Aug 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-edit-file-inside-container/</guid><description>
&lt;p&gt;While working on my &lt;a href="https://jhooq.com/spring-boot-with-docker/"&gt;Spring Boot Microservices with Docker&lt;/a&gt; I felt a need to edit some of the files present under my docker container.&lt;/p&gt;
&lt;p&gt;But when I tried to edit the file &lt;code&gt;nano application.yaml&lt;/code&gt; it throws me an error &lt;code&gt;bash: nano: command not found&lt;/code&gt;. So I was not able to edit the file which is present inside my running docker container.&lt;/p&gt;
&lt;p&gt;After spending some time on google and thinking about the issue I realized docker never encourages you to edit or change anything present inside the docker container.&lt;/p&gt;</description></item><item><title>Failed to start docker.service: Unit docker.service not found - the fix on CentOS, Rocky and RHEL 9 (and why dnf install docker makes it worse)</title><link>https://jhooq.com/docker-daemon-centos/</link><pubDate>Sat, 24 Jul 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-daemon-centos/</guid><description>
&lt;!-- no-video: no companion video for the docker.service error yet; the Docker install is covered in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The message is literal.&lt;/strong&gt; &lt;code&gt;Failed to start docker.service: Unit docker.service not found.&lt;/code&gt; means there is no file called &lt;code&gt;docker.service&lt;/code&gt; under &lt;code&gt;/usr/lib/systemd/system/&lt;/code&gt;. Docker Engine is not installed, however many &lt;code&gt;docker&lt;/code&gt; commands you have run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;dnf install docker&lt;/code&gt; does not install Docker on CentOS, Rocky or RHEL 9.&lt;/strong&gt; It installs &lt;code&gt;podman-docker&lt;/code&gt;, a shim that makes the &lt;code&gt;docker&lt;/code&gt; command run Podman. There is still no &lt;code&gt;docker.service&lt;/code&gt;, and the shim then blocks the real thing: &lt;code&gt;package docker-ce conflicts with docker provided by podman-docker&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix:&lt;/strong&gt; &lt;code&gt;dnf remove podman-docker&lt;/code&gt;, add Docker's own repository, &lt;code&gt;dnf install docker-ce docker-ce-cli containerd.io&lt;/code&gt;, then &lt;code&gt;systemctl enable --now docker&lt;/code&gt;. On my Rocky 9.8 test machine the install took 25 seconds and the daemon was &lt;code&gt;active (running)&lt;/code&gt; 6 seconds later.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Two other causes with different text:&lt;/strong&gt; &lt;code&gt;Unit docker.service is masked&lt;/code&gt; (fix: &lt;code&gt;systemctl unmask docker&lt;/code&gt;) and a &lt;code&gt;docker.socket&lt;/code&gt; that is active while &lt;code&gt;docker&lt;/code&gt; shows inactive, which is normal socket activation, not an error.&lt;/li&gt;
&lt;li&gt;Every output below is from Rocky Linux 9.8 with systemd 252, captured on 2026-10-15.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-daemon-centos/docker-service-unit-not-found-causes.svg"
title="The three causes of Unit docker.service not found and the fix for each"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The three causes of Unit docker.service not found and the fix for each&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to remove old, unused images of Docker?</title><link>https://jhooq.com/docker-remove-unused-images/</link><pubDate>Sat, 24 Jul 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-remove-unused-images/</guid><description>
&lt;br/&gt;
&lt;p&gt;There are times in a project where you have been working for quite a long time and you create and tag &lt;a href="https://docs.docker.com/"&gt;docker&lt;/a&gt; images on daily basis but after some time it is generally observed that we tend to forget how many docker images we have build and tagged.&lt;/p&gt;
&lt;p&gt;I do not see a problem in building and tagging a new docker image number of times but if you do not do the housekeeping of docker images properly you might soon consume all of disk space and then you need to look for commands which you can use for removing old, unused docker images.&lt;/p&gt;</description></item><item><title>Secure AWS EC2s &amp; GCP VMs with Terraform SSH Keys!</title><link>https://jhooq.com/terraform-ssh-into-aws-ec2/</link><pubDate>Tue, 20 Jul 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-ssh-into-aws-ec2/</guid><description>
&lt;br/&gt;
&lt;p&gt;This blog post will help you to understand -&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;How to manage SSH Keys for your EC2 Instance on &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;How to manage SSH Keys for Virtual Machine on &lt;a href="https://cloud.google.com/"&gt;GCP&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;When you work on cloud services such as &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;, &lt;a href="https://cloud.google.com/"&gt;Google Cloud&lt;/a&gt; you use Terraform to setup &lt;strong&gt;EC2&lt;/strong&gt; and &lt;strong&gt;VMs&lt;/strong&gt;. But to access those instances(EC2, VMS) you need to setup the SSH Keys.&lt;/p&gt;
&lt;p&gt;As all the cloud provider does not provide &lt;code&gt;password&lt;/code&gt; for the &lt;code&gt;root&lt;/code&gt; user. You have to use &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html"&gt;SSH key-pair(public key, private key)&lt;/a&gt; for authentication.&lt;/p&gt;</description></item><item><title>What is terraform provisioner?</title><link>https://jhooq.com/terraform-provisioner/</link><pubDate>Mon, 19 Jul 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-provisioner/</guid><description>
&lt;br/&gt;
&lt;p&gt;Terraform Provisioners are used to performing certain custom actions and tasks either on the local machine or on the remote machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The custom actions can vary in nature and it can be -&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Running custom shell script on the local machine&lt;/li&gt;
&lt;li&gt;Running custom shell script on the remote machine&lt;/li&gt;
&lt;li&gt;Copy file to the remote machine&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Also there are two types of provisioners -&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Generic Provisioners (file, local-exec, and remote-exec)&lt;/li&gt;
&lt;li&gt;Vendor Provisioners (chef, habitat, puppet, salt-masterless)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Generic Provisioners -&lt;/strong&gt; Generally vendor independent and can be used with any cloud vendor(GCP, AWS, AZURE)&lt;/p&gt;</description></item><item><title>How to fix Failed to get the data key required to decrypt the SOPS file?</title><link>https://jhooq.com/failed-to-get-the-data-key/</link><pubDate>Sat, 03 Jul 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/failed-to-get-the-data-key/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Here in this article, I have documented the steps which are needed for fixing the issue &lt;em&gt;&lt;strong&gt;Failed to get the data key required to decrypt the SOPS file. Group 0 FAILED&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Here are the instances where I faced this issue -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-how-to-fix-when-you-are-working-with-helm-chart-secretes"&gt;How to fix when you are working with Helm Chart Secretes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-how-to-fix-when-you-are-working-on-google-cloud"&gt;How to fix when you are working on Google cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-how-to-fix-when-you-are-working-with-helm-chart-secretes"&gt;1. How to fix when you are working with Helm Chart Secretes?&lt;/h2&gt;
&lt;p&gt;I had this issue when I was trying to view the &lt;code&gt;secrets.yaml&lt;/code&gt; while I was working with the &lt;a href="https://helm.sh/"&gt;helm chart&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>How to fix WARNING UNPROTECTED PRIVATE KEY FILE!</title><link>https://jhooq.com/fix-warning-unprotected-private-key-file/</link><pubDate>Wed, 30 Jun 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/fix-warning-unprotected-private-key-file/</guid><description>
&lt;p&gt;I am writing this post to document my troubleshooting steps when I faced the following issue -&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;WARNING: UNPROTECTED PRIVATE KEY FILE!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Permissions 0660 for jenkins-ec2.pem are too open.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;It is required that your private key files are NOT accessible by others.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Load key jenkins-ec2.pem bad permissions&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;a href="mailto:ubuntu@ec2-52-59-232-76.eu-central-1.compute.amazonaws.com"&gt;ubuntu@ec2-52-59-232-76.eu-central-1.compute.amazonaws.com&lt;/a&gt;: Permission denied (publickey)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;br/&gt;
&lt;h2 id="how-it-happened"&gt;How it happened?&lt;/h2&gt;
&lt;p&gt;This issue happened when I was trying to &lt;a href="https://jhooq.com/aws-kubernetes-jenkins-pipeline/#2-connect-to-ec2-instance"&gt;SSH into my EC2 instance running in AWS&lt;/a&gt; using key pair.&lt;/p&gt;</description></item><item><title>How to make your Gradle build faster when you see - Starting a new Gradle Daemon for this build (subsequent builds will be faster)?</title><link>https://jhooq.com/make-gradle-build-faster/</link><pubDate>Wed, 30 Jun 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/make-gradle-build-faster/</guid><description>
&lt;br/&gt;
&lt;p&gt;Recently I was working on one of my &lt;a href="#1-increase-the-memory-of-your-aws-ec2-instance"&gt;Spring Boot Application&lt;/a&gt; with &lt;a href="#2-upgrade-to-the-latest-version-of-gradle"&gt;Gradle&lt;/a&gt; as my preferred build framework. I aimed to deploy &lt;em&gt;Spring Boot Application&lt;/em&gt; to &lt;a href="https://console.aws.amazon.com/ec2/v2/home"&gt;AWS EC2 instance&lt;/a&gt; but as soon as &lt;a href="https://jhooq.com/aws-kubernetes-jenkins-pipeline/"&gt;I started my Gradle build on my EC2 instance&lt;/a&gt; it kind of stuck and frozen with the following message -&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Starting a new Gradle Daemon for this build (subsequent builds will be faster)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Looking at the message I assumed &lt;em&gt;Maybe I am running it for the first time that is why it is taking time&lt;/em&gt; but after waiting for a while it just failed with the following message -&lt;/p&gt;</description></item><item><title>How to setup kubernetes jenkins pipeline on AWS?</title><link>https://jhooq.com/aws-kubernetes-jenkins-pipeline/</link><pubDate>Sat, 19 Jun 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/aws-kubernetes-jenkins-pipeline/</guid><description>
&lt;p&gt;Hello guys It is been quite some time I was planning to write a blog post on &lt;em&gt;&lt;strong&gt;How to set up your Kubernetes CI CD Jenkins pipeline on AWS step by step?&lt;/strong&gt;&lt;/em&gt; It took some time for me to figure out all the details for setting up the continuous pipeline but at last once I was able to deploy it successfully on AWS, it was a sigh of relief for me.&lt;/p&gt;</description></item><item><title>Is terraform destroy needed before terraform apply?</title><link>https://jhooq.com/terraform-destroy-before-apply/</link><pubDate>Wed, 02 Jun 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-destroy-before-apply/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.terraform.io/docs/cli/commands/destroy.html"&gt;Terraform&lt;/a&gt; destroy will no doubt provide you a clean slate to work with your infrastructure but &lt;strong&gt;it is not needed to run terraform destroy before running terraform apply or plan commands&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;There is one caution while working with &lt;code&gt;terraform destroy&lt;/code&gt; command, it is not advisable to run it on a production environment because it can do some serious damage to your cloud infrastructure setup.&lt;/p&gt;
&lt;p&gt;Just to keep everything in sync you can use &lt;code&gt;terraform refersh&lt;/code&gt; anytime or even before you apply to terraform configuration.&lt;/p&gt;</description></item><item><title>How to fix terraform error Your query returned no results. Please change your search criteria and try again?</title><link>https://jhooq.com/terraform-your-query-returned-no-results/</link><pubDate>Mon, 31 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-your-query-returned-no-results/</guid><description>
&lt;br/&gt;
&lt;p&gt;The terraform error &lt;em&gt;&lt;strong&gt;Your query returned no results. Please change your search criteria and try again&lt;/strong&gt;&lt;/em&gt; can be misleading and can cause an increase in your debugging time with your Terraform configuration.&lt;/p&gt;
&lt;p&gt;I have also faced the same issue while I was trying to set up my &lt;code&gt;aws_instance&lt;/code&gt; on &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But interestingly this issue only happened with me when I was &lt;a href="https://jhooq.com/terraform-data-sources/"&gt;trying to create a Data source&lt;/a&gt; inside my terraform configuration and I missed adding the &lt;code&gt;depends_on&lt;/code&gt; tag inside the &lt;code&gt;data source configuration&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>How to use Terraform Data sources?</title><link>https://jhooq.com/terraform-data-sources/</link><pubDate>Fri, 28 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-data-sources/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; data sources can be beneficial if you want to retrieve or fetch the data from the cloud service providers such as &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;, &lt;a href="https://azure.microsoft.com/en-us/"&gt;AZURE&lt;/a&gt;, and &lt;a href="https://cloud.google.com/"&gt;GCP&lt;/a&gt;. Most of the time when we use Terraform along with AWS/AZURE/GCP then we always send data in terms of instructions or configuration.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;But what if you want to get the information(arn, tags, owner_id, etc.) back from the cloud service provider AWS/AZURE/GCP?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Answer&lt;/strong&gt; - We need to use the &lt;em&gt;data sources&lt;/em&gt; to get the resource information back.&lt;/p&gt;</description></item><item><title>How to use Terraform resource meta arguments?</title><link>https://jhooq.com/terraform-resource-meta-argument/</link><pubDate>Tue, 25 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-resource-meta-argument/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/block/resource"&gt;Terraform&lt;/a&gt; resource Meta-Arguments can be useful while setting up your cloud infrastructure. The resource arguments &lt;code&gt;depends_on, count, for_Each, provider, lifecycle&lt;/code&gt; has some features such as -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can create multiple &lt;code&gt;aws_resource&lt;/code&gt; using the &lt;code&gt;count&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;for_each&lt;/code&gt; can be used for iteration and can also help you to create multiple &lt;code&gt;aws_resource&lt;/code&gt; using the same block&lt;/li&gt;
&lt;li&gt;&lt;code&gt;provider&lt;/code&gt; is used for overriding terraform default behavior using the &lt;code&gt;alias&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;lifecycle&lt;/code&gt; you can &lt;strong&gt;prevent destroy&lt;/strong&gt;, &lt;strong&gt;create resource after destroy&lt;/strong&gt; and &lt;strong&gt;ignore changes to be saved inside tstate&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We will look into each resource meta arguments in a bit more details along with the example -&lt;/p&gt;</description></item><item><title>docker: invalid reference format - Every Cause Reproduced with Docker 28 (repository name must be lowercase, spaces in -v, empty variables, wrong argument order) and the Fix for Each</title><link>https://jhooq.com/invalid-reference-format-error/</link><pubDate>Wed, 19 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/invalid-reference-format-error/</guid><description>
&lt;!-- no-video: no companion video for this error yet; the docker basics are in the Docker playlist --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The message means Docker could not parse an image reference&lt;/strong&gt; (&lt;code&gt;[registry/][namespace/]repository[:tag|@digest]&lt;/code&gt;) somewhere in your command. Nine times out of ten the image name is fine and the mistake is in a flag before it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Uppercase anywhere in the repository path&lt;/strong&gt; is the number one cause. Docker 28 names the offending part: &lt;code&gt;repository name (library/Alpine) must be lowercase&lt;/code&gt;. Tags may have capitals; repositories may not.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A space in an unquoted mount path&lt;/strong&gt; (&lt;code&gt;-v $(pwd):/app&lt;/code&gt; with a directory called &lt;code&gt;my app&lt;/code&gt;) splits the argument and the second half becomes the &amp;quot;image&amp;quot;. Quote it: &lt;code&gt;-v &amp;quot;$(pwd):/app&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An empty variable&lt;/strong&gt; (&lt;code&gt;docker run $IMAGE echo ok&lt;/code&gt; with &lt;code&gt;IMAGE&lt;/code&gt; unset) does not produce this error any more - Docker tries to pull an image called &lt;code&gt;echo&lt;/code&gt; and fails with &lt;code&gt;pull access denied&lt;/code&gt;. Give the variable a default: &lt;code&gt;&amp;quot;${IMAGE:-myapp:1.0}&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flags after the image name&lt;/strong&gt; are passed to the container, not to Docker: &lt;code&gt;docker run myapp:1.0 -p 8080:80&lt;/code&gt; fails with &lt;code&gt;exec: &amp;quot;-p&amp;quot;: executable file not found in $PATH&lt;/code&gt;. Flags go before the image.&lt;/li&gt;
&lt;li&gt;A trailing colon (&lt;code&gt;myapp:&lt;/code&gt;), two colons (&lt;code&gt;myapp:v1:0&lt;/code&gt;), a &lt;code&gt;https://&lt;/code&gt; prefix, an invisible non-breaking space from a web page, or an unset &lt;code&gt;${TAG}&lt;/code&gt; in compose all give the bare &lt;code&gt;invalid reference format&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Every error below was reproduced on 2026-10-12 with Docker 28.0.4 on Ubuntu 24.04 and pasted as printed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-change-repository-name/"&gt;docker rename image&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this blog post we will look at the ways to fix the &lt;em&gt;&lt;strong&gt;docker: invalid reference format&lt;/strong&gt;&lt;/em&gt; error. If you look at the error carefully then it says &lt;code&gt;invalid reference format&lt;/code&gt;, which means the image name which you are trying to use in your &lt;code&gt;Dockerfile&lt;/code&gt; or &lt;code&gt;docker command&lt;/code&gt; is not acceptable.&lt;/p&gt;</description></item><item><title>denied: requested access to the resource is denied - fix docker push and 'pull access denied, repository does not exist or may require docker login' (tested on Docker 28)</title><link>https://jhooq.com/requested-access-to-resource-is-denied/</link><pubDate>Mon, 17 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/requested-access-to-resource-is-denied/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;denied: requested access to the resource is denied&lt;/code&gt; is Docker Hub refusing a write.&lt;/strong&gt; The repository you are pushing to is not yours, or you are not logged in. The image name decides the repository: &lt;code&gt;docker push myapp:1.0&lt;/code&gt; goes to &lt;code&gt;docker.io/library/myapp&lt;/code&gt;, which belongs to Docker, so it is always denied.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix is three commands:&lt;/strong&gt; &lt;code&gt;docker tag myapp:1.0 YOUR_USERNAME/myapp:1.0&lt;/code&gt;, &lt;code&gt;docker login&lt;/code&gt; (with an access token, not your password), &lt;code&gt;docker push YOUR_USERNAME/myapp:1.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;pull access denied for X, repository does not exist or may require 'docker login'&lt;/code&gt; is the same check on pull.&lt;/strong&gt; It means the repository name is wrong or the repository is private; Docker Hub deliberately does not tell you which.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A stale login gives a different message:&lt;/strong&gt; &lt;code&gt;unauthorized: incorrect username or password&lt;/code&gt;. Run &lt;code&gt;docker logout&lt;/code&gt; first; a leftover &lt;code&gt;auth&lt;/code&gt; entry in &lt;code&gt;~/.docker/config.json&lt;/code&gt; is the usual cause after a password or token change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Limits that bite:&lt;/strong&gt; unauthenticated pulls are capped at 100 per 6 hours per IPv4 address, a Personal account gets 200, and repository names must be 2 to 255 lowercase characters.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 on Ubuntu 24.04 with no Docker Hub login, captured on 2026-10-16, so every denial is the real anonymous behaviour.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-change-repository-name/"&gt;docker rename image&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/iIYw0Z0AI1c?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;I hit this error in 2021 pushing my first Spring Boot image, and the video above is the fix I found then. For this rewrite I reproduced every variant of the message on a clean machine with no Docker Hub credentials at all, so the outputs below are exactly what you see before you log in, and the working push goes to a registry I control.&lt;/p&gt;</description></item><item><title>docker rmi conflict - unable to remove repository reference, container is using its referenced image (every docker rm and rmi conflict fixed, with real output)</title><link>https://jhooq.com/docker-error-cannot-delete-docker-container-conflict/</link><pubDate>Fri, 14 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-error-cannot-delete-docker-container-conflict/</guid><description>
&lt;!-- no-video: no companion video for the rm/rmi conflicts yet; the Docker basics are in the Docker playlist --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;conflict: unable to remove repository reference ... container &amp;lt;id&amp;gt; is using its referenced image&lt;/code&gt;&lt;/strong&gt; means a container still points at that image. Remove the container first, then the image: &lt;code&gt;docker rm -f &amp;lt;container&amp;gt;&lt;/code&gt; and &lt;code&gt;docker rmi &amp;lt;image&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stopped containers count too.&lt;/strong&gt; &lt;code&gt;docker ps&lt;/code&gt; shows nothing, but &lt;code&gt;docker ps -a --filter ancestor=&amp;lt;image&amp;gt;&lt;/code&gt; shows the &lt;code&gt;Exited&lt;/code&gt; container that pins it. &lt;code&gt;docker container prune -f&lt;/code&gt; removes every stopped container in one go.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;image is referenced in multiple repositories&lt;/code&gt;&lt;/strong&gt; means you removed by image ID and the ID has several names. Remove each &lt;code&gt;repo:tag&lt;/code&gt;, or use &lt;code&gt;docker rmi -f &amp;lt;id&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;image has dependent child images (cannot be forced)&lt;/code&gt;&lt;/strong&gt; cannot be fixed with &lt;code&gt;-f&lt;/code&gt; at all - remove the child image first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;docker rmi -f&lt;/code&gt; on the image of a running container does not delete anything.&lt;/strong&gt; It only removes the tag; the 48.2 MB of layers stay behind as &lt;code&gt;&amp;lt;none&amp;gt;:&amp;lt;none&amp;gt;&lt;/code&gt; until the container is gone and &lt;code&gt;docker image prune -f&lt;/code&gt; runs.&lt;/li&gt;
&lt;li&gt;Every output below is from Docker 28.0.4 on Ubuntu 24.04, captured on 2026-10-14.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/docker-restart-single-container/"&gt;docker restart container&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/docker/docker-error-cannot-delete/cannot-delete-docker-container-conflict-unable-to-remove-repository-reference.webp"
title="Docker error unable to remove repository reference - container is using its referenced image"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Docker error unable to remove repository reference - container is using its referenced image&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to fix docker error no space left on device?</title><link>https://jhooq.com/docker-error-no-space-left/</link><pubDate>Thu, 13 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/docker-error-no-space-left/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Sometimes you must clean up your disk so that you can download the &lt;a href="https://docs.docker.com"&gt;docker&lt;/a&gt; image and run it. But if you do not have sufficient space available on your disk then you might end up with the error &lt;code&gt;no space left on device&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this blog, we are going to see a number of ways to fix this error because I had this issue many times while working with docker.&lt;/p&gt;</description></item><item><title>How to use Terraform Dynamic blocks?</title><link>https://jhooq.com/terraform-dynamic-block/</link><pubDate>Mon, 10 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-dynamic-block/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.terraform.io/docs/language/expressions/dynamic-blocks.html"&gt;&lt;em&gt;Terraform Dynamic Block&lt;/em&gt;&lt;/a&gt; is important when you want to create multiple resources inside of similar types, so instead of copy and pasting the same terraform configuration in the terraform file does not make sense and it is not feasible if you need to create hundreds of resources using terraform.&lt;/p&gt;
&lt;p&gt;If we describe &lt;code&gt;terraform dynamic block&lt;/code&gt; in simple words then it is &lt;code&gt;for loop&lt;/code&gt; which is going to iterate over and will help you to create a dynamic resource. With the help of &lt;code&gt;dynamic blocks&lt;/code&gt; you can create nested repeatable blocks such as &lt;code&gt;settings&lt;/code&gt;, &lt;code&gt;ingress&lt;/code&gt; rules etc...&lt;/p&gt;</description></item><item><title>Terraform - How to nuke AWS resources and save additional AWS infrastructure cost?</title><link>https://jhooq.com/terraform-nuke/</link><pubDate>Sat, 01 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-nuke/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Working in the &lt;a href="https://aws.amazon.com/"&gt;AWS cloud&lt;/a&gt; is always fun until you are not paying your AWS bills from your pocket. Being a developer we work on our developer machine and we do not much worry much about resources(CPU, Memory, and Disk space) because nowadays developer machines (Laptops/desktops) are very powerful. Apart from the initial purchase cost, it will not only consume a very tiny amount of electricity if you keep it running days and nights.&lt;/p&gt;</description></item><item><title>Terraform count, for_each and for Expressions Explained - Loop Over Lists, Sets and Maps (with the count vs for_each trap)</title><link>https://jhooq.com/terraform-for-and-for-each-loop/</link><pubDate>Sat, 01 May 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-for-and-for-each-loop/</guid><description>
&lt;br/&gt;
&lt;p&gt;When working with &lt;em&gt;&lt;strong&gt;collection variables&lt;/strong&gt;&lt;/em&gt; in &lt;a href="https://developer.hashicorp.com/terraform"&gt;Terraform&lt;/a&gt;, you must understand the three ways to loop - &lt;em&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;/em&gt;, &lt;em&gt;&lt;strong&gt;for_each&lt;/strong&gt;&lt;/em&gt; and the &lt;em&gt;&lt;strong&gt;for expression&lt;/strong&gt;&lt;/em&gt;. If you don't, going through a list, map or set of anything (users, subnets, security group rules) is painful, and worse, you will eventually hit the trap where removing one item from a list makes Terraform destroy and recreate resources it should not touch.&lt;/p&gt;
&lt;p&gt;This article is about how all three work, with an AWS example for each, and when to use which. I have rewritten it for Terraform 1.16 - the biggest additions since the original are &lt;code&gt;for_each&lt;/code&gt; on modules, the exact rules about what &lt;code&gt;for_each&lt;/code&gt; may iterate over, and a proper explanation of the count-versus-for_each trap with a diagram.&lt;/p&gt;</description></item><item><title>How to connect localhost from docker container?</title><link>https://jhooq.com/connect-localhost-from-dcoker/</link><pubDate>Thu, 29 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/connect-localhost-from-dcoker/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt; container always works in isolation from host machine. But sometimes you need to connect &lt;em&gt;&lt;strong&gt;localhost(host machine)&lt;/strong&gt;&lt;/em&gt; from your docker container to perform certain tasks.&lt;/p&gt;
&lt;p&gt;In this article we are going to look - &lt;em&gt;&lt;strong&gt;How to access the host machine from docker conatiner?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;There are different ways to achieve -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using default &lt;strong&gt;&lt;em&gt;docker bridge connection .i.e. &lt;code&gt;docker0&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Windows&lt;/strong&gt; machine&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Linux/Mac&lt;/strong&gt; machine&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-using-default-bridge-connection-ie----docker0"&gt;1. Using default &lt;strong&gt;&lt;em&gt;bridge connection .i.e. - docker0&lt;/em&gt;&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;When ever you install docker onto your machine, it will by default create a &lt;strong&gt;&lt;em&gt;bridge connection&lt;/em&gt;&lt;/strong&gt; &lt;code&gt;docker0&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>How to use Terraform output values?</title><link>https://jhooq.com/how-to-use-terraform-output-values/</link><pubDate>Mon, 26 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/how-to-use-terraform-output-values/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;In this article we are going to look on &lt;a href="https://www.terraform.io/"&gt;terraform&lt;/a&gt; output values. Terraform output values will be really useful when you want to debug your terraform code. Terraform output values can help you to print the attributes reference(arn, instance_state, outpost_arn, public_ip, public_dns etc) on your console.&lt;/p&gt;
&lt;p&gt;The typical syntax of Terraform output values is -&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/terraform/terraform-output-locals/how-to-use-terraform-output-values.webp"
title="How to use terraform output locals?"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;How to use terraform output locals?&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Helm Multiple Values Files: How -f Precedence, --set and Merge Rules Really Work (Helm 4)</title><link>https://jhooq.com/helm-multiple-values-files/</link><pubDate>Fri, 23 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-multiple-values-files/</guid><description>
&lt;!-- no-video: no video on the channel covers multiple values files yet; it is listed under Videos to record in docs/content-queue.md --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pass &lt;code&gt;-f&lt;/code&gt; (or &lt;code&gt;--values&lt;/code&gt;) as many times as you need; Helm merges the files from left to right and the right-most file wins&lt;/strong&gt; for every key it sets. In my run &lt;code&gt;replicaCount&lt;/code&gt; went 1 (chart default), 2, 3 and finally 9 with &lt;code&gt;--set&lt;/code&gt;. The Helm 4.3 help text says the same: &amp;quot;The priority will be given to the last (right-most) file specified&amp;quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Order of precedence, lowest to highest:&lt;/strong&gt; the chart's own &lt;code&gt;values.yaml&lt;/code&gt;, then each &lt;code&gt;-f&lt;/code&gt; file in the order you typed them, then &lt;code&gt;--set&lt;/code&gt; and friends, which beat every file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maps are merged key by key, lists are replaced as a whole.&lt;/strong&gt; Two files that each set &lt;code&gt;imagePullSecrets&lt;/code&gt; do not give you two secrets; you get only the second file's list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;key: null&lt;/code&gt; in a later file deletes a key&lt;/strong&gt; that an earlier layer or the chart default set, which is how you switch off a default resource limit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you want to pass values from shell variables instead of files, read &lt;a href="https://jhooq.com/helm-pass-environment-variables/"&gt;how to pass environment variables into a Helm chart&lt;/a&gt;; if you want to preview what a combination renders to, read &lt;a href="https://jhooq.com/helm-template-command/"&gt;helm template explained&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#the-precedence-rules-in-one-table"&gt;The precedence rules in one table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#create-the-chart-and-two-values-files"&gt;Create the chart and two values files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#run-it-with-multiple-values-files"&gt;Run it with multiple values files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#maps-merge-lists-replace-null-deletes"&gt;Maps merge, lists replace, null deletes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#a-per-environment-layout-that-scales"&gt;A per-environment layout that scales&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#quick-answers"&gt;Quick answers&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="the-precedence-rules-in-one-table"&gt;The precedence rules in one table&lt;/h2&gt;
&lt;p&gt;Most of the confusion I see about multiple values files comes from not knowing who wins. The &lt;a href="https://helm.sh/docs/chart_template_guide/values_files/"&gt;Helm values documentation&lt;/a&gt; describes a chain of layers, and the &lt;code&gt;helm install&lt;/code&gt; help text spells out the tie-break between files. Here is the chain as I use it, lowest priority first:&lt;/p&gt;</description></item><item><title>How to fix error configuring Terraform AWS Provider error validating provider credentials error calling sts GetCallerIdentity SignatureDoesNotMatch?</title><link>https://jhooq.com/error-configuring-terraform-aws-provider/</link><pubDate>Mon, 19 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/error-configuring-terraform-aws-provider/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;In this article we are going to troubleshoot an issue related to &lt;strong&gt;&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This is occurs when you are trying to use your &lt;em&gt;&lt;strong&gt;Old or expired - Access keys (access key ID and secret access key)&lt;/strong&gt;&lt;/em&gt; of your aws account.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You are error should look like -&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Error: error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. status code: 403, request id: 49474972-2feb-463a-a51d-e04e3bb2a111&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>How to fix Invalid function argument on line in provider credentials file google Invalid value for path parameter no file exists</title><link>https://jhooq.com/gcp-invalid-function-argument-credential-file/</link><pubDate>Mon, 19 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/gcp-invalid-function-argument-credential-file/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Working with terraform can tricky sometime and specially if you are working with cloud service provider such as &lt;a href="https://cloud.google.com/"&gt;Google Cloud Platform&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have faced the following issue while I was working with my first &lt;em&gt;&lt;a href="https://www.terraform.io/"&gt;Terrafrom&lt;/a&gt;&lt;/em&gt; project with &lt;a href="https://cloud.google.com/"&gt;Google Cloud&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Error Invalid function argument on main.tf line 2, in provider google credentials = file(gcp-account.json) Invalid value for path parameter no file exists at gcp-account.json this function works only with files that are distributed as part of the configuration source code, so if this file will be created by a resource in this configuration you must instead obtain this result from an attribute of that resource.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Terraform Error: Value for undeclared variable - A Variable Named Was Assigned on the Command Line (Terraform 1.17 Fix)</title><link>https://jhooq.com/value-for-undeclared-variable/</link><pubDate>Fri, 16 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/value-for-undeclared-variable/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The error means one thing:&lt;/strong&gt; you passed &lt;code&gt;-var=&amp;quot;name=value&amp;quot;&lt;/code&gt; and the root module has no &lt;code&gt;variable &amp;quot;name&amp;quot; {}&lt;/code&gt; block. Terraform 1.17.1 prints &lt;code&gt;Error: Value for undeclared variable&lt;/code&gt; and exits with code 1 before it plans anything.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix is one of two lines:&lt;/strong&gt; add the &lt;code&gt;variable&lt;/code&gt; block to a &lt;code&gt;.tf&lt;/code&gt; file in the directory you run Terraform from, or correct the spelling of the name you pass. Names are case sensitive: &lt;code&gt;Env&lt;/code&gt; and &lt;code&gt;env&lt;/code&gt; are different variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The same mistake is only a warning in a &lt;code&gt;.tfvars&lt;/code&gt; file&lt;/strong&gt; (plan continues, exit code 0), and it is &lt;strong&gt;ignored silently when it comes from a &lt;code&gt;TF_VAR_&lt;/code&gt; environment variable&lt;/strong&gt;. A wrong argument inside a &lt;code&gt;module&lt;/code&gt; block is a third, different error: &lt;code&gt;Unsupported argument&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If your error says &lt;code&gt;No value for required variable&lt;/code&gt; instead, the variable is declared but empty; read &lt;a href="https://jhooq.com/terraform-variable-and-tfvars-file/"&gt;Terraform variables and tfvars files&lt;/a&gt;. For the full list of variable types, read &lt;a href="https://jhooq.com/terraform-input-variables/"&gt;Terraform input variables&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/oB7l8GOpVaY?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="the-error-word-for-word"&gt;The error, word for word&lt;/h2&gt;
&lt;p&gt;This is the message that brings most people here:&lt;/p&gt;</description></item><item><title>variables.tf vs terraform.tfvars - how Terraform loads .tf and .tfvars files, auto.tfvars and -var-file precedence (tested on v1.16)</title><link>https://jhooq.com/terraform-variable-and-tfvars-file/</link><pubDate>Sun, 11 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-variable-and-tfvars-file/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;variables.tf&lt;/code&gt; declares, &lt;code&gt;terraform.tfvars&lt;/code&gt; assigns.&lt;/strong&gt; A &lt;code&gt;variable&lt;/code&gt; block gives the name, type, default, validation and &lt;code&gt;sensitive&lt;/code&gt; flag; a &lt;code&gt;.tfvars&lt;/code&gt; file contains only &lt;code&gt;name = value&lt;/code&gt; lines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Loaded automatically:&lt;/strong&gt; &lt;code&gt;terraform.tfvars&lt;/code&gt;, &lt;code&gt;terraform.tfvars.json&lt;/code&gt; and every &lt;code&gt;*.auto.tfvars&lt;/code&gt; / &lt;code&gt;*.auto.tfvars.json&lt;/code&gt; in the working directory. &lt;strong&gt;Ignored unless passed with &lt;code&gt;-var-file&lt;/code&gt;:&lt;/strong&gt; everything else, such as &lt;code&gt;dev.tfvars&lt;/code&gt; or &lt;code&gt;prod.tfvars&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Precedence, lowest to highest&lt;/strong&gt; (tested on v1.16.2): default, &lt;code&gt;TF_VAR_name&lt;/code&gt; environment variable, &lt;code&gt;terraform.tfvars&lt;/code&gt;, &lt;code&gt;terraform.tfvars.json&lt;/code&gt;, &lt;code&gt;*.auto.tfvars&lt;/code&gt; in alphabetical order, then &lt;code&gt;-var&lt;/code&gt; and &lt;code&gt;-var-file&lt;/code&gt; &lt;strong&gt;in the order you typed them&lt;/strong&gt; - the later flag wins.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A value in &lt;code&gt;terraform.tfvars&lt;/code&gt; for a variable that only a module declares is ignored&lt;/strong&gt; with &lt;code&gt;Warning: Value for undeclared variable&lt;/code&gt;. Modules get values only from the &lt;code&gt;module&lt;/code&gt; block.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;terraform output NAME&lt;/code&gt; prints a sensitive value in plain text&lt;/strong&gt; even though &lt;code&gt;apply&lt;/code&gt; showed &lt;code&gt;&amp;lt;sensitive&amp;gt;&lt;/code&gt;. &lt;code&gt;sensitive = true&lt;/code&gt; hides values from logs, not from people who can run Terraform.&lt;/li&gt;
&lt;li&gt;Every output below is from Terraform v1.16.2, captured on 2026-10-14. No cloud account is needed - the examples only use outputs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/terraform-manage-state/"&gt;Terraform State File Explained&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/oB7l8GOpVaY?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;I recorded the video above in 2021, and it is still the most-watched part of my Terraform series, at more than 55,000 views. The written post that went with it had a problem, though: its diagram of the variable &amp;quot;loading preference&amp;quot; had a stage called &amp;quot;.tf files&amp;quot; and no &lt;code&gt;*.auto.tfvars&lt;/code&gt; at all. When people search for &lt;strong&gt;&amp;quot;.tfvars file&amp;quot;&lt;/strong&gt; or &lt;strong&gt;&amp;quot;.tf file&amp;quot;&lt;/strong&gt; and land here, that is exactly the question they need answered correctly. So I rebuilt the example from scratch on Terraform v1.16.2, set the same variable in every possible place, and recorded which one won.&lt;/p&gt;</description></item><item><title>How would I learn DevOps(If I had to Start Over)</title><link>https://jhooq.com/how-to-learn-devops/</link><pubDate>Fri, 09 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/how-to-learn-devops/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
I got this question many times like how should I start learning DevOps.
&lt;p&gt;Well in this article we are gonna talk about&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;How should I learn DevOps by myself if I had to start from scratch?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/devops/if-i-had-to-start-devop/devops-path-to-lean.webp"
title="Devops learning path"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Devops learning path&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;There are &lt;strong&gt;&lt;em&gt;certain caveats&lt;/em&gt;&lt;/strong&gt; which I would like to mention -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learning can different for everyone&lt;/em&gt;&lt;/strong&gt; - The first one is the learning can be different for everyone there are
certain topics
which might be easy for you to understand but for some of you it might be a little difficult because you might be coming from a different programming background&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Programming&lt;/em&gt;&lt;/strong&gt; - Most important thing which is necessary if you are a beginner and if you want to
learn DevOps is like you have to be a programmer and you should know some kind of a programming norm or you should have some kind of programming knowledge before starting to the DevOps that's the primary requirement which I would
consider.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>How to use ApplicationRunner in Spring Boot application?</title><link>https://jhooq.com/applicationrunner-spring-boot/</link><pubDate>Sun, 04 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/applicationrunner-spring-boot/</guid><description>
&lt;br/&gt;
&lt;p&gt;The &lt;a href="https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/ApplicationRunner.html"&gt;Application Runner interface&lt;/a&gt; provided by &lt;a href="https://spring.io/projects/spring-boot"&gt;Spring Boot&lt;/a&gt; is a little advance than the &lt;a href="https://jhooq.com/commandlinerunner-spring-boot/"&gt;CommandLineRunner Interface&lt;/a&gt;. In simple words, we can say that &lt;a href="https://jhooq.com/commandlinerunner-spring-boot/"&gt;CommandLineRunner Interface&lt;/a&gt; does not do more than executing the &lt;em&gt;run()&lt;/em&gt; method before the completion of the Spring Boot Application Life Cycle and putting all the program arguments in an array of String.&lt;/p&gt;
&lt;p&gt;So, the question comes what is special about “ApplicationRunner”, well It allows you to define the following arguments –&lt;/p&gt;</description></item><item><title>Terraform Variables Explained - Input Variables (string, number, bool, list, map, object), Validation, Sensitive, Locals, Outputs and tfvars</title><link>https://jhooq.com/terraform-input-variables/</link><pubDate>Thu, 01 Apr 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-input-variables/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://developer.hashicorp.com/terraform/language/values/variables"&gt;Terraform variables&lt;/a&gt; are a way to store values that you can reuse throughout your Terraform configuration. You define a value once, reference it in multiple places, and change it in one place when the environment changes - &lt;code&gt;t3.micro&lt;/code&gt; in dev, &lt;code&gt;m5.large&lt;/code&gt; in prod, same code.&lt;/p&gt;
&lt;p&gt;I wrote the first version of this post in 2021 for Terraform 0.14. Since then Terraform has added quite a lot to variables - &lt;strong&gt;validation blocks&lt;/strong&gt;, &lt;strong&gt;sensitive&lt;/strong&gt; and &lt;strong&gt;ephemeral&lt;/strong&gt; variables, &lt;strong&gt;optional object attributes&lt;/strong&gt; - and the precedence rules between &lt;code&gt;terraform.tfvars&lt;/code&gt;, &lt;code&gt;-var-file&lt;/code&gt; and environment variables confuse people every single week in my YouTube comments. So this is the full picture as of Terraform 1.16, with working AWS examples for every type.&lt;/p&gt;</description></item><item><title>pip install --trusted-host - Fix SSL CERTIFICATE_VERIFY_FAILED (unable to get local issuer certificate) in One Command, Then Fix It Properly</title><link>https://jhooq.com/pip-install-connection-error/</link><pubDate>Wed, 31 Mar 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/pip-install-connection-error/</guid><description>
&lt;!-- no-video: the pip certificate fix has no companion video yet; the git and curl version of this error is covered in the SSL playlist --&gt;
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The one-command unblock:&lt;/strong&gt; &lt;code&gt;pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org &amp;lt;package&amp;gt;&lt;/code&gt;. It tells pip to skip certificate verification for those two hosts. Encryption stays on, identity checking goes off.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The cause&lt;/strong&gt; is almost always a corporate proxy or antivirus that re-signs &lt;code&gt;pypi.org&lt;/code&gt; with the company's own CA. pip's bundled CA list (&lt;code&gt;certifi&lt;/code&gt;) does not know that CA, so pip refuses with &lt;em&gt;unable to get local issuer certificate&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The proper fix&lt;/strong&gt; is a current pip: since &lt;strong&gt;pip 24.2&lt;/strong&gt; (July 2024) pip also trusts the operating system's certificate store, so a CA installed by IT just works. Upgrade pip once with &lt;code&gt;--trusted-host&lt;/code&gt;, then never type it again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The permanent, verifying fix&lt;/strong&gt; for Docker and CI is &lt;code&gt;--cert /path/company-root-ca.pem&lt;/code&gt; or &lt;code&gt;PIP_CERT&lt;/code&gt;, with the CA bundle you can extract in 10 seconds with &lt;code&gt;openssl s_client&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Windows with pip 24.2+&lt;/strong&gt; the error text is different: &lt;em&gt;A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.&lt;/em&gt; Same cause, same fixes. I reproduced both versions below with pip 25.0.1.&lt;/li&gt;
&lt;li&gt;There are exactly &lt;strong&gt;2 hosts&lt;/strong&gt; to trust (&lt;code&gt;pypi.org&lt;/code&gt;, &lt;code&gt;files.pythonhosted.org&lt;/code&gt;); the old &lt;code&gt;pypi.python.org&lt;/code&gt; only matters for tutorials older than 2017.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/2-ways-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chain/"&gt;SSL certificate problem&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-fix-1---pip-install---trusted-host-the-one-minute-unblock"&gt;Fix 1 - pip install --trusted-host (the one-minute unblock)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-root-cause---why-pip-rejects-the-certificate"&gt;Root cause - why pip rejects the certificate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-fix-2---upgrade-pip-to-242-or-newer-it-trusts-your-os-certificate-store"&gt;Fix 2 - Upgrade pip to 24.2 or newer (it trusts your OS certificate store)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-fix-3---make-it-permanent-in-the-pipconf-file"&gt;Fix 3 - Make it permanent in the pip.conf file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-fix-4---give-pip-your-companys-ca-certificate-the-proper-fix"&gt;Fix 4 - Give pip your company's CA certificate (the proper fix)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-fix-5---fix-pythons-own-certificates-on-macos"&gt;Fix 5 - Fix Python's own certificates on macOS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-docker-ci-conda-and-windows-variants"&gt;Docker, CI, conda and Windows variants&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-common-error-variants-and-what-they-mean"&gt;Common error variants and what they mean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-fix-1---pip-install---trusted-host-the-one-minute-unblock"&gt;1. Fix 1 - pip install --trusted-host (the one-minute unblock)&lt;/h2&gt;
&lt;p&gt;This is the command most people are searching for, so here it is first. &lt;code&gt;--trusted-host&lt;/code&gt; tells pip to &lt;strong&gt;skip certificate verification&lt;/strong&gt; for a host. PyPI needs two of them - the index and the file server -&lt;/p&gt;</description></item><item><title>Upgrade kubernetes using kubespray</title><link>https://jhooq.com/upgrade-kubernetes-using-kubespray/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/upgrade-kubernetes-using-kubespray/</guid><description>
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://kubernetes.io/docs/setup/production-environment/tools/kubespray/"&gt;Kubespray&lt;/a&gt; comes very handily when you want
to upgrade or downgrade your &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; cluster to the specific version.&lt;/p&gt;
&lt;p&gt;But it can be troublesome if you do not know -&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;How to upgrade your Kubernetes cluster using Kubespray?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Click below - If you want to learn how to setup Kubernetes cluster using Kubespray&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;12 Steps for Installing a Production Ready Kubernetes Cluster&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br/&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/upgrade-kubernetes-using-kubespray/#1-how-does-the-upgrade-work-for-kubespray"&gt;How the upgrade works for Kubespray&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/upgrade-kubernetes-using-kubespray/#1-how-does-the-upgrade-work-for-kubespray"&gt;How to checkout the correct Kubespray repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/upgrade-kubernetes-using-kubespray/#3-kubespray-upgrade-cluster-to-next-higher-version-graceful-upgrade"&gt;Kubespray upgrade cluster to next higher version(Graceful upgrade)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/upgrade-kubernetes-using-kubespray/#4kubespray-upgrade-kubernetes-cluster-to-the-specific-version"&gt;Kubespray upgrade Kubernetes cluster to specific version&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/upgrade-kubernetes-using-kubespray/#5-how-to-downgrade-your-kubernetes-cluster-unsafe-upgrade-example"&gt;How to downgrade your Kubernetes cluster(Unsafe upgrade example)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-how-does-the-upgrade-work-for-kubespray"&gt;1. How does the upgrade work for Kubespray?&lt;/h2&gt;
&lt;p&gt;Kubespray is a little special when it comes to upgrading your Kubernetes cluster.&lt;/p&gt;</description></item><item><title>Terraform Create EC2 Instance on AWS - Step by Step (Provider v6, aws_ami Data Source, Key Pair, Security Group, user_data and Provisioners)</title><link>https://jhooq.com/terraform-ec2-instance-setup/</link><pubDate>Fri, 19 Mar 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/terraform-ec2-instance-setup/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;This guide will help you to &lt;strong&gt;create your first &lt;a href="https://aws.amazon.com/ec2/"&gt;AWS EC2&lt;/a&gt; instance using &lt;a href="https://developer.hashicorp.com/terraform"&gt;Terraform&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When it comes to IaC (Infrastructure as Code) Terraform is still the first choice of most DevOps teams, although there are alternatives such as &lt;a href="https://jhooq.com/series/ansible/"&gt;Ansible&lt;/a&gt;, &lt;a href="https://www.pulumi.com/"&gt;Pulumi&lt;/a&gt;, &lt;a href="https://aws.amazon.com/cloudformation/"&gt;CloudFormation&lt;/a&gt; and the open-source fork &lt;a href="https://opentofu.org/"&gt;OpenTofu&lt;/a&gt;, because -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Terraform is &lt;a href="https://jhooq.com/install-terrafrom/"&gt;really easy to install&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The provider documentation on the &lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs"&gt;Terraform Registry&lt;/a&gt; is excellent&lt;/li&gt;
&lt;li&gt;It is widely adopted in the DevOps community, so every problem you hit has been hit before&lt;/li&gt;
&lt;li&gt;It has first-class support for every cloud - &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;, &lt;a href="https://cloud.google.com/"&gt;Google Cloud&lt;/a&gt;, Azure - with the same language&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I wrote the first version of this post in 2021 against Terraform 0.14 and the AWS provider 3.32. In 2026 the workflow is the same, but a few things in the original were plain bad practice that I do not want anyone copying any more - &lt;strong&gt;root user access keys pasted into main.tf&lt;/strong&gt;, a hard-coded AMI ID that only worked in one region, and a provisioner block floating outside its resource. All of that is fixed below, and the code is tested with Terraform 1.16 and AWS provider 6.x.&lt;/p&gt;</description></item><item><title>How to fix Error creating service account googleapi Error 403 Identity and Access Management (IAM) API has not been used in project before or it is disabled</title><link>https://jhooq.com/fix-error-create-service-account-google-api/</link><pubDate>Sun, 14 Mar 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/fix-error-create-service-account-google-api/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;In this article we are going to see - &lt;strong&gt;&lt;em&gt;How to fix the issue - Error creating service account googleapi Error 403
Identity and Access Management (IAM) API has not been used in project 4686446XXXX before or it is disabled&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(In case you need help with setting GCP Compute instance &lt;a href="https://jhooq.com/how-to-setup-virtual-machine-on-google-cloud-platform/"&gt;here is the guide&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="issue"&gt;Issue&lt;/h2&gt;
&lt;p&gt;I also faced this issue when I was trying to create my first GCP Compute Instance using terraform.&lt;/p&gt;</description></item><item><title>Install terraform on Ubuntu 20.04, CentOS 8, MacOS, Windows 10, Fedora 33, Red hat 8 and Solaris 11</title><link>https://jhooq.com/install-terrafrom/</link><pubDate>Sun, 07 Mar 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/install-terrafrom/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;In this guide, we will focus on &lt;strong&gt;&lt;em&gt;Installation of Terraform&lt;/em&gt;&lt;/strong&gt; on a various operating system such as Ubuntu 20.04,
CentOS 8, Fedora 33, Red Hat 8, and Solaris.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#1-installing-terraform-on-ubuntu-2004-centos-8-fedora-33-red-hat-8-or-solaris"&gt;Install Terraform on Ubuntu 20.04, CentOS 8, Fedora 33, Red Hat 8 or Solaris&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#download-the-terraformzip-file-1"&gt;Install Terraform on Windows 10&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#3-installing-terraform-on-macos"&gt;Install Terraform on MacOS&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Later we are also going to see &lt;strong&gt;&lt;em&gt;How to Upgrade Terraform using tfenv?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#4-upgrade-terraform-using-tfenv"&gt;Upgrade Terraform using &lt;strong&gt;&lt;em&gt;tfenv&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#5-upgrade-to-specific-version-of-terraform"&gt;Upgrade Terraform to Specific version using &lt;strong&gt;&lt;em&gt;tfenv&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/install-terrafrom/#6-uninstall-the-terraform"&gt;Uninstall the Terraform&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/jJX6S5JAGpI?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Already installed and want a real-world example?&lt;/strong&gt; See how I run a production web app on Google Cloud with Terraform end to end (Cloud Run, Cloud SQL, Secret Manager, a deployer service account) in &lt;a href="https://jhooq.com/deploy-nextjs-saas-google-cloud-run-terraform/"&gt;Deploying a Next.js SaaS on Google Cloud Run with Terraform&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>kubectl get YAML - How to Export the YAML of Deployed Kubernetes Resources (Deployment, Service, All Resources, Clean Reusable Manifests)</title><link>https://jhooq.com/get-yaml-for-deployed-kubernetes-resources/</link><pubDate>Thu, 25 Feb 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/get-yaml-for-deployed-kubernetes-resources/</guid><description>
&lt;br/&gt;
&lt;p&gt;In this post we are going to see how to get the &lt;strong&gt;&lt;em&gt;YAML&lt;/em&gt;&lt;/strong&gt; of deployed Kubernetes resources - a single deployment or service, and then every pvc, configmap, ingress, service, secret, deployment, statefulset, hpa, job and cronjob in the cluster in one go.&lt;/p&gt;
&lt;p&gt;Most of the time we create deployments and services from YAML files. But sooner or later you need to go the other way - somebody created a resource with &lt;code&gt;kubectl create&lt;/code&gt; or from the dashboard and never saved the file, you inherited a cluster with no repository, or you want to copy an application from one cluster to another. &lt;code&gt;kubectl get -o yaml&lt;/code&gt; is the answer, and this post covers both the basic command and the part most tutorials skip - &lt;strong&gt;how to turn the export into a clean manifest you can actually apply again&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>How to fix - Error client etcd cluster is unavailable or misconfigured</title><link>https://jhooq.com/etcd-cluster-is-unavailable-or-misconfigured/</link><pubDate>Mon, 22 Feb 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/etcd-cluster-is-unavailable-or-misconfigured/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;You might be trying to set-up your &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; cluster using &lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;Kubespray&lt;/a&gt; but during the setup you must be stuck with the issue &lt;strong&gt;client etcd cluster is
unavailable or misconfigured error&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But before scrolling down for solution please check in the logs again for the errros like &lt;strong&gt;&lt;em&gt;connection refused
error&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;subnet watch failed client:&lt;/em&gt;&lt;/strong&gt; because both the error has different solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://jhooq.com/etcd-cluster-is-unavailable-or-misconfigured/#solution-1-how-i-fixed--etcd-cluster-is-unavailable-or-misconfigured-getsockopt-connection-refused"&gt;Solution 1 - etcd cluster is unavailable or misconfigured getsockopt: connection refused&lt;/a&gt;&lt;/p&gt;</description></item><item><title>git@github.com: Permission denied (publickey). fatal: Could not read from remote repository - What It Means and the 5-Minute Fix (ssh-keygen, add the key to GitHub, ssh -vT to see which key is offered, or switch to HTTPS with a token)</title><link>https://jhooq.com/github-permission-denied-publickey/</link><pubDate>Mon, 15 Feb 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/github-permission-denied-publickey/</guid><description>
&lt;br/&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What it means:&lt;/strong&gt; your &lt;code&gt;git clone&lt;/code&gt;, &lt;code&gt;pull&lt;/code&gt; or &lt;code&gt;push&lt;/code&gt; used the SSH URL (&lt;code&gt;git@github.com:user/repo.git&lt;/code&gt;), the SSH connection worked, but GitHub was offered &lt;strong&gt;no key it knows&lt;/strong&gt;. GitHub then refuses, and git reports &lt;code&gt;fatal: Could not read from remote repository.&lt;/code&gt; It is never a network problem and never a git-version problem.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;See the cause in one command:&lt;/strong&gt; &lt;code&gt;ssh -vT git@github.com&lt;/code&gt;. If every &lt;code&gt;identity file ... type -1&lt;/code&gt; line says the file is missing, you have no key. If you see &lt;code&gt;Offering public key: ... ED25519 SHA256:...&lt;/code&gt; followed by &lt;code&gt;Permission denied&lt;/code&gt;, the key exists but is &lt;strong&gt;not added to your GitHub account&lt;/strong&gt; (or you are logged in as a different user than the key belongs to).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The fix, five steps, about 5 minutes:&lt;/strong&gt; &lt;code&gt;ssh-keygen -t ed25519 -C &amp;quot;you@example.com&amp;quot;&lt;/code&gt;, copy &lt;code&gt;~/.ssh/id_ed25519.pub&lt;/code&gt;, GitHub → Settings → SSH and GPG keys → New SSH key, paste, then &lt;code&gt;ssh -T git@github.com&lt;/code&gt; should greet you by name.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key exists but is ignored?&lt;/strong&gt; Load it (&lt;code&gt;ssh-add ~/.ssh/id_ed25519&lt;/code&gt;) or name it in &lt;code&gt;~/.ssh/config&lt;/code&gt; with &lt;code&gt;IdentityFile ~/.ssh/id_ed25519&lt;/code&gt; - the &lt;strong&gt;private&lt;/strong&gt; key, not the &lt;code&gt;.pub&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No time for keys?&lt;/strong&gt; Switch the remote to HTTPS (&lt;code&gt;git remote set-url origin https://github.com/user/repo.git&lt;/code&gt;) and use a &lt;strong&gt;personal access token&lt;/strong&gt; as the password; GitHub removed password authentication for git on 13 August 2021.&lt;/li&gt;
&lt;li&gt;Reproduced on 2026-10-12 with OpenSSH 10.3 and git 2.55 on Windows; the outputs are pasted, not typed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/github-unable-to-update-URL/"&gt;fatal&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-the-error-reproduced-and-what-github-is-actually-telling-you"&gt;The error, reproduced, and what GitHub is actually telling you&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-diagnose-it-in-30-seconds-with-ssh--vt"&gt;Diagnose it in 30 seconds with ssh -vT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-fix-1---generate-an-ssh-key-and-add-it-to-github-the-5-steps"&gt;Fix 1 - Generate an SSH key and add it to GitHub (the 5 steps)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-fix-2---the-key-exists-but-ssh-does-not-use-it-agent-config-multiple-keys"&gt;Fix 2 - The key exists but ssh does not use it (agent, config, multiple keys)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-fix-3---use-https-with-a-personal-access-token-instead"&gt;Fix 3 - Use HTTPS with a personal access token instead&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-gitlab-and-bitbucket---same-error-same-fix"&gt;GitLab and Bitbucket - same error, same fix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-windows---installing-the-openssh-client"&gt;Windows - installing the OpenSSH client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/lV5mrUYsucU?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-the-error-reproduced-and-what-github-is-actually-telling-you"&gt;1. The error, reproduced, and what GitHub is actually telling you&lt;/h2&gt;
&lt;p&gt;Here is the error exactly as it looks on 2026-10-12 with git 2.55 and OpenSSH 10.3, on a machine with no SSH key for GitHub -&lt;/p&gt;</description></item><item><title>Pass environment variables into a Helm chart: --set, values files, --set-string and the traps (Helm 4)</title><link>https://jhooq.com/helm-pass-environment-variables/</link><pubDate>Thu, 07 Jan 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-pass-environment-variables/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A Helm chart does not read your shell environment.&lt;/strong&gt; You pass a value in through a values file (&lt;code&gt;-f&lt;/code&gt;) or one of five command-line flags: &lt;code&gt;--set&lt;/code&gt;, &lt;code&gt;--set-string&lt;/code&gt;, &lt;code&gt;--set-file&lt;/code&gt;, &lt;code&gt;--set-json&lt;/code&gt; and &lt;code&gt;--set-literal&lt;/code&gt;. The template then writes it into the container &lt;code&gt;env:&lt;/code&gt; list.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Which value wins:&lt;/strong&gt; chart &lt;code&gt;values.yaml&lt;/code&gt; &amp;lt; &lt;code&gt;-f&lt;/code&gt; files (the right-most file wins) &amp;lt; &lt;code&gt;--set-json&lt;/code&gt; &amp;lt; &lt;code&gt;--set&lt;/code&gt; &amp;lt; &lt;code&gt;--set-string&lt;/code&gt; &amp;lt; &lt;code&gt;--set-file&lt;/code&gt; &amp;lt; &lt;code&gt;--set-literal&lt;/code&gt;. I confirmed the first five on Helm 4.3.1 on 2026-10-27; the order of the flags on the command line does not matter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The trap with numbers:&lt;/strong&gt; &lt;code&gt;tag: 1.10&lt;/code&gt; in a values file is parsed as the float 1.1 and renders as &lt;code&gt;nginx:1.1&lt;/code&gt;. &lt;code&gt;--set image.tag=1.10&lt;/code&gt; and a quoted &lt;code&gt;&amp;quot;1.10&amp;quot;&lt;/code&gt; both keep &lt;code&gt;1.10&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The trap with commas:&lt;/strong&gt; &lt;code&gt;--set key=a,b&lt;/code&gt; fails with &lt;code&gt;key &amp;quot;b&amp;quot; has no value&lt;/code&gt;. Escape it as &lt;code&gt;a\,b&lt;/code&gt; or use &lt;code&gt;--set-literal&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your case?&lt;/strong&gt; To compare several values files in depth read &lt;a href="https://jhooq.com/helm-multiple-values-files/"&gt;helm multiple values files&lt;/a&gt;; if you have never built a chart, start with &lt;a href="https://jhooq.com/getting-start-with-helm-chart/"&gt;getting started with Helm&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/dKKMJseMiGU?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-what-the-chart-actually-does-with-environment-variables"&gt;What the chart actually does with environment variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-the-lab-chart"&gt;The lab chart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-pass-values-with-set"&gt;Pass values with set&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-pass-values-with-a-values-file"&gt;Pass values with a values file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-which-value-wins"&gt;Which value wins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-shell-variables-files-and-json"&gt;Shell variables, files and JSON&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-which-flag-should-you-use"&gt;Which flag should you use&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-what-the-chart-actually-does-with-environment-variables"&gt;1. What the chart actually does with environment variables&lt;/h2&gt;
&lt;p&gt;People ask &amp;quot;how do I pass an environment variable into Helm&amp;quot; and mean two different things. The first meaning is a &lt;strong&gt;container environment variable&lt;/strong&gt;: an entry in the &lt;code&gt;env:&lt;/code&gt; list of a pod, such as &lt;code&gt;DB_HOST=db.internal.example&lt;/code&gt;. The second meaning is a &lt;strong&gt;value from your shell&lt;/strong&gt; (&lt;code&gt;$DB_HOST&lt;/code&gt; in the terminal) that you want to land in the chart. Helm has no feature that reads the shell for you. A template can only read the object called &lt;code&gt;.Values&lt;/code&gt;, and &lt;code&gt;.Values&lt;/code&gt; is built from the chart's own &lt;code&gt;values.yaml&lt;/code&gt; plus whatever you hand over with &lt;code&gt;-f&lt;/code&gt; and &lt;code&gt;--set*&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Helm install: unknown flag --name and must either provide a name or specify --generate-name (Fixed on Helm 4)</title><link>https://jhooq.com/helm-install-unknown-flag/</link><pubDate>Tue, 05 Jan 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-install-unknown-flag/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Error: unknown flag: --name&lt;/code&gt;&lt;/strong&gt; means you typed a Helm 2 command. Since Helm 3 the release name is a positional argument: &lt;code&gt;helm install RELEASE_NAME CHART&lt;/code&gt;, with no &lt;code&gt;--name&lt;/code&gt; flag. I reproduced this on Helm 4.3 on 2026-10-28, and the same flag removal hits &lt;code&gt;helm template --name&lt;/code&gt; and &lt;code&gt;helm upgrade --install --name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Error: INSTALLATION FAILED: must either provide a name or specify --generate-name&lt;/code&gt;&lt;/strong&gt; means you gave a chart but no release name. Either add the name (&lt;code&gt;helm install myrel ./helloworld&lt;/code&gt;) or pass &lt;code&gt;--generate-name&lt;/code&gt; (&lt;code&gt;helm install --generate-name ./helloworld&lt;/code&gt;, which gave me &lt;code&gt;helloworld-1793164328&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The release name has limits&lt;/strong&gt;: lowercase letters, digits, &lt;code&gt;-&lt;/code&gt; and &lt;code&gt;.&lt;/code&gt;, and at most 53 characters. &lt;code&gt;helloWorldRelease&lt;/code&gt;, &lt;code&gt;my_rel&lt;/code&gt; and a 54-character name were all rejected in my runs, so the example in many old tutorials, including the first version of this post, fails on uppercase alone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If the command is accepted but you want to see what it would create, read &lt;a href="https://jhooq.com/helm-dry-run-install/"&gt;helm install --dry-run&lt;/a&gt;; if you are brand new to charts, start with &lt;a href="https://jhooq.com/getting-start-with-helm-chart/"&gt;getting started with Helm&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/9vJgQnQXdfk?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#the-two-errors-and-what-causes-them"&gt;The two errors and what causes them&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fix-1-put-the-release-name-before-the-chart"&gt;Fix 1: put the release name before the chart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#fix-2-let-helm-generate-the-name"&gt;Fix 2: let Helm generate the name&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#release-name-rules"&gt;Release name rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#other-helm-2-flags-that-no-longer-exist"&gt;Other Helm 2 flags that no longer exist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#quick-reference-table"&gt;Quick reference table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="the-two-errors-and-what-causes-them"&gt;The two errors and what causes them&lt;/h2&gt;
&lt;p&gt;Both errors come from the same change. In Helm 2 you wrote &lt;code&gt;helm install --name myrel stable/nginx&lt;/code&gt;. Helm 3 removed the &lt;code&gt;--name&lt;/code&gt; flag, and Helm 4 keeps it that way. The usage line of &lt;code&gt;helm install&lt;/code&gt; on Helm 4.3 shows the new shape, which I read from &lt;code&gt;helm install --help&lt;/code&gt; on 2026-10-28:&lt;/p&gt;</description></item><item><title>Why I dumped Wordpress and switched to Hugo static site generator</title><link>https://jhooq.com/hugo-vs-wordpress/</link><pubDate>Mon, 04 Jan 2021 00:00:00 +0000</pubDate><guid>https://jhooq.com/hugo-vs-wordpress/</guid><description>
&lt;br/&gt;
&lt;h2 id="1introduction"&gt;1.Introduction&lt;/h2&gt;
&lt;p&gt;I started my &lt;a href="https://jhooq.com"&gt;blog&lt;/a&gt; in January 2019 and like other bloggers, I also choose &lt;a href="https://wordpress.com/"&gt;Wordpress&lt;/a&gt; as my
preferred
CMS tool for blogging. I was very happy with the out of the box features provided by the &lt;a href="https://wordpress.com/"&gt;Wordpress&lt;/a&gt; but as I started
putting more and more content on my blog I started to notice some problems with WordPress in terms of -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Scalability&lt;/li&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="2-behind-the-scene-of-wordpress"&gt;2. Behind the scene of WordPress&lt;/h2&gt;
&lt;p&gt;Before I start comparing the pros and cons of &lt;a href="https://wordpress.com/"&gt;Wordpress&lt;/a&gt; with &lt;a href="https://gohugo.io"&gt;GoHugo&lt;/a&gt;. Let see what happens behind the scene when you use WordPress. For setting up the WordPress blog you need to fix
the following component so that your blog/website is live on the internet&lt;/p&gt;</description></item><item><title>helm install --dry-run Explained (Helm 4) - client vs server, --debug, helm upgrade --dry-run, and What Each Mode Actually Checks</title><link>https://jhooq.com/helm-dry-run-install/</link><pubDate>Fri, 25 Dec 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-dry-run-install/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;helm install &amp;lt;name&amp;gt; &amp;lt;chart&amp;gt; --dry-run=client&lt;/code&gt;&lt;/strong&gt; renders the chart and prints what an install would print, the release header, hooks, manifest and NOTES, without touching a cluster. In Helm 4.3.1 it ran with no kubeconfig at all in about 0.23 seconds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;--dry-run=server&lt;/code&gt;&lt;/strong&gt; sends the render to the API server in dry-run mode, so &lt;code&gt;lookup&lt;/code&gt; returns real objects and conflicts with running resources are found. It needs a reachable cluster and fails fast without one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plain &lt;code&gt;--dry-run&lt;/code&gt; with no value is deprecated in Helm 4.&lt;/strong&gt; It still works as &lt;code&gt;client&lt;/code&gt;, but prints a warning. Write &lt;code&gt;--dry-run=client&lt;/code&gt; or &lt;code&gt;--dry-run=server&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;helm upgrade --dry-run=client&lt;/code&gt; needs a cluster,&lt;/strong&gt; because it has to read the release that is already installed. Only &lt;code&gt;helm install&lt;/code&gt; can dry-run offline.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do not trust the client dry run as a schema check.&lt;/strong&gt; A misspelled &lt;code&gt;replica:&lt;/code&gt; field passed both &lt;code&gt;--dry-run=client&lt;/code&gt; and &lt;code&gt;helm lint&lt;/code&gt; in my test.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you only want the YAML a chart produces, with no release and no cluster at all, read &lt;a href="https://jhooq.com/helm-template-command/"&gt;helm template explained&lt;/a&gt;; if you are new to charts, start with &lt;a href="https://jhooq.com/getting-start-with-helm-chart/"&gt;getting started with Helm&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/gb5nYiWAIUs?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-which-one-should-you-use"&gt;Which one should you use?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-helm-install---dry-runclient---debug-with-the-real-output"&gt;helm install --dry-run=client --debug, with the real output&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-client-vs-server-vs-none-in-helm-4"&gt;client vs server vs none in Helm 4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-does-a-dry-run-need-a-kubernetes-cluster"&gt;Does a dry run need a Kubernetes cluster?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-where-helm-template-fits"&gt;Where helm template fits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-helm-lint-and-what-it-does-not-catch"&gt;helm lint, and what it does not catch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-helm-upgrade---dry-run-and-helm-diff-for-an-existing-release"&gt;helm upgrade --dry-run and helm diff for an existing release&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-what-broke-when-i-ran-this"&gt;What broke when I ran this&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#9-common-errors-with-helm-dry-run"&gt;Common errors with helm dry run&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-conclusion"&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-which-one-should-you-use"&gt;1. Which one should you use?&lt;/h2&gt;
&lt;p&gt;When I recorded the video in 2021, &lt;code&gt;--dry-run&lt;/code&gt; was a simple on or off switch. Helm 3.13 turned it into three modes, and Helm 4 changed the defaults again, so I re-ran everything in this post with Helm 4.3.1 on 2026-10-26. To be sure which commands really work offline, I pointed &lt;code&gt;KUBECONFIG&lt;/code&gt; at a file that does not exist before running anything.&lt;/p&gt;</description></item><item><title>How to fix - Error create failed to create Secret invalid metadata.name Invalid value DNS-1123 subdomain must consist of lower case alphanumeric characters - or ., and must start and end with an alphanumeric character (e.g. example.com, regex used for validation is)</title><link>https://jhooq.com/helm-chart-failed-to-create/</link><pubDate>Tue, 22 Dec 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-chart-failed-to-create/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
In this article we are going to see how to fix -
&lt;blockquote&gt;
&lt;p&gt;Error create failed to create Secret sh.helm.release.v1.demoChart.v1 is invalid metadata.name Invalid value sh.helm.release.v1.demoChart.v1 a DNS-1123 subdomain must consist of lower case alphanumeric characters - or ., and must start and end with an alphanumeric character (e.g. example.com, regex used for validation is [a-z0-9] ([-a-z0-9] * [a-z0-9])?(.[a-z0-9] ([-a-z0-9] * [a-z0-9])?)*)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br/&gt;
&lt;h2 id="root-cause"&gt;Root Cause&lt;/h2&gt;
&lt;p&gt;The root cause behind this issue can be one of the following -&lt;/p&gt;</description></item><item><title>Kubernetes Updates</title><link>https://jhooq.com/kubernetes-updates/</link><pubDate>Fri, 04 Dec 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-updates/</guid><description>
&lt;h4 id="december-04-2020"&gt;December 04, 2020&lt;/h4&gt;
&lt;h2 id="kubernetes-is-deprecating-docker-support-and-how-should-you-prepare-for-it"&gt;Kubernetes is deprecating Docker support and how should you prepare for it?&lt;/h2&gt;
&lt;p&gt;As of &lt;strong&gt;December 02, 2020&lt;/strong&gt; &lt;a href="https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/"&gt;Kubernetes&lt;/a&gt; has announced that going forward Kubernetes is going to &lt;a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.20.md#deprecation"&gt;deprecate Docker&lt;/a&gt; as their preferred container runtime environment.&lt;/p&gt;
&lt;p&gt;In the &lt;a href="https://www.docker.com/"&gt;DevOps&lt;/a&gt; community Docker is considered as a backbone when it comes to virtualization and since the inception of Kubernetes in the DevOps community &lt;strong&gt;Docker&lt;/strong&gt; has been the preferred choice by the developer community. So Docker being adopted widely by the developer(real human being) as well as Kubernetes(not a real human being).&lt;/p&gt;</description></item><item><title>Convert Kubernetes YAML into a Helm Chart (Helm 4): Deployment and Service to values.yaml, Step by Step with helm template</title><link>https://jhooq.com/convert-kubernetes-yaml-into-helm/</link><pubDate>Thu, 26 Nov 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/convert-kubernetes-yaml-into-helm/</guid><description>
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You do not rewrite your Deployment and Service when you move to Helm.&lt;/strong&gt; &lt;code&gt;helm create&lt;/code&gt; already generates templates that read &lt;code&gt;image.repository&lt;/code&gt;, &lt;code&gt;image.tag&lt;/code&gt;, &lt;code&gt;replicaCount&lt;/code&gt;, &lt;code&gt;service.type&lt;/code&gt; and &lt;code&gt;service.port&lt;/code&gt; from &lt;code&gt;values.yaml&lt;/code&gt;. For my Spring Boot demo, converting meant changing four keys in &lt;code&gt;values.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Render before you install.&lt;/strong&gt; &lt;code&gt;helm template demo ./demochart&lt;/code&gt; prints the YAML the chart would send to the cluster, with no cluster and no kubeconfig. I used it after every edit and compared the result with my original manifests.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Four things go wrong:&lt;/strong&gt; an empty &lt;code&gt;image.tag&lt;/code&gt; silently falls back to &lt;code&gt;appVersion&lt;/code&gt; (I got &lt;code&gt;rahulwagh17/kubernetes:1.16.0&lt;/code&gt;), the default liveness and readiness probes stay in your output, a typo in a template gives &lt;code&gt;nil pointer evaluating interface {}.name&lt;/code&gt;, and one bad indent in &lt;code&gt;values.yaml&lt;/code&gt; makes &lt;code&gt;helm lint&lt;/code&gt; stop with &lt;code&gt;unable to load chart&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The chart in this post is 12 files and packages to a 4,954 byte &lt;code&gt;demochart-0.1.0.tgz&lt;/code&gt;.&lt;/strong&gt; The two original manifests are 364 and 196 bytes; the chart renders 73 lines of YAML in about 1.2 seconds per &lt;code&gt;helm template&lt;/code&gt; run (average of 10 runs).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; If you only want to see how rendering works, read &lt;a href="https://jhooq.com/helm-template-command/"&gt;helm template explained&lt;/a&gt;; if you have never built a chart, start with &lt;a href="https://jhooq.com/getting-start-with-helm-chart/"&gt;getting started with Helm chart&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/ZZVXXEyEzAs?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt="Where each field of a plain Kubernetes YAML goes in a Helm chart"
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/helm/convert-yaml/k8s-yaml-to-helm-chart-mapping.svg"
title="Fields of k8s-deployment.yaml and k8s-service.yaml mapped to values.yaml keys"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Fields of k8s-deployment.yaml and k8s-service.yaml mapped to values.yaml keys&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Helm chart - Wordpress Installation with MariaDB on Kubernetes</title><link>https://jhooq.com/helm-chart-wordpress-installation/</link><pubDate>Thu, 26 Nov 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-chart-wordpress-installation/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/11/wordpress-helm.webp"
title="Wordpress Helm Chart Installation"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Wordpress Helm Chart Installation&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;br/&gt;
&lt;p&gt;In this tutorial, we are going to install WordPress with MariaDB using the &lt;a href="https://helm.sh/"&gt;Helm Chart&lt;/a&gt; on &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; cluster. With this installation, we are going to see - How we can upgrade as well as rollback the Helm Chart release of WordPress. This complete setup inherited the benefits of the Kubernetes .i.e. scalability and availability.&lt;/p&gt;
&lt;p&gt;Since we are installing WordPress, so we need to have a database running behind the WordPress application. From the database standpoint, we are going to use MariaDB. Helm chart ships all these components in a single package, so that we need not worry about installing each component separately.&lt;/p&gt;</description></item><item><title>Helm chart - How to Add/Install plugins</title><link>https://jhooq.com/helm-chart-plugin/</link><pubDate>Fri, 20 Nov 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/helm-chart-plugin/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;Helm is feature rich framework for Kubernetes and it has one more pluggable feature know as Plugins. Helm Charts are build on the principle of pluggable component.&lt;/p&gt;
&lt;p&gt;Hence Helm community maintains lots of additional plugin to ease out day to day operations.&lt;/p&gt;
&lt;p&gt;You can check list of plugins here - &lt;a href="https://helm.sh/docs/community/related/"&gt;Helm Chart Plugins&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this article we are going to focus on Helm diff plugin.&lt;/p&gt;
&lt;h2 id="table-of-content"&gt;Table of Content&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#1-lets-talk-about----helm-diff-plugin"&gt;Lets talk about - Helm Diff Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#2-lets-install-the-helm-diff-plugin"&gt;Lets install the Helm Diff plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#3-lets-play-with-helm-diff-command"&gt;Lets play with Helm Diff Command&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#4-run-helm-diff-command"&gt;Run Helm Diff command&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#5-uninstall-the-plugin"&gt;Uninstall the plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/helm-chart-plugin/#conclusion"&gt;Uninstall the plugin any deployment and service inside the Kubernetes cluster&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/mfGen_1foPM?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-lets-talk-about----helm-diff-plugin"&gt;1. Lets talk about - Helm Diff Plugin&lt;/h2&gt;
&lt;p&gt;There is one plugin which I found very useful in managing the release is &lt;strong&gt;Helm Diff Plugin&lt;/strong&gt;.
This plugin helps you with -&lt;/p&gt;</description></item><item><title>Getting Started with Helm - Install Helm 4, Create Your First Hello World Chart, and Add Chart Repositories and OCI Registries</title><link>https://jhooq.com/getting-start-with-helm-chart/</link><pubDate>Sat, 07 Nov 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/getting-start-with-helm-chart/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;a href="https://helm.sh/docs/"&gt;Helm&lt;/a&gt; is the package manager for Kubernetes. A &lt;strong&gt;Helm chart&lt;/strong&gt; is a bundle of templated Kubernetes YAML files plus a &lt;code&gt;values.yaml&lt;/code&gt; with the defaults, and &lt;code&gt;helm install&lt;/code&gt; renders that bundle and creates all the resources in one go, tracking them as a &lt;strong&gt;release&lt;/strong&gt; you can upgrade, roll back and uninstall as a unit.&lt;/p&gt;
&lt;p&gt;In a production environment where you manage a lot of Kubernetes resources, &lt;a href="https://helm.sh/docs/topics/charts/"&gt;Helm charts&lt;/a&gt; save you from the cumbersome and error-prone job of applying and keeping in sync dozens of individual YAML files - and they are how almost every open-source project (Prometheus, NGINX Ingress, cert-manager, Argo CD ...) ships its Kubernetes installation.&lt;/p&gt;</description></item><item><title>CI/CD Kubernetes | Setting up CI/CD Jenkins pipeline for kubernetes</title><link>https://jhooq.com/ci-cd-jenkins-kubernetes/</link><pubDate>Tue, 20 Oct 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/ci-cd-jenkins-kubernetes/</guid><description>
&lt;br/&gt;
&lt;p&gt;In this article we are going to focus on Setting up CI/CD Jenkins pipeline for kubernetes. We will be using &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;, &lt;a href="https://www.docker.com/"&gt;Docker&lt;/a&gt;, &lt;a href="https://hub.docker.com/"&gt;DockerHub&lt;/a&gt;, &lt;a href="https://www.jenkins.io/"&gt;Jenkins&lt;/a&gt; and &lt;a href="https://kubernetes.io/"&gt;Kubernetes Cluster&lt;/a&gt; to achieve this.&lt;/p&gt;
&lt;p&gt;For the complete lab session we are going to setup every component from scratch and for that we will be using &lt;a href="https://www.vagrantup.com/"&gt;Vagrant&lt;/a&gt; for provisioning the virtual environment. All the VMs will use Ubuntu as its base operating system.&lt;/p&gt;
&lt;br/&gt;
&lt;h2 id="pre-requisite"&gt;Pre-Requisite&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Vagrant&lt;/li&gt;
&lt;li&gt;Virtual Box&lt;/li&gt;
&lt;li&gt;IDE(Sublime, Atom, or Visual Studio)&lt;/li&gt;
&lt;li&gt;Kubernetes Cluster (&lt;em&gt;We need kubernetes cluster already setup - If you do not have kubernetes cluster then please do follow this lab session for setting it up - &lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;Kubernetes Cluster Setup&lt;/a&gt;&lt;/em&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/TPMUxsRI1OA?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-understanding-the-complete-setup"&gt;1. Understanding the complete setup&lt;/h2&gt;
&lt;p&gt;Alright so before we start setting up our CI/CD pipeline I am assuming you have setup your kuernetes cluster already.&lt;/p&gt;</description></item><item><title>Kubernetes cluster setup with Jenkins</title><link>https://jhooq.com/kubernetes-Jenkins-and-spring-boot/</link><pubDate>Thu, 24 Sep 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/kubernetes-Jenkins-and-spring-boot/</guid><description>
&lt;p&gt;In the DevOps world if you do not talk about &lt;strong&gt;&lt;a href="https://www.jenkins.io/"&gt;Jenkins&lt;/a&gt;, Continuous Integration, and Continuous Delivery&lt;/strong&gt; then you are missing a big chunk of it and with the inception of &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; DevOps has grown its territory by 10 folds.&lt;/p&gt;
&lt;p&gt;In this article, we are going to integrate -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Jenkins&lt;/li&gt;
&lt;li&gt;Kuberneteshttps&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="pre-requisite"&gt;Pre-Requisite&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Vagrant&lt;/li&gt;
&lt;li&gt;Virtual Box&lt;/li&gt;
&lt;li&gt;IDE(Sublime, Atom, or Visual Studio)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="1-spin-up-the-vagrant-box-vagranfile"&gt;1. Spin-up the vagrant box Vagranfile&lt;/h2&gt;
&lt;p&gt;The first and the far most we need a Kubernetes cluster and for that we need a virtual machine.&lt;/p&gt;</description></item><item><title>Spring Boot Microservices with Docker | Dockerfile |docker-compose.yml</title><link>https://jhooq.com/spring-boot-with-docker/</link><pubDate>Sun, 06 Sep 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/spring-boot-with-docker/</guid><description>
&lt;p&gt;This article is targeted for those who want to learn more about &lt;a href="https://www.docker.com/"&gt;docker&lt;/a&gt; and How they can integrate Docker with their existing applications.&lt;/p&gt;
&lt;p&gt;The base application we are going to take is a &lt;a href="https://spring.io/projects/spring-boot"&gt;Spring Boot Application&lt;/a&gt;. The spring Boot application will be very simple with one Microservice for “Hello World”.&lt;/p&gt;
&lt;h2 id="contents"&gt;Contents&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-1"&gt;Creating your first Spring Boot Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-2"&gt;Create a very basic Docker Image and run the Spring Boot Application from Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-3"&gt;Finally, upload Spring Boot Docker Image to &lt;strong&gt;hub.docker.com&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-4"&gt;Run the docker image with and without profiles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-5"&gt;Using docker-compose build and docker-compose up -d&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-6"&gt;docker-compose stop and docker-compose rm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/spring-boot-with-docker/#step-7"&gt;Lab Session&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="github-repo"&gt;GitHub Repo&lt;/h2&gt;
&lt;p&gt;Here is the github repository link for the project - &lt;strong&gt;&lt;a href="https://github.com/rahulwagh/spring-boot-docker.git"&gt;https://github.com/rahulwagh/spring-boot-docker.git&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>How to use Persistent Volume and Persistent Claims | Kubernetes</title><link>https://jhooq.com/how-to-use-persistent-volume-and-persistent-claims-kubernetes/</link><pubDate>Sun, 30 Aug 2020 20:56:28 +0000</pubDate><guid>https://jhooq.com/how-to-use-persistent-volume-and-persistent-claims-kubernetes/</guid><description>
&lt;p&gt;Working with kubernetes is always fun as well as challenging. The more you dive deep into the kubernetes ecosystem the more you learn.&lt;/p&gt;
&lt;p&gt;It always bugged me when I started working with kubernetes that - &lt;strong&gt;How can I retain the data after the end of pod life cycle?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Answer is -&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Kubernetes Persistent Volume and Persistent claims help you to retain the data of the pod even after the end of the pod life cycle&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>How to fix ProvisioningFailed persistentvolume controller no volume plugin matched</title><link>https://jhooq.com/persistent-volume-no-volume-plugin-matched/</link><pubDate>Thu, 27 Aug 2020 17:50:17 +0000</pubDate><guid>https://jhooq.com/persistent-volume-no-volume-plugin-matched/</guid><description>
&lt;p&gt;Well If you ended up on this article then just like me you are also facing the Warning &lt;strong&gt;no volume plugin matched&lt;/strong&gt; inside your Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/08/Screenshot-from-2020-08-27-20-04-39-1024x65.png"
title="Warning ProvisioningFailed persistentvolume-controller no volume plugin matched"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Warning ProvisioningFailed persistentvolume-controller no volume plugin matched&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Before you read further let me ask you a question &lt;strong&gt;&lt;em&gt;Are you trying to set up the Dynamic Volume Provisioning on Local Virtual environment?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your answer is &lt;strong&gt;YES&lt;/strong&gt; then unfortunately Kubernetes does not support it.&lt;/p&gt;</description></item><item><title>Fixing – Cannot bind to requested volume: storageClasseName does not match</title><link>https://jhooq.com/storage-classe-name-does-not-match/</link><pubDate>Mon, 24 Aug 2020 17:33:16 +0000</pubDate><guid>https://jhooq.com/storage-classe-name-does-not-match/</guid><description>
&lt;p&gt;I faced this issue when &lt;a href="https://jhooq.com/how-to-use-persistent-volume-and-persistent-claims-kubernetes/"&gt;I started working with kuberenetes Persistent Volume and Kuberenetes Persistent Claim&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This issue has occurred because its expecting &lt;a href="https://kubernetes.io/docs/concepts/storage/storage-classes/"&gt;storageClass&lt;/a&gt; to be present inside your &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt;. Most probably you might have missed creating &lt;strong&gt;storageClass&lt;/strong&gt; or you might have used the wrong &lt;strong&gt;storageClass&lt;/strong&gt; name in your Persistent Volume Claim Configuration&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You might have seen &lt;em&gt;&lt;strong&gt;Warning ProvisioningFailed&lt;/strong&gt; &lt;strong&gt;persistentvolume-controller storageclass.storage.k8s.io not found&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Here is the full stacktrace of the error -&lt;/p&gt;
&lt;p&gt;(Below the screenshot you will find the complete log trace)&lt;/p&gt;</description></item><item><title>Fixing – pod has unbound immediate persistentvolumeclaims or cannot bind to requested volume incompatible accessmode</title><link>https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/</link><pubDate>Sun, 23 Aug 2020 19:05:01 +0000</pubDate><guid>https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
&lt;h6 id="there-could-be-multiple-reasons-behind-this-issue"&gt;There could be multiple reasons behind this issue.&lt;/h6&gt;
&lt;p&gt;But before we jump to the solution, first let us see how to identify the issue -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#how-to-identify-the-issue"&gt;How to identify the issue? &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;h6 id="once-you-identify-the-issue-then-here-are-the-possible-solutions--"&gt;Once you identify the issue then here are the possible solutions -&lt;/h6&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#1-mismatch-in-the-accessmodes-of-persistent-volume-and-persistent-volume-claim"&gt;Mismatch in the &lt;strong&gt;&lt;em&gt;accessModes&lt;/em&gt;&lt;/strong&gt; of &lt;em&gt;Persistent Volume&lt;/em&gt; and &lt;em&gt;Persistent Volume Claim&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#2-pvpersistent-volume-capacity-is-less-than-pvcpersistent-volume-claim"&gt;PV(Persistent Volume) capacity is less than PVC(Persistent Volume Claim)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#3-total-number-of-pvcpersistent-volume-claim-is-higher-than-pvpersistent-volume"&gt;Total number of PVC(Persistent Volume Claim) is higher than PV(Persistent Volume)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#4-nodeaffinity-of-the-pv-is-missing"&gt;nodeAffinity of the PV is missing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/pod-has-unbound-immediate-persistent-volume-claims/#5-clean-up-the-old-pvpersistent-volume-and-pvcpersistent-volume-claim"&gt;Clean up the OLD PV(Persistent Volume) and PVC(Persistent Volume Claim)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="how-to-identify-the-issue"&gt;How to identify the issue?&lt;/h2&gt;
&lt;p&gt;The first which I would recommend is to check the status of the Persistent Volume claim using the following command -&lt;/p&gt;</description></item><item><title>Docker COPY vs Docker ADD?</title><link>https://jhooq.com/docker-copy-vs-docker-add/</link><pubDate>Fri, 14 Aug 2020 19:38:32 +0000</pubDate><guid>https://jhooq.com/docker-copy-vs-docker-add/</guid><description>
&lt;p&gt;Since the inception of the docker, it has undoubtedly eased the application development for developers like us. With Docker, you no longer bounded with Operating system, architecture, frameworks, and compatibility.&lt;/p&gt;
&lt;p&gt;With docker you can pretty much prepare your development environment with required libs and avoiding unnecessary stuffing of other libraries.&lt;/p&gt;
&lt;p&gt;But with growing popularity of docker some docker commands makes me confuse such &lt;code&gt;COPY&lt;/code&gt; and &lt;code&gt;ADD&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the nutshell both &lt;code&gt;COPY&lt;/code&gt; and &lt;code&gt;ADD&lt;/code&gt; commands behave the same but still I felt a significant difference between these commands. Here is the &lt;a href="https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy"&gt;Official Guide&lt;/a&gt; from docker.&lt;/p&gt;</description></item><item><title>How to fix - nginx ingress controller crashloopbackoff error</title><link>https://jhooq.com/nginx-ingress-controller-crashloopbackoff-error/</link><pubDate>Tue, 11 Aug 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/nginx-ingress-controller-crashloopbackoff-error/</guid><description>
&lt;p&gt;I faced this issue while I was trying to &lt;a href="https://jhooq.com/ingress-controller-nginx/"&gt;install the nginx ingress controller along with HAproxy loadbalancer on my kuberentes cluster&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To be honest I had this issue because I missed to &lt;strong&gt;&lt;em&gt;create config map&lt;/em&gt;&lt;/strong&gt; during the setup.&lt;/p&gt;
&lt;p&gt;But there could be many reasons behind this issue. We will take each possible scenario and look at how to fix this issue.&lt;/p&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h3 id="1-nginx-ingress-controller-crashloopbackoff-error-exit-code-255"&gt;1. nginx ingress controller crashloopbackoff error exit code 255&lt;/h3&gt;
&lt;p&gt;This was the first error which I got when I was trying to setup the HAProxy loadbalancer along with Nginx ingress controller on my kubernetes cluster.&lt;/p&gt;</description></item><item><title>6 Ways to fix - Got permission denied while trying to connect to the Docker daemon socket?</title><link>https://jhooq.com/permission-denied-docker-daemon/</link><pubDate>Sun, 02 Aug 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/permission-denied-docker-daemon/</guid><description>
&lt;p&gt;I faced this issue couple of times and both times I had the same error but with different error messages text. The first error message which I got was -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;docker Got permission denied while trying to connect to the Docker daemon socket at unix&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;the second time I got the error message - &lt;strong&gt;&lt;em&gt;Can not connect to docker daemon. Is docker -d running on this host?&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But in the end, both are the same issues, in this article I have written down the different approaches which I have taken to troubleshoot this issue. It is a possibility that some of the approaches described in the article might not work for you. So I would highly encourage you to read all the approaches and see which one works for you.&lt;/p&gt;</description></item><item><title>Setting up Ingress controller NGINX along with HAproxy for Microservice deployed inside Kubernetes cluster</title><link>https://jhooq.com/ingress-controller-nginx/</link><pubDate>Thu, 30 Jul 2020 08:42:10 +0000</pubDate><guid>https://jhooq.com/ingress-controller-nginx/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/07/Screenshot-2020-07-28-at-16.23.14-1024x634.jpg"
title="Setting up Ingress controller NGINX along with HAproxy for Microservice deployed inside Kubernetes cluster"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Setting up Ingress controller NGINX along with HAproxy for Microservice deployed inside Kubernetes cluster&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Working with kubernetes and managing the external traffic is like juggling more than two balls. All cloud service provider (&lt;a href="https://cloud.google.com/"&gt;GCP&lt;/a&gt;,&lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt;, &lt;a href="https://www.openshift.com/"&gt;Openshift&lt;/a&gt;, &lt;a href="https://www.digitalocean.com/"&gt;Digital Ocean&lt;/a&gt;) comes with their own load balancer which can help us exposing internal service deployed inside kubernetes cluster to the external world.&lt;/p&gt;</description></item><item><title>Building first Helm Chart with Spring Boot Microservices</title><link>https://jhooq.com/building-first-helm-chart-with-spring-boot/</link><pubDate>Wed, 15 Jul 2020 21:08:41 +0000</pubDate><guid>https://jhooq.com/building-first-helm-chart-with-spring-boot/</guid><description>
&lt;p&gt;When someone talks about managing the &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; cluster then I can very much assume that a particular someone is running a lot of &lt;strong&gt;kubectl&lt;/strong&gt;, &lt;strong&gt;kubeadm&lt;/strong&gt; command on terminal and which is quite obvious because managing kubernetes cluster is not as easy as it seems to be.&lt;/p&gt;
&lt;p&gt;Managing kubernets cluster means checking cluster, pods, nodes, application deployment, replicas, load-balancer and the list goes one. So the question which arises in my mind -&lt;/p&gt;</description></item><item><title>How to fix kubernetes dashboard forbidden 403 error – message services https kubernetes-dashboard is forbidden User</title><link>https://jhooq.com/message-services-https-kubernetes-dashboard-is-forbidden-user/</link><pubDate>Tue, 30 Jun 2020 13:18:21 +0000</pubDate><guid>https://jhooq.com/message-services-https-kubernetes-dashboard-is-forbidden-user/</guid><description>
&lt;p&gt;The objective of this article is to troubleshoot the &lt;em&gt;&lt;strong&gt;https kubernetes-dashboard is forbidden&lt;/strong&gt;&lt;/em&gt; error which you
might have encountered after setting up the kubernetes dashboard but while trying to access it via browser it is
throwing you &lt;em&gt;&lt;strong&gt;forbidden&lt;/strong&gt;&lt;/em&gt; error message.&lt;/p&gt;
&lt;p&gt;This blog is divided into two section -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-the-actual-kubernetes-dashboard-forbidden-error"&gt;The actual kubernetes dashboard forbidden error&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-root-cause-of-error"&gt;Root Cause&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-how-to-troubleshoot"&gt;How to Troubleshoot&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="1-the-actual-kubernetes-dashboard-forbidden-error"&gt;1. The actual kubernetes dashboard forbidden error&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Let me get straight to the point -&lt;/strong&gt; You are trying to setup Kubernetes dashboard. You have installed the
kubernetes dashboard using kubectl command -&lt;/p&gt;</description></item><item><title>How to fix Kubernetes – error execution phase preflight [preflight]</title><link>https://jhooq.com/kubernetes-error-execution-phase-preflight-preflight/</link><pubDate>Tue, 16 Jun 2020 10:23:04 +0000</pubDate><guid>https://jhooq.com/kubernetes-error-execution-phase-preflight-preflight/</guid><description>
&lt;p&gt;While working with &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; somewhere down the line you might have faced this error and there could be many reasons behind the issue &lt;strong&gt;&lt;em&gt;error execution phase preflight&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With my experience in working with &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; I found that this issue mostly occurs when you are trying to setup &lt;a href="https://kubernetes.io/"&gt;kubernetes&lt;/a&gt; cluster on your own and since you are setting it up by yourself than I can easily guess that you might miss a lot of technicalities and end up with this issue.&lt;/p&gt;</description></item><item><title>Deploy Spring Boot microservices on kubernetes?</title><link>https://jhooq.com/deploy-spring-boot-microservices-on-kubernetes/</link><pubDate>Wed, 10 Jun 2020 19:05:13 +0000</pubDate><guid>https://jhooq.com/deploy-spring-boot-microservices-on-kubernetes/</guid><description>
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: This is going to be long post and the objective of this blog post is to deploy &lt;a href="https://spring.io/microservices"&gt;Spring Boot Microservice&lt;/a&gt; into the &lt;a href="https://kubernetes.io/docs/concepts/architecture/"&gt;kubernetes cluster&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The main objective here is to build everything from scratch and what I mean by that - creating a Spring Boot Application RestMicroservice, Building a Docker image and Finally deploying docker image into the kubernetes cluster. Here are the steps which we will go through -&lt;/p&gt;
&lt;h2 id="kubernetes-part--1--steps-to-deploy-spring-boot-application-in-kubernetes-running-on-virtual-machine"&gt;Kubernetes Part -1 : Steps to Deploy Spring Boot application in Kubernetes running on Virtual Machine&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-create-a-spring-boot-application-using-the-spring-boot-initializr"&gt;Create a Spring Boot Application using the Spring Boot Initializr&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-import-the-spring-boot-project-into-ide"&gt;Import the spring boot project into IDE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-implement-your-microservice"&gt;Implement your microservice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-test-the-rest-webserive"&gt;Test the rest webservice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-5-docker-hub"&gt;Create Dockerfile for spring boot application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-create-docker-registry-at-httpshubdockercom"&gt;Create Docker registry at &amp;quot;https://hub.docker.com/&amp;quot;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-docker-build--docker-push-image"&gt;&amp;quot;docker build&amp;quot; &amp;amp;&amp;amp; &amp;quot;docker push image&amp;quot;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-start-kubernetes-cluster"&gt;Start kubernetes cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-9-k8s-cluster-deploy"&gt;Deploy Spring Boot microservices on kubernetes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#10-clean-up-the-deployment-and-service"&gt;Clean up the Deployment and Service&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="kubernetes-part--2--steps-to-deploy-spring-boot-application-in-kubernetes-running-on-google-cloud"&gt;Kubernetes Part -2 : Steps to Deploy Spring Boot application in Kubernetes running on Google Cloud&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#1-create-a-project-on-google-cloud"&gt;Create a project on Google Cloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-create-kubernetes-cluster-on-google-cloud"&gt;Create Kubernetes Cluster on Google Cloud&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-push-spring-boot-docker-image-to-google-container-registrygcrio"&gt;Push spring boot docker image to google container registry(gcr.io)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-deploy-the-spring-boot-microservice-inside-kubernetes-cluster-running-on-google-cloud"&gt;Deploy the spring boot microservice inside kubernetes cluster running on Google Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the &lt;a href="#part-1"&gt;&lt;strong&gt;&lt;em&gt;Part-1&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; of this blog we will first build and deploy Spring Boot microservice application into the Kubernetes cluster running into &lt;a href="https://www.virtualbox.org/"&gt;virtual machine&lt;/a&gt; using &lt;a href="https://www.vagrantup.com/"&gt;Vagrant&lt;/a&gt; and in the &lt;a href="#part-2"&gt;&lt;strong&gt;&lt;em&gt;Part-2&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; of this blog we will use &lt;a href="https://cloud.google.com/"&gt;Google Cloud&lt;/a&gt; to deploy the same Spring Boot microservice application.&lt;/p&gt;</description></item><item><title>How to fix – ansible_memtotal_mb minimal_master_memory_mb</title><link>https://jhooq.com/how-to-fix-ansible-memtotal-mb-minimal-master-memory-mb/</link><pubDate>Mon, 11 May 2020 19:54:59 +0000</pubDate><guid>https://jhooq.com/how-to-fix-ansible-memtotal-mb-minimal-master-memory-mb/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/05/logs.png"
title="ansible_memtotal_mb &amp;gt;= minimal_master_memory_mb"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;ansible_memtotal_mb &gt;= minimal_master_memory_mb&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;I faced this issue during &lt;strong&gt;&lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt;installation using kubespray&lt;/strong&gt;. If you are facing a similar issue with your ansible-playbook then it is time to increase the memory of your VMs&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For kubernetes installation using kubespray, please refer to &lt;a href="https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/"&gt;kubespray – 12 Steps for Installing a Production Ready Kubernetes Cluster&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id="root-cause--"&gt;Root Cause -&lt;/h4&gt;
&lt;p&gt;Ansible need more memory for running playbook on your linux machine.&lt;/p&gt;</description></item><item><title>How to use kubespray – 12 Steps for Installing a Production Ready Kubernetes Cluster</title><link>https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/</link><pubDate>Mon, 11 May 2020 18:56:21 +0000</pubDate><guid>https://jhooq.com/kubespray-12-steps-for-installing-a-production-ready-kubernetes-cluster/</guid><description>
&lt;br/&gt;
&lt;br/&gt;
Before we jump into the steps of installation, if you are familiar with Puppet, Chef and Ansible (&lt;a rel="noreferrer noopener" href="https://github.com/kubernetes-incubator/kubespray" target="_blank"&gt;https://github.com/kubernetes-incubator/kubespray&lt;/a&gt;) then kubespray is going to be the best choice to set up a Kubernetes cluster.
&lt;p&gt;In this article, we will be going through 12 steps starting from setting up vagrant VMs till running the final ansible-playbook.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt; - If you are a beginner with kubernetes then i would highly recommend to go through the manual installation of kubernetes on &lt;strong&gt;Ubuntu&lt;/strong&gt; or &lt;strong&gt;CentOS&lt;/strong&gt; and for the same you can refer to -&lt;/p&gt;</description></item><item><title>How to setup kubernetes on CentOS 8 and CentOS 7</title><link>https://jhooq.com/15-steps-to-install-kubernetes-on-bento-centos7/</link><pubDate>Sat, 02 May 2020 11:32:10 +0000</pubDate><guid>https://jhooq.com/15-steps-to-install-kubernetes-on-bento-centos7/</guid><description>
&lt;p&gt;This tutorial is for the ones who want to try out the Kubernetes installation on CentOS&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(This blog post has been updated and kubernetes installation instructions can be used for &lt;a href="https://wiki.centos.org/action/show/Manuals/ReleaseNotes/CentOS7.2009?action=show&amp;amp;redirect=Manuals%2FReleaseNotes%2FCentOS7"&gt;CentOS 7&lt;/a&gt; as well as &lt;a href="https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.1905"&gt;CentOS 8&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this article, I have simplified the installation into 15 steps for installing Kubernetes on CentOS &lt;strong&gt;bento/centos-7&lt;/strong&gt; and &lt;strong&gt;centos/stream8&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Before you begin with installation here are prerequisites for installing Kubernetes on CentOS.&lt;/p&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Reading time is about 20 minutes&lt;/li&gt;
&lt;li&gt;Vagrant 2.2.7 or latest – For installation instruction &lt;a href="https://www.vagrantup.com/downloads.html"&gt;click here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;VM VirtualBox – For installation instruction &lt;a href="https://www.virtualbox.org/wiki/Linux_Downloads"&gt;click here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="video"&gt;
&lt;iframe src="https://www.youtube.com/embed/w_NgQ2AxExQ?controls=1&amp;rel=0" loading="lazy"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h3 id="step-1-start-your-vagrant-box"&gt;Step 1: Start your vagrant box&lt;/h3&gt;
&lt;p&gt;Here is the Vagrantfile to spin up your vagrant box.&lt;/p&gt;</description></item><item><title>SSL certificate problem: self signed certificate in certificate chain - the fix for git, curl, npm, pip and Node (reproduced with a private CA)</title><link>https://jhooq.com/2-ways-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chain/</link><pubDate>Fri, 01 May 2020 09:26:34 +0000</pubDate><guid>https://jhooq.com/2-ways-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chain/</guid><description>
&lt;!-- no-video: no companion video for the certificate chain error yet; the SSL playlist covers the git and pip variants --&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The error means your client does not trust the issuer of the server's certificate.&lt;/strong&gt; Three wordings, one cause: &lt;code&gt;self-signed certificate in certificate chain&lt;/code&gt; (a private CA signed it, and the server sent the chain), &lt;code&gt;self-signed certificate&lt;/code&gt; (the leaf signed itself), &lt;code&gt;unable to get local issuer certificate&lt;/code&gt; (the server did not send the intermediate).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Where it comes from:&lt;/strong&gt; a corporate proxy or firewall that re-signs every HTTPS site with its own CA, or an internal Git, npm or PyPI server with a home-made certificate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The right fix is one file:&lt;/strong&gt; get the CA certificate (from your IT team, or exported from the browser) and point the tool at it. &lt;code&gt;git config --global http.sslCAInfo ~/corp-ca.pem&lt;/code&gt;, &lt;code&gt;curl --cacert&lt;/code&gt;, &lt;code&gt;npm config set cafile&lt;/code&gt;, &lt;code&gt;pip config set global.cert&lt;/code&gt;, &lt;code&gt;NODE_EXTRA_CA_CERTS=...&lt;/code&gt;. Or add it to the OS trust store once and every tool follows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The quick fix switches verification off:&lt;/strong&gt; &lt;code&gt;git -c http.sslVerify=false&lt;/code&gt;, &lt;code&gt;GIT_SSL_NO_VERIFY=true&lt;/code&gt;, &lt;code&gt;npm config set strict-ssl false&lt;/code&gt;, &lt;code&gt;pip --trusted-host&lt;/code&gt;, &lt;code&gt;curl -k&lt;/code&gt;. It works in one command, and from then on anything on the network path can read or alter the traffic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modern git hides the detail.&lt;/strong&gt; git 2.55 only prints &lt;code&gt;server certificate verification failed. CAfile: none&lt;/code&gt;; run the same URL through &lt;code&gt;curl&lt;/code&gt; to see which of the three errors it is.&lt;/li&gt;
&lt;li&gt;Every output below is from Ubuntu 24.04 with git 2.55, curl 8.5, OpenSSL 3.0.13, Node 22, npm 10 and Python 3.12, captured on 2026-10-15.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your exact case?&lt;/strong&gt; The closest post on this site is &lt;a href="https://jhooq.com/github-permission-denied-publickey/"&gt;git@github.com&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/ssl/self-signed-chain/three-tls-errors-one-cause.svg"
title="The three TLS error texts, which certificate chain produces each, and the right and quick fixes"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;The three TLS error texts, which certificate chain produces each, and the right and quick fixes&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>How to fix – How to fix - ERROR Swap running with swap on is not supported. Please disable swap</title><link>https://jhooq.com/how-to-fix-error-swap-running-with-swap-on-is-not-supported-please-disable-swap-error-execution-phase-preflight-preflight-some-fatal-errors-occurred/</link><pubDate>Fri, 24 Apr 2020 08:01:52 +0000</pubDate><guid>https://jhooq.com/how-to-fix-error-swap-running-with-swap-on-is-not-supported-please-disable-swap-error-execution-phase-preflight-preflight-some-fatal-errors-occurred/</guid><description>
&lt;p&gt;The root cause for the error is &lt;strong&gt;swapping is on master as well as worker node.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="fixing-the-error"&gt;Fixing the error&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; - Disable the swap on both master and worker node (please run the below command on both master and worker node)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;vagrant@master:~$ sudo swapoff -a
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; - After disabling the swap, re-run the &lt;strong&gt;kubeadm init&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;vagrant@master:~$ sudo kubeadm init --apiserver-advertise-address&lt;span class="o"&gt;=&lt;/span&gt;100.0.0.1 --pod-network-cidr&lt;span class="o"&gt;=&lt;/span&gt;10.244.0.0/16
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After that you should be able to initialize the kubernetes cluster successfully&lt;/p&gt;</description></item><item><title>14 Steps to Install kubernetes on Ubuntu 20.04(bento/ubuntu-20.04), 18.04(hashicorp/bionic64)</title><link>https://jhooq.com/14-steps-to-install-kubernetes-on-ubuntu-18-04-and-16-04/</link><pubDate>Fri, 24 Apr 2020 00:00:00 +0000</pubDate><guid>https://jhooq.com/14-steps-to-install-kubernetes-on-ubuntu-18-04-and-16-04/</guid><description>
&lt;p&gt;&lt;em&gt;&lt;strong&gt;(Note : - This article has been updated for installing kubernetes on ubuntu 20.04)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this article on &lt;strong&gt;How to Install kubernetes on Ubuntu 20.04 and18.04&lt;/strong&gt; we are going to setup Kubernetes cluster along with &lt;a href="https://github.com/kubernetes/kubeadm"&gt;kubeadm&lt;/a&gt; on Ubuntu 20.04 (The same steps can be used for the Ubuntu 18.04 as well as 16.04)&lt;/p&gt;
&lt;p&gt;We will start setting up everything from the scratch on virtual machine. Since we are setting up kubernetes cluster, so we will be provisioning two virtual machine - &lt;code&gt;kubernetes master(kmaster)&lt;/code&gt; and &lt;code&gt;kubernetes kworker(kworker)&lt;/code&gt;. The only pre-requisite which you need to do is to install &lt;em&gt;&lt;strong&gt;Vagrant&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;Virtual Box&lt;/strong&gt;&lt;/em&gt; before.&lt;/p&gt;</description></item><item><title>Quarkus Security Securing rest api with HTTPS</title><link>https://jhooq.com/quarkus-securing-rest-api-with-https/</link><pubDate>Wed, 15 Apr 2020 19:54:16 +0000</pubDate><guid>https://jhooq.com/quarkus-securing-rest-api-with-https/</guid><description>
&lt;p&gt;Quarkus is no doubt one the most super-fast framework for developing the Cloud Native java application.&lt;/p&gt;
&lt;p&gt;If you have worked with &lt;a href="https://spring.io/projects/spring-boot"&gt;Spring Boot&lt;/a&gt; application than I think you are gonna love Quarkus because of its simplicity, super-fast boot time and extremely low memory usage.&lt;/p&gt;
&lt;p&gt;For the beginner, I would highly recommend going through my article&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://jhooq.com/getting-started-with-quarkus/"&gt;Getting started with Quarkus | Quarkus Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="all-right-now-what-we-are-gonna-do"&gt;All right now what we are gonna do&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Create a simple REST endpoint application using JAVA, &lt;a href="https://github.com/jax-rs"&gt;JAX-RS&lt;/a&gt;, and &lt;a href="https://quarkus.io/"&gt;Quarks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Securing the REST endpoint with HTTPS&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Enough with the intro but the next questions comes into our mind &lt;strong&gt;&lt;em&gt;Why we need to secure our REST endpoint?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>java.lang.IllegalStateException: JWTAuthContextInfo has not been initialized. Please make sure that either ‘mp.jwt.verify.publickey’ or ‘mp.jwt.verify.publickey.location’ properties are set</title><link>https://jhooq.com/jwtauthcontextinfo-has-not-been-initialized/</link><pubDate>Mon, 06 Apr 2020 08:54:26 +0000</pubDate><guid>https://jhooq.com/jwtauthcontextinfo-has-not-been-initialized/</guid><description>
&lt;p&gt;It is quite evident from the exception (&lt;strong&gt;java.lang.IllegalStateException: JWTAuthContextInfo has not been initialized&lt;/strong&gt;) that your are missing following key properties inside your application.properties&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mp.jwt.verify.publickey.location
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mp.jwt.verify.publickey
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;h4 id="resolution"&gt;Resolution&lt;/h4&gt;
&lt;h5 id="step-1--define-mpjwtverifypublickeylocation"&gt;Step 1 : Define &lt;strong&gt;mp.jwt.verify.publickey.location&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;To fix this issue you need to define &lt;strong&gt;mp.jwt.verify.publickey.location&lt;/strong&gt; inside of your application.properties&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;mp.jwt.verify.publickey.location&lt;span class="o"&gt;=&lt;/span&gt;keystore/keystore.jks
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;h5 id="step-2--generate-self-signed-certificate"&gt;Step 2 : Generate self signed certificate&lt;/h5&gt;
&lt;p&gt;Use the &lt;a href="https://docs.oracle.com/cd/E19830-01/819-4712/ablqw/index.html"&gt;JDK keystore&lt;/a&gt; utility to generate a self signed certificate&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;keytool -genkey -keyalg RSA -alias quarkusdemo -keystore keystore.jks -storepass mypassword -validity &lt;span class="m"&gt;365&lt;/span&gt; -keysize &lt;span class="m"&gt;2048&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Above command will generate &amp;quot;keystore.jks&amp;quot;.&lt;/p&gt;</description></item><item><title>Run Quarkus inside docker | Dockerizing a Quarkus Application</title><link>https://jhooq.com/run-quarkus-inside-docker-container/</link><pubDate>Thu, 26 Mar 2020 14:54:50 +0000</pubDate><guid>https://jhooq.com/run-quarkus-inside-docker-container/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/03/Screenshot-2020-03-26-at-16.31.25.png"
title="Run Quarkus inside docker container"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Run Quarkus inside docker container&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;This article will guide you through building &lt;a href="https://docker.com/"&gt;Docker&lt;/a&gt; image for Quarkus application and to run Quarkus application inside the docker container.&lt;/p&gt;
&lt;h2 id="what-you-are-building"&gt;What you are building&lt;/h2&gt;
&lt;p&gt;You are building docker image for Quarkus. &lt;a href="https://docker.com/"&gt;Docker&lt;/a&gt; is a lightweight Linux container for running applications in a containerized model. In this article we are focusing on building docker image first. After the successful image build we are going to run Quarkus inside Docker container.&lt;/p&gt;</description></item><item><title>6 Ways to fix – Docker COPY failed: stat no source files were specified</title><link>https://jhooq.com/docker-copy-failed-no-source-files-were-specified/</link><pubDate>Wed, 18 Mar 2020 18:32:33 +0000</pubDate><guid>https://jhooq.com/docker-copy-failed-no-source-files-were-specified/</guid><description>
&lt;p&gt;&lt;figure&gt;
&lt;picture&gt;
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://jhooq.com/wp-content/uploads/2020/03/docker-2-e1584555918677.png"
title="Docker COPY failed: stat no source files were specified"
/&gt;
&lt;figcaption class="caption_figure caption_internal"&gt;Docker COPY failed: stat no source files were specified&lt;/figcaption&gt;&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;This error I would consider one of the most basic errors which any developer can face during the initial days of Docker learning and the error &lt;strong&gt;Docker COPY failed: stat no source files were specified&lt;/strong&gt; or &lt;strong&gt;docker copy failed no such file or directory&lt;/strong&gt; is caused when docker copy command is not able to copy files from the build context into your image.&lt;/p&gt;</description></item><item><title>Getting started with Quarkus |Quarkus Tutorial</title><link>https://jhooq.com/getting-started-with-quarkus/</link><pubDate>Fri, 13 Mar 2020 22:44:01 +0000</pubDate><guid>https://jhooq.com/getting-started-with-quarkus/</guid><description>
&lt;p&gt;&lt;em&gt;(*Note - This article has been updated and tested on the latest version of &lt;a href="https://quarkus.io/blog/quarkus-1-13-6-final-released/"&gt;Quarkus 1.13.6&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you are new to Qurakus then this article will help you in &lt;strong&gt;Getting Started with Quarkus&lt;/strong&gt;. In this article of &lt;strong&gt;Getting started with Quarkus |Quarkus Tutorial&lt;/strong&gt;, we will be developing a Hello World RestEnd Point application as well as testing the Hot Reload feature provided by the Quarkus.&lt;/p&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h4 id="what-is-quarkus"&gt;What is Quarkus?&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Supersonice Subatomic Java&lt;/strong&gt; and its a Java stack from Kubernetes(k8s) native. Quarkus is being developed for OpenJDK, HotSpot and GraalVM.&lt;/p&gt;</description></item><item><title>Kubernetes Dashboard | Kubernetes Admin GUI | Kubernetes Desktop Client</title><link>https://jhooq.com/setting-up-kubernetes-dashboard/</link><pubDate>Mon, 17 Jun 2019 21:03:37 +0000</pubDate><guid>https://jhooq.com/setting-up-kubernetes-dashboard/</guid><description>
&lt;p&gt;Kubernetes comes really handy with its Kubernetes Dashboard| Kubernetes Admin GUI|Kubernetes Desktop Client.&lt;/p&gt;
&lt;p&gt;kubernetes dashboard is a general purpose web-based UI for managing the Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;With the help of Kubernetes dashboard you can manage applications running in the cluster as well as it can help you to debug as well.&lt;/p&gt;
&lt;p&gt;In this article we will focus on setting up Kubernetes Dashboard| Kubernetes Admin GUI|Kubernetes Desktop Client&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#kubernetes-dashboard-minikube"&gt;On Minikube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#kubernetes-dashboard-local-cluster"&gt;On Kubernetes Local cluster&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#gke-kubernetes-dashboard"&gt;On Google Kubernetes Engine using Google Cloud Platform&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br/&gt;
&lt;br/&gt;
&lt;h2 id="kubernetes-dashboard-minikube"&gt;1. Setting up kubernetes - &lt;strong&gt;dashboard.yaml&lt;/strong&gt; on Minikube&lt;/h2&gt;
&lt;h4 id="what-you-will-need"&gt;What you will need?&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;kubectl - &lt;a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/"&gt;Kubernets v1.14.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;minikube - &lt;a href="https://github.com/kubernetes/minikube/releases"&gt;Minikube v1.1.1&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; - For minikube and kubectl installation please refer – &lt;a href="https://jhooq.com/kubernets-and-minikube"&gt;Getting started with Kubernets and minikube&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Install Kubernetes with Minikube</title><link>https://jhooq.com/kubernets-and-minikube/</link><pubDate>Sun, 09 Jun 2019 21:34:12 +0000</pubDate><guid>https://jhooq.com/kubernets-and-minikube/</guid><description>
&lt;p&gt;This article on &lt;strong&gt;Install Kubernetes with Minikube&lt;/strong&gt; will walk you through the steps which is required to install and setup kubernetes and minikube on your development box.&lt;/p&gt;
&lt;p&gt;Kubernetes is an open-source platform which helps in managing containers which is used to deploy the applications, with kubernetes you can scale and automate the deployment process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Minikube&lt;/strong&gt;– Well it can be said mini kubernetes because it runs on development machine not in production. &lt;/p&gt;</description></item><item><title>Hadoop File Already Exists Exception : org.apache.hadoop.mapred.FileAlreadyExistsException</title><link>https://jhooq.com/hadoop-file-already-exists-exception/</link><pubDate>Fri, 24 May 2019 20:54:13 +0000</pubDate><guid>https://jhooq.com/hadoop-file-already-exists-exception/</guid><description>
&lt;p&gt;Aim behind writing this article is to make developers aware about the issue which they might face while developing the MapReduce application. Well the above error org.apache.hadoop.mapred.FileAlreadyExistsException is one of the most basic exception which every beginner face while writing their first map reduce program.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;Exception in thread main org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://localhost:9000/home/facebook/crawler-output already exists
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs&lt;span class="o"&gt;(&lt;/span&gt;FileOutputFormat.java:146&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs&lt;span class="o"&gt;(&lt;/span&gt;JobSubmitter.java:269&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal&lt;span class="o"&gt;(&lt;/span&gt;JobSubmitter.java:142&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.Job&lt;span class="nv"&gt;$10&lt;/span&gt;.run&lt;span class="o"&gt;(&lt;/span&gt;Job.java:1290&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.Job&lt;span class="nv"&gt;$10&lt;/span&gt;.run&lt;span class="o"&gt;(&lt;/span&gt;Job.java:1287&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; at java.security.AccessController.doPrivileged&lt;span class="o"&gt;(&lt;/span&gt;Native Method&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; at javax.security.auth.Subject.doAs&lt;span class="o"&gt;(&lt;/span&gt;Subject.java:415&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.security.UserGroupInformation.doAs&lt;span class="o"&gt;(&lt;/span&gt;UserGroupInformation.java:1657&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.Job.submit&lt;span class="o"&gt;(&lt;/span&gt;Job.java:1287&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.mapreduce.Job.waitForCompletion&lt;span class="o"&gt;(&lt;/span&gt;Job.java:1308&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; at com.wagh.wordcountjob.WordCount.main&lt;span class="o"&gt;(&lt;/span&gt;WordCount.java:68&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0&lt;span class="o"&gt;(&lt;/span&gt;Native Method&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; at sun.reflect.NativeMethodAccessorImpl.invoke&lt;span class="o"&gt;(&lt;/span&gt;NativeMethodAccessorImpl.java:57&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke&lt;span class="o"&gt;(&lt;/span&gt;DelegatingMethodAccessorImpl.java:43&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; at java.lang.reflect.Method.invoke&lt;span class="o"&gt;(&lt;/span&gt;Method.java:606&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.util.RunJar.run&lt;span class="o"&gt;(&lt;/span&gt;RunJar.java:221&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; at org.apache.hadoop.util.RunJar.main&lt;span class="o"&gt;(&lt;/span&gt;RunJar.java:136&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;p&gt;&lt;strong&gt;Let's start from scratch - Why do we get this exception?&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Using spring-boot-devtools in Spring Boot application</title><link>https://jhooq.com/spring-boot-devtools/</link><pubDate>Sun, 19 May 2019 23:45:12 +0000</pubDate><guid>https://jhooq.com/spring-boot-devtools/</guid><description>
&lt;p&gt;When ever we talk about the Spring Boot then its always about the simplicity of the spring boot application.&lt;/p&gt;
&lt;p&gt;With spring-boot-devtools the development task has become more enjoyable and productive. In this artivle we will be talking about Restart feature which come very handy with spring-boot-devtools.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why do we need spring-boot-devtools?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Spring-boot-devtools provides two ways to restart your boot application : -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build Project - When ever you build your project spring boot take care of restart&lt;/li&gt;
&lt;li&gt;trigger-file - Restart your boot application when there is change in a file&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this article we will be focusing on both the ways to restart your boot application.&lt;/p&gt;</description></item><item><title>How to use Hibernate 5 | Tutorial</title><link>https://jhooq.com/hibernate-5/</link><pubDate>Sat, 19 Jan 2019 20:32:09 +0000</pubDate><guid>https://jhooq.com/hibernate-5/</guid><description>
&lt;p&gt;Here in this post we will be looking into the basic setup of Hibernate 5 with maven.&lt;br&gt;
In this tutorial we will be using -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Maven&lt;/li&gt;
&lt;li&gt;JDK 1.8****&lt;/li&gt;
&lt;li&gt;Hibernate 5&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can also download/clone the complete workspace from GitHub : - &lt;a href="https://github.com/rahulwagh/hibernate5.git"&gt;https://github.com/rahulwagh/hibernate5.git&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are not able to clone the repository than download the complete workspace and import in eclipse using following instruction.&lt;/p&gt;
&lt;p&gt;Here in this post we will try to insert an employee entry into the employee table which we have created.&lt;/p&gt;</description></item></channel></rss>