M4RKYU.SYSEdition 2027
Skip to content
LOCEN/Ontario · CA/▸logs · mastering kubernetes a guide to container orchestration 37feStandbyOK/--:--:--EST
M4M4RK_YUportfolio
  • BuildBuild
    BuildOverview
    • WorkSelected case studies and write-ups
    • GamesPlayable prototypes and game-dev logs
  • GalleryGallery
    GalleryOverview
    • PhotosPhoto collections and visual experiments
    • ShopPrints, posters, and one-off objects
  • WritingWriting
    WritingOverview
    • BlogLong-form devlogs and field notes
    • NotesShort observations, links, snippets
  • ResourcesResources
    ResourcesOverview
    • Tools38 in-browser developer utilities
    • LinksDaily-use dev and design bookmarks
  • AboutAbout
  • ContactContact
中文

syndicated · dev.to / @markyu

Kubernetes Is Useful, but Only After These Basics Hurt

A practical Kubernetes guide for developers: pods, deployments, services, config, scaling, and when not to introduce Kubernetes too early.

Published
May 4 '24
·
Reading time
2 min read
·
Reactions
6
kubernetesdevopscontainerscloud
View on dev.to

On this page

  • What Kubernetes Actually Gives You
  • The Smallest Useful Deployment
  • Add a Service
  • The Debug Commands I Use First
  • Config and Secrets
  • When Kubernetes Is Worth It
  • Final Thought

Kubernetes is not the first tool I reach for.

That may sound strange in 2026, but I still think many teams adopt Kubernetes before their deployment pain is real enough.

Kubernetes helps when you need orchestration. It hurts when you just wanted a place to run one container.

What Kubernetes Actually Gives You

Kubernetes helps manage:

  • container scheduling
  • restarts
  • scaling
  • service discovery
  • rollout strategy
  • configuration
  • workload isolation

The basic shape:

Deployment
   |
   v
ReplicaSet
   |
   v
Pods
   |
   v
Containers

Most beginner confusion comes from mixing up those layers.

The Smallest Useful Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: nginx:1.27
          ports:
            - containerPort: 80

Apply it:

kubectl apply -f deployment.yaml
kubectl get pods

This does not expose the app yet. It only runs pods.

Add a Service

apiVersion: v1
kind: Service
metadata:
  name: api-service
spec:
  selector:
    app: api
  ports:
    - port: 80
      targetPort: 80
  type: ClusterIP

The service gives stable networking inside the cluster.

client -> service -> matching pods

Pods can die and come back with different IPs. The service keeps the route stable.

The Debug Commands I Use First

kubectl get pods
kubectl describe pod <pod-name>
kubectl logs <pod-name>
kubectl get events --sort-by=.lastTimestamp
kubectl rollout status deployment/api

If a pod is stuck in CrashLoopBackOff, I look at logs first.

If it is stuck in Pending, I look at describe/events because it may be scheduling, resources, or image pulling.

Config and Secrets

Do not bake environment-specific config into images.

Use ConfigMaps for normal config:

apiVersion: v1
kind: ConfigMap
metadata:
  name: api-config
data:
  LOG_LEVEL: "info"

Use Secrets for sensitive values, but remember: Kubernetes Secrets are not magic encryption by default. Treat cluster access seriously.

When Kubernetes Is Worth It

I would consider Kubernetes when:

  • you run many services
  • rollouts need control
  • autoscaling matters
  • workloads need scheduling
  • multiple teams share a platform
  • you already have observability

I would avoid it when:

  • one app can run fine on managed PaaS
  • nobody owns cluster operations
  • logs and metrics are weak
  • the team has no deployment discipline yet

Cloud-native 3.0 is making Kubernetes more platform-like, especially with internal developer portals and AI-assisted operations. Still, the fundamentals have not changed: a confusing cluster is not a platform.

Final Thought

Kubernetes is powerful because it standardizes operational patterns. It is painful because it exposes every weak operational habit your team already had.

What was your first Kubernetes failure: image pull, config, networking, or resources?

Related reading

Cloud Architecture Choices I Would Not Overcomplicate

A practical 2026 cloud architecture guide for developers choosing between client-server, distributed systems, microservices, serverless, and cloud-native platforms.

cloud

Sustainable Cloud Design Starts With Boring Cost Signals

A practical cloud sustainability guide for developers: right-sizing, autoscaling, regions, storage lifecycle, carbon-aware thinking, and cost visibility.

cloud

Docker Containers: The Commands That Prove Isolation

A practical Docker container guide focused on the commands that show image layers, process isolation, networking, volumes, and debugging.

docker

originally published

This post first ran on dev.to. Comments and reactions live there.

Continue on dev.to
PreviousAES-CBC vs AES-GCM: The Crypto Choice I’d Make TodayA practical block cipher guide for developers explaining AES modes, CBC pitfalls, GCM authentication, IV rules, and what to avoid in production.
Back to all posts
NextVS Code Themes I Can Actually Code In for 8 HoursA practical 2026 refresh of VS Code themes, focused on readability, contrast, fatigue, and real daily developer use.
Back to archive
M4RKYUM4RKYUM4RKYUM4RKYUM4RKYUM4RKYUM4RKYUM4RKYU
Crafted since 2024
ZhenXiao Mark YuZhenXiao Mark Yu
get in touch

Saw something here?Tell me about it.

It's a portfolio, not a service · but I read every note — drop a line if anything here resonated, or just to say hi.

Start a conversation
open channel

say hi anytime · 2026

--:--:--ESTOntario, Canada
  • Email
  • GitHub
  • dev.to
  • LinkedIn
  • Twitter / X
  • Instagram
  • Facebook
  • YouTube
  • CodePen
  • Spotify
  • Snapchat

Newsletter

Get the occasional dispatch

Notes and logs from m4rkyu.com — short, dated, no noise. Unsubscribe anytime.

Work

Production builds, games, and visual archives.

  • Projects
  • Games
  • Archive
  • Logs

Resources

Daily-use tools and a personal link library.

  • Search
  • Latest
  • Tools
  • Links
  • Notes
  • Topics
  • Shop
RSSJSON feed

Studio

Background, contact, and channels for collaboration.

  • About
  • Contact
  • Changelog
  • Colophon
  • Resumepending

Socials

Find me on the usual feeds.

  • GitHub
  • dev.to
  • LinkedIn
  • Twitter / X
  • Instagram
  • Facebook
  • YouTube
  • CodePen
  • Spotify
  • Snapchat
  • Email
© 2026 ZhenXiao Mark Yumarkyu0615@gmail.com
  • Email
  • GitHub
  • dev.to
  • LinkedIn
  • Twitter / X
  • Instagram
  • Facebook
  • YouTube
  • CodePen
  • Spotify
  • Snapchat
PrivacyTermsBuilt with Next.js 16 · React 19 · Tailwind 4