DevOps Tutorials: Kubernetes, kubectl and Docker
7 posts on devops, newest first.
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.
| Part | Post | What you’ll do | Read time |
|---|---|---|---|
| 1 | Kubernetes Tutorial Part 1: Multi-Node Cluster on a Mac | Plan the cluster and networking, create a Rocky Linux 9 base VM in VMware Fusion, and prepare the nodes | 22 min |
| 2 | Ultimate Kubernetes Tutorial Part 2: DNS server and NTP server Configuration | Clone the base image and set up a local DNS server and NTP server for the cluster | 7 min |
| 3 | Ultimate Kubernetes Tutorial Part 3: A Streamlined Kubernetes cluster setup | Bring up the cluster with Flannel networking, using Ansible to streamline the setup | 18 min |
| 4 | NodePort vs ClusterIP - Ultimate Kubernetes Tutorial Part 4 | Compare the two core Service types on the 1 master + 4 worker node cluster | 15 min |
| 5 | ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5 | Route traffic outside the cluster and expose your app beyond the nodes | 17 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.
- 7 min read
kubectl Set Context: Switch Clusters Safely
kubectl set context explained: create or edit a context with kubectl config set-context, switch with use-context, change the namespace, and avoid the wrong cluster.
- 8 min read
Dify OpenDAL Storage: OPENDAL_FS_ROOT & Docker Volumes
How self-hosted Dify stores files with OpenDAL: what OPENDAL_FS_ROOT does, how it maps to Docker volumes, and how to fix Permission denied: '/Users'.
- 17 min read
ExternalName and LoadBalancer - Ultimate Kubernetes Tutorial Part 5
Hey, welcome back to my ultimate Kubernetes tutorials! So far, we’ve explored ClusterIP and NodePort, but what if you need to route traffic outside your cluster or expose your app with a real…
- 11 min read
NodePort vs ClusterIP: Kubernetes Service Types Explained
NodePort vs ClusterIP on a real 1 master + 4 worker cluster: deploy Nginx, expose it both ways, test access, and fix CoreDNS and firewalld issues.
- 18 min read
Kubernetes Cluster Setup on Rocky 9 with kubeadm & Flannel
Kubernetes tutorial Part 3: build a local cluster (1 control plane, 4 workers) on Rocky Linux 9 VMs with containerd, kubeadm and Flannel, step by step.
- 10 min read
K8s Tutorial Part 2: BIND DNS and Chrony NTP on Rocky 9
Kubernetes on Mac, Part 2: clone a Rocky Linux 9 VM into a BIND DNS server with forward and reverse zones, plus a Chrony NTP server.
- 22 min read
Kubernetes Tutorial Part 1: Cluster on a Mac
Build a multi-node Kubernetes lab on a Mac: plan the cluster and networking, create a Rocky Linux 9 base VM in VMware Fusion and prepare the nodes.
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.