Kubernetes
Resources to assist developers to start getting familiar with Kubernetes.
Glossary of terms
- Kubernetes: the orchestration service for deploying and managing resources, Sometimes abbreviated as k8s. It’s more of a standard than a specific software executable; there are many different “Kubernetes” implementations out in the world.
- Pod: a unit of work, consisting of a set of Docker containers and their configuration. Each Pod contains one or more containers.
- Node: a computer running the Kubernetes node agent (kubelet). Executes Pods.
- Cluster: a logical collection of Nodes, managed by Kubernetes.
- Service: a networking abstraction which provides stable access to a set of dynamic, constantly-updating Pods.
- Controller: the mechanism by which Kubernetes orchestrates workloads. Each Controller will continuously perform actions to achieve a desired state (e.g. keep a container running in a Pod), and it will do this by observing specific variables (e.g. the Pod’s liveness probe is healthy).
- Namespace: a logical subdivision of the Cluster. Provides scope for isolating groups of resources from each other (like DNS search domain).
- Deployment: a higher-level abstraction that manages Pods and ReplicaSets. Provides declarative updates for Pods and ReplicaSets.
- ReplicaSet: ensures that a specified number of Pod replicas are running at any given time.
- ConfigMap: an API object used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps as environment variables, command-line arguments, or configuration files.
- Secret: similar to ConfigMap but specifically for storing sensitive information like passwords, OAuth tokens, and SSH keys.
- Ingress: an API object that manages external access to services in a cluster, typically HTTP. Provides routing rules to direct traffic to different services.
- PersistentVolume (PV): a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.
- PersistentVolumeClaim (PVC): a request for storage by a user. Pods consume PVCs as volumes.
- DaemonSet: ensures that all (or some) Nodes run a copy of a Pod. Used for cluster-wide services like logging or monitoring agents.
- StatefulSet: manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. Used for stateful applications.
- Job: creates one or more Pods and ensures that a specified number of them successfully terminate. Used for batch processing tasks.
- CronJob: creates Jobs on a repeating schedule. Similar to cron jobs in Linux.
- Helm: a package manager for Kubernetes that packages multiple Kubernetes resources into a single logical package called a Chart.
Learning & documentation
Resources that are useful / relevant for internal developers to learn just enough about Kubernetes to be productive.
Beginner-friendly introductions
- Introduction to Kubernetes on Azure - Learning path from Microsoft. Pretty thorough introduction to Docker, containers and AKS in general.
- Kubernetes Basics - Interactive tutorials from the official Kubernetes documentation covering the fundamentals.
- Kubernetes Workshop - Collection of tutorials and workshops for learning Kubernetes.
Official documentation
- Kubernetes Documentation - comprehensive, but not the best introductory learning resource. Has a pretty good set of interactive tutorials.
- Kubernetes Concepts - Detailed explanations of Kubernetes objects and concepts.
- Kubernetes Reference - API references, CLI documentation, and setup guides.
Video courses and tutorials
- Kubernetes tutorial for beginners - TechWorld with Nana’s comprehensive introduction (2+ hours).
- Kubernetes fundamentals - Udemy course covering core concepts (paid course).
- Kubernetes the Hard Way (Video) - Video walkthrough of building Kubernetes from scratch.
Interactive learning platforms
- Play with Kubernetes - Free, online Kubernetes playground provided by Docker.
- KillerCoda - Interactive Kubernetes scenarios in the browser.
- Katacoda Kubernetes Scenarios - Browser-based interactive Kubernetes tutorials.
Core concepts deep dive
Pods and workloads
- Pods - The smallest deployable units in Kubernetes.
- Pod Lifecycle - Understanding Pod states and transitions.
- Deployments - Managing stateless applications.
- StatefulSets - Managing stateful applications.
- DaemonSets - Running pods on every node.
- Jobs and CronJobs - Running batch workloads.
Networking
- Service - Exposing applications within the cluster.
- Ingress - Managing external access to services.
- Network Policies - Controlling traffic flow between pods.
Storage
- Volumes - Storage volumes in Pods.
- Persistent Volumes - Persistent storage in Kubernetes.
- Storage Classes - Dynamic provisioning of storage.
Configuration
- ConfigMaps - Storing configuration data.
- Secrets - Storing sensitive data.
- Environment variables - Passing configuration to containers.
kubectl references
- Reference - Complete kubectl command reference.
- Cheatsheet - Quick reference for common kubectl commands.
- Conventions - Guidelines for using kubectl.
- kubectl quick reference - Most common kubectl commands.
Tools and utilities
Package management
- Helm - The package manager for Kubernetes.
- Helm Hub - Find and share Helm charts.
- Kustomize - Kubernetes native configuration management.
Other resources
- Introduction to Kustomize - Kustomize provides a solution for customizing Kubernetes resource configuration.
- Complete Kustomize tutorial - another good Kustomize reference.
- Helm documentation - Official Helm documentation and guides.
- Kubernetes best practices - Official best practices guide.
- Kubernetes security best practices - Security considerations and recommendations.
Troubleshooting and debugging
- Debug Pods - Troubleshooting Pod issues.
- Debug Services - Troubleshooting Service issues.
- Debug Applications - General application debugging techniques.
- kubectl debug - Debug running pods with ephemeral containers.