GeekCoding101 make your way to geek

DevOps Tutorials: Kubernetes, kubectl and Docker

7 posts on devops, newest first.

7posts
2025first post

These are GeekCoding101’s hands-on DevOps posts: step-by-step guides you can follow on your own machine. Most of them form a single series that takes you from an empty Mac to a working multi-node Kubernetes cluster, then through the main Service types. Start with Part 1 if you’re new, or jump to a single guide if you only need one fix.

Start here: build a Kubernetes lab on your Mac

The Kubernetes tutorial series builds one lab step by step. Each part picks up where the last one left off, so reading in order works best.

PartPostWhat you’ll doRead time
1Kubernetes Tutorial Part 1: Multi-Node Cluster on a MacPlan the cluster and networking, create a Rocky Linux 9 base VM in VMware Fusion, and prepare the nodes22 min
2Ultimate Kubernetes Tutorial Part 2: DNS server and NTP server ConfigurationClone the base image and set up a local DNS server and NTP server for the cluster7 min
3Ultimate Kubernetes Tutorial Part 3: A Streamlined Kubernetes cluster setupBring up the cluster with Flannel networking, using Ansible to streamline the setup18 min
4NodePort vs ClusterIP - Ultimate Kubernetes Tutorial Part 4Compare the two core Service types on the 1 master + 4 worker node cluster15 min
5ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5Route traffic outside the cluster and expose your app beyond the nodes17 min

Everyday kubectl

kubectl Set Context: Switch Clusters and Namespaces Safely covers:

  • creating or editing a context with kubectl config set-context
  • switching with kubectl config use-context
  • changing the default namespace
  • habits that keep you from running commands against the wrong cluster

Docker and self-hosted apps

Understanding OpenDAL Storage in Dify: A New Year’s Journey explains how self-hosted Dify stores files through OpenDAL. It walks through OPENDAL_FS_ROOT, the .env settings and Docker volume mounts, and gives fixes for the permission errors you may hit along the way.

FAQ

Do I need a cloud account to follow the Kubernetes series? No. The series builds the lab locally on a Mac, using Rocky Linux 9 virtual machines in VMware Fusion.

What order should I read the Kubernetes posts in? Part 1 through Part 5, in order. Parts 1–3 build the base VM, the DNS/NTP servers and the cluster. Parts 4 and 5 use that cluster to explain Service types.

What’s the difference between ClusterIP, NodePort, LoadBalancer and ExternalName?

  • ClusterIP exposes a Service only inside the cluster.
  • NodePort also opens a port on every node so traffic can reach it from outside.
  • LoadBalancer puts an external load balancer in front of the Service.
  • ExternalName maps a Service name to an outside DNS name.

Parts 4 and 5 walk through each one hands-on.

How do I change my default namespace in kubectl? Run kubectl config set-context --current --namespace=<namespace>. The kubectl set context guide covers this along with switching clusters safely.

Are these tutorials free? Yes. Every GeekCoding101 post is free to read, with no sign-up.