Step-by-step guide to install Kubernetes (K8s) on Red Hat Enterprise Linux (RHEL) 9.5

 Here’s a step-by-step guide to install Kubernetes (K8s) on Red Hat Enterprise Linux (RHEL) 9.5, using kubeadm, the official Kubernetes tool.


✅ Prerequisites

  1. Root / sudo access

  2. Swap disabled

  3. Docker or containerd installed

  4. Firewall open for Kubernetes ports

  5. Unique hostname, static IP, and DNS resolution for each node


๐Ÿ”ง Step 1: Disable Swap

sudo swapoff -a sudo sed -i '/swap/d' /etc/fstab

๐Ÿ”ง Step 2: Set Hostname

sudo hostnamectl set-hostname <node-name>

Example:

sudo hostnamectl set-hostname master-node

๐Ÿ”ง Step 3: Add Kubernetes Repository

cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://pkgs.k8s.io/core:/stable:/v1.30/rpm/ enabled=1 gpgcheck=1 gpgkey=https://pkgs.k8s.io/core:/stable:/v1.30/rpm/repodata/repomd.xml.key EOF

You can change v1.30 to a specific version if required.


๐Ÿ”ง Step 4: Install kubeadm, kubelet, kubectl

sudo dnf install -y kubelet kubeadm kubectl

Lock their version to avoid accidental upgrades:

sudo dnf mark install kubelet kubeadm kubectl

๐Ÿ”ง Step 5: Enable and Start kubelet

sudo systemctl enable --now kubelet

๐Ÿ”ง Step 6: Install Container Runtime (Containerd)

Kubernetes no longer supports Docker directly; use containerd.

sudo dnf install -y containerd

Generate default config:

sudo mkdir -p /etc/containerd containerd config default | sudo tee /etc/containerd/config.toml

Enable Systemd cgroup driver:
Edit /etc/containerd/config.toml and set:

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] SystemdCgroup = true

Then restart containerd:

sudo systemctl restart containerd sudo systemctl enable containerd

๐Ÿ”ง Step 7: Enable Kernel Modules and Set Sysctl

cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf overlay br_netfilter EOF sudo modprobe overlay sudo modprobe br_netfilter
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 EOF sudo sysctl --system

๐ŸŸฉ Step 8: Initialize Kubernetes Cluster (on Master Node)

sudo kubeadm init --pod-network-cidr=192.168.0.0/16

After success, copy the admin config:

mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config

๐ŸŸฉ Step 9: Install Pod Network Add-on (like Calico or Flannel)

Example with Calico:

kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/calico.yaml

๐ŸŸจ Step 10: Join Worker Nodes (optional)

On master, you'll get a kubeadm join command—copy that and run it on each worker node.


✅ Verify

kubectl get nodes

You should see your master node in Ready state.


⚠️ Notes

  • Make sure firewall ports (6443, 10250, etc.) are open.

  • If using RHEL with SELinux, ensure it's not interfering.

  • Run kubeadm reset if you need to clean and reinstall.

What is the difference between devDependencies and dependencies in package.json?

 

๐Ÿ”น dependencies

Packages your app needs to run in production.

  • Used in the app's runtime code

  • Installed on both development and production environments

  • Example: Frameworks, HTTP clients, database drivers

Example:

"dependencies": {
"express": "^4.18.2", "axios": "^1.6.0" }

๐Ÿ“Š Mutual Funds vs Equity vs Futures vs Options: What Should You Choose?

In the world of investing and trading, there are multiple vehicles to grow your money — but they’re not all the same. Here's a clear comparison to help you understand which instrument suits your needs, skills, and risk profile.

๐Ÿ”Ž Comparison Table

Feature Mutual Funds Equity (Stocks) Futures Options
Ownership Indirect (via fund manager) Direct (you own shares) Contract-based (buy/sell later) Right to buy/sell, not obligation
Capital Required Low (₹500 SIP possible) Moderate (per share price) High (lot size × price) Low (just the premium)
Risk Level Low to Medium Medium to High High Very High
Return Potential Moderate, stable High (if selected well) High but risky Very high (or zero)
Time Involvement Passive Moderate (needs research) Active, short-term Very active, time-sensitive
Charges Fund fees, exit load STT, brokerage, taxes STT, brokerage, margin fees STT, premium cost, brokerage
Who Manages It? Professional fund manager You You You
Leverage No No Yes (margin) Yes (in-built)
Best For Passive long-term investors Active long-term investors Experienced short-term traders Speculators, hedgers

๐Ÿ’ธ Why Retail Traders Struggle in the Stock Market: The Charges No One Talks About

Most beginners enter the stock market dreaming of financial freedom. They follow YouTube gurus, try "proven" intraday strategies, and set out to double their capital.

But soon, reality hits — not because they are wrong in analysis, but because the game is rigged with charges that no one talks about.

๐Ÿงพ The Hidden Cost of Trading: Charges Explained

Let’s say you do a basic intraday Nifty options trade:

  • Buy 1 lot (75 qty) at ₹100
  • Sell at ₹105
  • You make ₹5 x 75 = ₹375 gross profit

Now the charges kick in:

Charge TypeApprox. Amount
Brokerage (₹20 x 2)₹40
STT (on Sell)₹19.69
Exchange Transaction Charges₹5.62
GST (18% on ₹45.62)₹8.21
SEBI Charges₹0.15
Stamp Duty (Buy side only)₹4.50
Total Charges₹78.17
Net Profit₹296.83

๐Ÿ”ป So, even when you're right, you lose 20%+ of your profits to charges.

What is the difference between NgZone and CDR in Angular

 NgZone vs ChangeDetectorRef (CDR) in Angular

Both NgZone and ChangeDetectorRef (CDR) help with change detection, but they serve different purposes.


๐Ÿ”น NgZone

NgZone is a service that controls how Angular detects changes globally across the application. It helps manage execution inside or outside Angular's change detection system.

✅ When to Use NgZone?

  1. Running non-Angular events (like setTimeout, WebSockets, or third-party libraries) inside change detection.
  2. Skipping change detection for performance (e.g., animations, timers).

๐Ÿ”น Key Methods:

  • run(callback) → Forces Angular to detect changes.
  • runOutsideAngular(callback) → Runs code outside change detection (for performance).

Example:

Difference between .some(), .includes(), and .findIndex()

Let’s compare .some(), .includes(), and .findIndex() to see why .some() is the best choice in this case.


  1. Why Not .includes()?

How .includes() Works

  • .includes(value) only works for exact matches in an array.

  • It checks if the array contains the exact string or number.

Why It Won’t Work Here

Your case needs partial matching (window.location.hostname.includes(host)), but .includes() only checks for exact matches.

๐Ÿ”ด Example: Doesn't Work for Partial Matching

const hosts = ["localhost", "127.0.0.1"];

const isLocal = hosts.includes(window.location.hostname);

console.log(isLocal);

❌ This only works if window.location.hostname is exactly "localhost" or "127.0.0.1", but it fails if the hostname is "localhost:4200" (which is common in Angular development).

How to remember password in FortiClient VPN?

In Windows, to save your VPN password using the Registry Editor:

  1. Open the Registry Editor:

    • Press Win + R, type regedit, and press Enter.
  2. Navigate to:

    • HKEY_CURRENT_USER\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\<VPN_NAME>
  3. Find the show_remember_password entry:

    • Look for the show_remember_password entry under the <VPN_NAME> tunnel configuration.
  4. Change the value:

    • Set the value of show_remember_password from 0 to 1.
  5. Save your changes:

    • By changing this value, you will be able to save your password for later use.

Replace <VPN_NAME> with the actual name of your VPN configuration. This change will allow your FortiClient to remember your password for future sessions.