Master Kubernetes from Scratch
Master Kubernetes from Scratch
Kubernetes Tutorial PDF for Beginners
About the Book
Why Learn Kubernetes?
Kubernetes is one of the most in-demand skills today because:
- Companies are moving to the cloud, and Kubernetes is the leading platform for container orchestration.
- It supports scaling, self-healing, and high availability.
- It’s key to understanding DevOps, container orchestration, and infrastructure automation.
- It helps you stand out in the job market—Kubernetes engineers are in high demand.
- Kubernetes works with all major cloud providers (AWS, GCP, Azure), so you're not tied to one platform.
What’s Inside This Book?
This is a practical, hands-on guide to learning Kubernetes from scratch. You’ll get clear explanations, architecture diagrams, and working YAML examples.
You’ll cover all the essential resources:
✅ Clusters, Nodes, and kubectl basics
✅ Pods, Init containers, Sidecar containers, and Pod networking
✅ Deployments, scaling, rollbacks, and self-healing setups
✅ Services, Ingress, and Service types like NodePort and LoadBalancer
✅ Namespaces, Volumes, and PersistentVolumeClaims (PVCs)
✅ Jobs, CronJobs, Probes, Labels, Annotations
✅ ConfigMaps, Secrets, and Security Context
✅ Kubernetes RBAC, authentication, and authorization modes
✅ Hands-on labs using Kind, Docker, and YAML configs
Each chapter includes commands, workflows, and troubleshooting tips you can apply right away.
Who Should Read This Book?
This book is designed for beginners and anyone who wants to learn Kubernetes:
- Developers who want to deploy and manage applications with Kubernetes.
- IT professionals transitioning to DevOps and cloud technologies.
- Engineers looking to automate infrastructure.
- Anyone curious about container orchestration and cloud-native tools.
Why This Book?
It can be frustrating to jump between random tutorials and still feel lost. That’s why I created this book — to give you structured lessons that help you start working with Kubernetes right away.
The theory is reduced to only what matters. You'll get hands-on examples, clear explanations, and diagrams to help you understand and remember each step. We’ll start with the basics, like managing Pods, and gradually move to advanced concepts like security.
Bundles that include this book
Table of Contents
- Introduction to the Book
- Why Learn Kubernetes?
- What Does a Kubernetes Engineer Do?
- What Will You Learn from This Book?
- Who Should Read This Book?
- Prerequisites
- Docker
- Kind
- kubectl
- The Purpose of Kubernetes
- Interesting Facts
- Containerized Applications
- Kubernetes Key Features
- Conclusion
- Kubernetes Clusters
- Key Components of a Kubernetes Cluster
- Kubernetes Cluster Types
- Kubelets
- The Kubeconfig File
- Hands-on: Creating a Kubernetes Cluster with Kind
- Commands for Managing Clusters
- Conclusion
- Declarative vs. Imperative Resource Management
- Declarative Approach (Using YAML Files)
- Imperative Approach (Using Commands)
- Conclusion
- Kubernetes Pods
- Pod Lifecycle
- Pod Immutability
- Static Pods vs. Controllers
- Pod Networking
- Multi-Container Pods
- Init Containers
- Sidecar Containers
- Temporary Pods
- Restart Policies
- Entrypoint and CMD
- Key Differences from Docker
- Commands for Managing Pods
- Conclusion
- Kubernetes Namespaces
- Key Features of Namespaces
- Commands for Managing Namespaces
- Conclusion
- Kubernetes Deployments
- Key Features of Deployments
- How Deployments Work
- Updating Deployments
- Scaling Deployments
- Rollbacks
- Commands for Managing Deployments
- Conclusion
- Kubernetes Services
- How Services Work
- How Labels and Selectors Work
- Service Types
- ClusterIP
- NodePort
- LoadBalancer
- Key Features of Services
- Commands for Managing Services
- Hands-on Exercises
- Conclusion
- Kubernetes Ingress
- How Ingress Works
- Common Use Cases
- Best Practices for Using Ingresses
- Hands-on: Set Up Ingress in Kind
- Conclusion
- Kubernetes Volumes
- Key Features of Volumes
- Volume Types
- Persistent Volume Concepts
- Access Modes
- Provisioning Volumes
- Commands for Managing Volumes
- Hands-on Example: PVC and Pod Lifecycle
- Conclusion
- Kubernetes StatefulSets
- How StatefulSets Differ from Deployments
- StatefulSet Key Features
- Rolling Updates and Pod Order
- Commands for Managing StatefulSets
- Hands-on Example: StatefulSet with Persistent Storage
- Conclusion
- Kubernetes Secrets and ConfigMaps
- ConfigMaps
- Secrets
- Injecting ConfigMaps and Secrets into Pods
- Hands-On Examples
- Best Practices
- Conclusion
- Kubernetes Labels and Annotations
- Labels
- Label Selectors
- Annotations
- Conclusion
- Kubernetes Jobs and CronJobs
- Jobs Overview
- CronJobs Overview
- Hands-on: Creating Jobs and CronJobs
- Conclusion
- Kubernetes Container Probes
- Probe Types
- Probe Mechanisms
- Best Practices
- Hands-on: Spring Boot Example
- Conclusion
- Kubernetes Security Context
- Pod vs. Container Level
- Best Practices
- Common Pitfalls
- Combining with Other Mechanisms
- Hands-On Exercise
- Conclusion
- Kubernetes Authentication and Authorization
- Authentication
- Authorization
- Hands-On: Custom Service Account
- Conclusion
- Final Thoughts and Next Steps
- Acknowledgment
- Key Takeaways
- What’s Next?
- Feedback
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them