Day 1: Setting Up My First Kubernetes Cluster with Rancher Desktop

Hello, my name is Jonathan, and I work as a Cybersecurity Engineer. My expertise includes defending against threats, establishing security controls, and utilizing threat intelligence to gather TTPs (Tactics, Techniques, and Procedures), which I then use to construct custom detections. I am passionate about developing security programs, implementing them, and ensuring that organizations are safeguarded with a comprehensive overview of all resources.
I have a particular specialization in Azure Cloud, along with some experience in AWS. My qualifications include the CCSP, CCSK, various Azure Certifications, CompTIA Sec+/Cloud+, among others.
Today marks the beginning of my Kubernetes journey, and I kicked things off by setting up my first cluster using Rancher Desktop by SUSE. Coming from a security engineering background, my focus has always been on securing infrastructure, but now I’m diving deep into the world of Kubernetes—learning how to build, manage, and secure containerized workloads.
What is Rancher Desktop? 🤔
For those unfamiliar, Rancher Desktop is a lightweight Kubernetes environment that runs entirely on your local machine. It’s an open-source tool that simplifies Kubernetes setup, giving you a K3s-based cluster out of the box. It also integrates container management (with nerdctl or Docker CLI support), making it a solid choice for local development and testing.
Why Rancher Desktop?
Simple Setup – No need to spin up cloud instances or deal with complex configurations.
Built-in Kubernetes – Comes pre-packaged with K3s, a lightweight Kubernetes distribution.
Container Runtime Support – Works with both containerd (nerdctl) and Docker.
So, after a quick install and some minor tweaks, I had my first Kubernetes cluster running—a small but satisfying milestone.
Learning VIM—Because Kubernetes Says So 😅
Now, here’s where I had a humbling moment—Kubernetes forces you to get good at VIM. I’ve always been a Nano person, but when you’re deep in Kubernetes configurations, VIM is the way (unless you enjoy suffering).
Why?
Editing YAML files quickly in Kubernetes often involves commands like
kubectl edit, which defaults to VIM.Efficiency: Once you get the hang of it, VIM is faster for navigating and modifying configurations.
It’s everywhere: SSH into any Linux-based container or node? VIM is there.
So, I took the plunge and started learning basic VIM commands (yes, I even Googled how to exit VIM—we’ve all been there).
Tweaking .bashrc & .vimrc for a Smoother Experience
Since I’m optimizing my workflow, I made a few key modifications:
Enabled Auto-Completion for Kubectl
I added this to my.bashrcfile to enable kubectl command autocompletion:source <(kubectl completion bash) alias k=kubectl complete -F __start_kubectl kNow, instead of typing
kubectl get pods, I can just typek get pods—saving time and making my life easier.Configured
.vimrcfor YAML Editing
If you’ve ever worked with YAML, you know that white spaces and indentation will break your soul. I learned that the hard way from my Docker Compose days, so I made sure myvimrchad:set tabstop=2 set shiftwidth=2 set expandtabThis ensures:
Two-space indentation (the gold standard for YAML).
No tab characters (because they break YAML parsing).
Consistent formatting for easier troubleshooting.
Final Thoughts
Today was all about setting the foundation—getting Rancher Desktop up and running, embracing VIM, and optimizing my terminal for a smoother workflow.
🔜 Next steps: Deploying my first app in Kubernetes and understanding pods, deployments, and services. Stay tuned for Day 2!
Are you also switching from Nano to VIM for Kubernetes? Let me know your experience!






