DEV Community

Cover image for Kubernetes from Scratch What It Is, How to Avoid Crashing Your PC, and Creating Your First Pod
Roger Oliveira
Roger Oliveira

Posted on Originally published at Medium

Kubernetes from Scratch What It Is, How to Avoid Crashing Your PC, and Creating Your First Pod

How to understand the world's most famous orchestrator using the cargo ship analogy — and run your first lab 100% in your browser.

If you are starting out in IT, migrating to DevOps, or looking to advance toward technical leadership roles (such as Staff/Principal Engineer), the word Kubernetes crosses your path every single day.

However, the first barrier is almost always the same: "Where do I start without drowning in heavy theory and without freezing my computer?"

In this first article of the Kubernetes from Scratch series, we will demystify core concepts using real-world analogies, understand the basic architecture, and launch your first live application in less than 5 minutes — completely free and directly inside your browser.


1. The Core Analogy: The Automated Port 🚢

To understand Kubernetes, you don't need complex jargon. Think of global maritime logistics:

  • The Application (Your Code): This is the goods needing delivery (e.g., an e-commerce store or a banking system).
  • The Container (Docker): This is the standardized metal cargo box. It doesn't matter if there are shoes, electronics, or food inside: from the outside, the dimensions and locking mechanisms are universal. It runs the exact same way on your laptop as it does in the cloud.
  • The Pod: This is the exact space (the rack or ship deck area) where one or more containers sit and work together. In Kubernetes, the Pod is the smallest unit you manage.
  • Kubernetes (The Port Captain): This is the robotic conductor. If a cargo box falls into the sea (an application error), the Captain instantly creates a brand-new box in its place within seconds. If traffic surges during Black Friday, the Captain automatically requests more ships.

2. The Golden Rule: Forget Local Clusters at First 💡

One of the biggest mistakes beginners make is trying to install tools like Minikube or Kind on resource-constrained laptops. The computer freezes, the cooling fans go wild, and learning turns into frustration.

Pro Tip: In the official CNCF exam (the CKA - Certified Kubernetes Administrator) and in real-world production environments, work is done via a Linux terminal and a web browser.

That is why we use Killercoda (killercoda.com): a free platform that provides a real Kubernetes cluster running directly in the cloud through your browser.


3. Hands-On: Your First Pod in the Browser 🛠️

Go to killercoda.com/playgrounds and select the Kubernetes Playground environment.

Once the terminal screen loads, follow these 3 quick steps:

Step 1: Terminal Survival Kit

Whenever you start a new lab environment, set up an alias to save keystrokes and adjust the .yaml file formatting for the vim editor:

# 1. Shortcut for kubectl
alias k=kubectl

# 2. Configure Vim to respect 2-space YAML indentation
echo "set tabstop=2 shiftwidth=2 expandtab" >> ~/.vimrc

Enter fullscreen mode Exit fullscreen mode

Step 2: Spin Up an Application Imperatively

Instead of writing dozens of lines of YAML manually from scratch, use imperative commands to generate resources quickly:

# Create a Pod running an NGINX web server
k run my-web --image=nginx:alpine

Enter fullscreen mode Exit fullscreen mode

Step 3: Inspect Your Resource

Check if your Pod is up and running:

k get pods

Enter fullscreen mode Exit fullscreen mode

If the status shows Running, congratulations! You have just placed your first container under Kubernetes orchestration.


4. What To Do When Things Go Wrong? 🔍

The most valuable skill in daily operations is Troubleshooting. If your Pod fails to start, follow this investigation sequence in your terminal:

# 1. Check the general status of the Pod
k get pods

# 2. Inspect cluster events (WHAT happened?)
k describe pod my-web

# 3. Analyze container logs (WHY did the application fail?)
k logs my-web

Enter fullscreen mode Exit fullscreen mode

📚 Next Steps & Official Sources

This article is just the gateway. To deepen your learning in a structured way:

  1. GitHub Open-Source Repository: All code, guides, and practical exercises from this series are hosted on GitHub: https://github.com/roger-oliveira86/kubernetes-do-zero-ptbr.
  2. Official Documentation (CNCF): Get comfortable searching kubernetes.io/docs — it is your best friend in production and the only allowed reference material during certification exams.
  3. Practice Platform: Work through guided scenarios covering RBAC, Storage, and Troubleshooting at Killercoda.

💬 What About You?

What was the biggest challenge you faced when you first tried to learn Kubernetes? Leave a comment below and share this article with anyone starting their Cloud Native journey!

Kubernetes #DevOps #CloudNative #Docker #TechCommunity #CKA

Top comments (0)