GeekCoding101

  • Home
  • GenAI
    • Daily AI Insights
    • Machine Learning
    • Transformer
    • Azure AI
  • DevOps
    • Kubernetes
    • Terraform
  • Technology
    • Cybersecurity
    • System Design
    • Coding Notes
  • About
  • Contact
tmux
Kubernetes

Ultimate Kubernetes Tutorial Part 1: Setting Up a Thriving Multi-Node Cluster on Mac

Introduction Hey there! Welcome to this Kubernetes tutorial! Ever dreamed of running a real multi-node Kubernetes (K8s) cluster on your laptop instead of settling for Minikube’s diet version? A proper real multi-node Kubernetes environment requires virtual machines, and until last year, VMware Fusion was a paid product—an obstacle for many. I know there are alternatives, like KVM, Oracle VirtualBox, and even Minikube’s so-called multi-node mode ----but let’s be real: I’ve got a beast of a MacBook Pro, so why not flex its muscles and spin up a legit multi-node cluster? 🚀 But great news! On November 11, 2024, VMware announced that Fusion and Workstation are now free for all users! The moment I stumbled upon this announcement, I was thrilled. Time to roll up my sleeves, fire up some VMs, and make this cluster a reality. Kick off my Kubernetes tutorial! Let’s dive in! 🚀 Project Overview My Goal In this series of Kubernetes tutorial, I want to set up a full Kubernetes cluster on my MacBook Pro using VMware Fusion, creating multiple VMs to simulate real-world deployment and practice my DevOps and IaC (Infrastructure as Code) skills. Planned Setup Create a VM as Base VM (Rocky Linux 9) Configure networking Update system packages Disable firewalld Enable SSH passwordless login from local Mac to the base VM Set up zsh, tmux, vim and common aliases Install Miniforge for Python environment management Install and configure Ansible Set up a Local Server Node (localserver) Clone from the above base VM image Create an Ansible script to customize the base VM image withe new…

March 1, 2025 0comments 440hotness 1likes Geekcoding101 Read all
Coding Notes

Terminal Mastery: Crafting a Productivity Environment with iTerm, tmux, and Beyond

I love working on Linux terminals Rewind a decade or so, and you'd find me ensconced within the embrace of a Linux terminal for the duration of my day. Here, amidst the digital ebb and flow, I thrived—maneuvering files and folders with finesse, weaving code in Vim, orchestrating services maintenance, decoding kernel dumps, and seamlessly transitioning across a mosaic of tmux sessions. The graphical user interface? A distant thought, unnecessary for the tapestry of tasks at hand. Like all geeks, every tech enthusiast harbors a unique sanctuary of productivity—a bespoke digital workshop where code flows like poetry, and ideas ignite with the spark of creativity. It’s a realm where custom tools and secret utilities interlace, forming the backbone of unparalleled efficiency and innovation. Today, I'm pulling back the curtain to reveal the intricacies of my personal setup on Mac. I invite you on this meticulous journey through the configuration of my Mac-based development sanctuary. Together, let's traverse this path, transforming the mundane into the magnificent, one command, one tool, one revelation at a time. iTerm2 After account setup on Mac, the initial terminal looks like this when I logged in: Let's equip it with iTerm2! What is iTerm2? iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted. Why Do I Want It? Check out the impressive features and screenshots. If you spend a lot of time in a terminal, then you'll appreciate all the…

April 10, 2024 0comments 796hotness 0likes Geekcoding101 Read all
Coding Notes

Crafting A Bash Script with Tmux

The Background... I have Django/Vue development environment running locally. To streamline my Django development, I typically open six tmux windows 😎 : I used one Tmux session to hold all above. However, my laptop sometimes needs to reboot, after reboot, all of my windows are gone 😓 I have configured tmux-resurrect and tmux-continuum to try to handle this scenario, but they couldn't re-run those commands even they could restore the windows correctly. Let me show you the screenshots. The problem... Typically, my development windows look like this: As you see, the services are running within the respective windows. If I save them with tmux-resurrect, after reboot, of course tmux-resurrect and tmux-continuum could restore them, but services and all environment variables are gone. To simulate, let me kill all sessions in tmux, check the output: Now start tmux again, here are the status I can see, tmux restored the previous saved windows: Let's check the window now: None of the services is running 🙉 The Complain... As the supreme overlord of geekcoding101.com, I simply cannot let such imperfection slide. Not on my watch. Nope, not happening. This ain't it, chief. Okay, let's fix it! The Fix... .... Okay! I wrote a script.. oh no! Two scripts! One is called start_tmux_dev_env.sh to create all windows, it will invoke prepare_dev_env.sh which export functions to initialize environment variables in specific windows. A snippet of start_tmux_dev_env.sh: The prepare_dev_env.sh looks like: The End... Now, after reboot, I can just invoke script start_tmux_dev_env.sh and it will spin up all windows for me in seconds! I'M Really Pround…

April 6, 2024 0comments 789hotness 0likes Geekcoding101 Read all
Coding Notes

Tmux Notes

Hi there! Today I'd like to share you my notes about tmux! Tmux is my favorite terminal multiplexer! Several years ago I didn't give a **it for people using it! Because I thought that might consume too much of my time to customize. However, one day I was free, then tested the water! I feel like I couldn't live without it in my coding environment! It likes Vim, the learning curve is steep, but once you're comfortable with it, you will addict to it! No more talking, let's dive into it! Introduction It’s tmux, a so-called terminal multiplexer. Simply speaking, tmux acts as a window manager within your terminal 1 and allows you to create multiple windows and panes within a single terminal window. Pane Shortcut Comment Pre % Splitting panes in left and right Pre " Splitting panes in top and bottom Pre <arrow key> Navigating in panes C-d Close panes Pre: swap-pane -s <sid> -t <tid> Swap sid pane to tid pane Pre z Make a pane go full screen, vice versa Pre C-<arrow key>Pre ⌥-<arrow key> Resize pane in direction of Windows Shortcut Comment Pre c Create a new window Pre , Rename current window Pre x Close current window with prompt and deattach Sessions Shortcut Comment Pre :new -s <name> Create a new session Pre C-c Create a new session Pre $ Rename current session Pre s, then x on the session Delete the selected session Configuration This is the folder of configuration: ~/.tmux. This is the configuratino file: ~/.tmux.conf Session Handling Search Pluggins I haven't explored much…

January 23, 2020 0comments 752hotness 0likes Geekcoding101 Read all
Newest Hotest Random
Newest Hotest Random
A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way Golang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It) Terraform Associate Exam: A Powerful Guide about How to Prepare It Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2 ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5
Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure CodeTerraform Associate Exam: A Powerful Guide about How to Prepare ItGolang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It)A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way
Overfitting! Unlocking the Last Key Concept in Supervised Machine Learning – Day 11, 12 Master Learning Rate and Feature Engineering: Supervised Machine Learning – Day 8 Supervised Machine Learning – Day 6 Mastering Openssl Command and NSS Database Management Ultimate Kubernetes Tutorial Part 1: Setting Up a Thriving Multi-Node Cluster on Mac Discovering the Joy of Tokens: AI’s Language Magic Unveiled
Newest comment
Tag aggregation
cybersecurity Machine Learning AI Supervised Machine Learning Transformer security notes Daily.AI.Insight

COPYRIGHT © 2024 GeekCoding101. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang