A hands-on Kubernetes learning and implementation repository covering core Kubernetes concepts, workload management, networking, storage, configuration, security, scheduling, autoscaling, GitOps, and troubleshooting.
This repository contains practical Kubernetes YAML manifests, application examples, deployment configurations, and troubleshooting exercises developed while following a structured Kubernetes learning path.
- Overview
- Learning Objectives
- Kubernetes Topics Covered
- Hands-on Projects
- Workload Management
- Networking
- Storage and Configuration
- Security and Access Control
- Scheduling and Resource Management
- Autoscaling and High Availability
- GitOps with Argo CD
- Troubleshooting Exercises
- Repository Structure
- Prerequisites
- Working with the Manifests
- Learning Reference
- Author
This repository is a practical Kubernetes portfolio built through hands-on exercises and application deployment scenarios.
The goal is to understand how Kubernetes resources work together and how to manage containerized applications using declarative YAML configurations.
Rather than focusing only on theoretical concepts, the repository contains practical examples covering:
- Creating and managing Kubernetes workloads.
- Exposing applications through Services and Ingress.
- Managing application configuration and persistent storage.
- Implementing security and access control.
- Controlling workload scheduling and resource allocation.
- Configuring autoscaling and high availability.
- Exploring GitOps deployment concepts.
- Identifying and troubleshooting incorrect Kubernetes configurations.
The repository is intended as both a practical learning record and a technical reference for Kubernetes operations.
The main objectives of this project are:
- Understand Kubernetes architecture and resource management.
- Work confidently with Kubernetes YAML manifests.
- Deploy and manage different workload types.
- Configure internal and external application communication.
- Manage persistent application data.
- Apply security-related Kubernetes configurations.
- Understand scheduling decisions and resource constraints.
- Explore production-oriented deployment patterns.
- Practice troubleshooting common Kubernetes issues.
- Understand declarative deployment and GitOps principles.
Practical examples of fundamental Kubernetes objects:
- Pods
- Multi-container Pods
- Deployments
- ReplicaSets
- DaemonSets
- StatefulSets
- Jobs
- CronJobs
Networking and application exposure examples:
- Kubernetes Services
- Service discovery
- Ingress
- Application routing
- NetworkPolicy
- Frontend and backend communication
Examples covering application configuration and persistent data:
- ConfigMaps
- Environment-based configuration
- PersistentVolumeClaims
- Stateful application deployment
- Database workload configuration
Security-related Kubernetes configurations:
- Pod Security Context
- Container security settings
- ServiceAccounts
- Kubernetes access control concepts
- Network isolation
- Secure workload configuration
Examples demonstrating how Kubernetes schedules and manages workloads:
- Node Affinity
- Pod Anti-Affinity
- Node Selection
- Taints and Tolerations
- Resource Requests and Limits
- Resource Quotas
- Priority Classes
- Pod Distribution Budgets
Examples covering workload availability and scaling:
- Horizontal Pod Autoscaler (HPA)
- Multiple replicas
- High-availability deployment patterns
- Pod placement and distribution
- Rollout strategies
Exploration of advanced Kubernetes deployment concepts:
- Argo CD Application resources
- Declarative GitOps configuration
- Custom Resource Definitions (CRDs)
- Kubernetes API extensibility
The repository includes practical application examples in addition to individual Kubernetes manifests.
An application example used to explore Kubernetes application deployment and related resources.
A separate application example for practicing Kubernetes workload and application configuration concepts.
A Kubernetes configuration combining multiple resources to demonstrate a basic multi-tier application structure.
The full-stack.yaml manifest includes:
- Frontend Deployment
- Frontend Service
- Ingress resource
Kubernetes workloads are responsible for managing application containers and maintaining their desired state.
This repository includes examples of:
| Resource | Purpose |
|---|---|
| Pod | Basic application workload |
| Deployment | Declarative application deployment |
| DaemonSet | Workload scheduling across nodes |
| StatefulSet | Stateful application management |
| Job | Run-to-completion workloads |
| CronJob | Scheduled workloads |
Example manifests include:
pod.yaml
pod2.yaml
multi-pod.yaml
nginx-deploy.yaml
daemonset.yaml
sts.yaml
db-sts.yaml
job-success.yaml
job-failing.yaml
job-parallel.yaml
cronjob.yaml
Kubernetes networking allows applications to communicate internally and receive external traffic.
The repository contains examples of:
- Service resources.
- Frontend and backend tiers.
- Ingress routing.
- Network policies.
- Application connectivity.
Relevant manifests include:
service-lab.yaml
backend-tier.yaml
frontend-tier.yaml
full-stack.yaml
deny-all.yaml
Persistent storage and application configuration are essential for stateful workloads.
The repository includes examples of:
- ConfigMaps.
- Pod configuration.
- PersistentVolumeClaims.
- Stateful database workloads.
Relevant manifests include:
cm.yaml
pod-cm.yaml
pvc.yaml
db-sts.yaml
db-svc.yaml
db-tier.yaml
Kubernetes security configurations help control how workloads run and how applications access cluster resources.
Examples include:
secure-pod.yaml
pod-sa.yaml
sa.yaml
deny-all.yaml
These exercises explore topics such as:
- Pod-level security configuration.
- ServiceAccount usage.
- Workload isolation.
- Network traffic restrictions.
Kubernetes scheduling determines where workloads run based on available resources and scheduling constraints.
This repository includes practical examples of:
node-affinity.yaml
pod-nodeslector-toleration.yaml
ha-preferred.yaml
ha-deploy.yaml
priority.yaml
quota.yaml
low-app.yaml
high-app.yaml
hog.yaml
pod-distribution-budget.yaml
These manifests demonstrate concepts such as:
- Node Affinity.
- Taints and Tolerations.
- Pod Anti-Affinity.
- Resource Requests and Limits.
- Resource Quotas.
- Pod Priority.
- Workload distribution.
High availability and autoscaling help applications remain available and adapt to changing workloads.
Examples include:
hpa.yaml
hpa-app.yaml
ha-deploy.yaml
ha-preferred.yaml
rollout-deploy.yaml
These exercises explore replica management, workload placement, scaling, and deployment strategies.
Argo CD provides a declarative approach to Kubernetes application delivery.
The repository contains an example Argo CD Application manifest:
argo-app.yaml
This example demonstrates the structure of an Argo CD Application resource, including:
- Source Git repository.
- Target revision.
- Application path.
- Destination Kubernetes cluster and namespace.
- Automated synchronization.
- Pruning and self-healing settings.
The manifest is an example configuration and should be adapted to the intended application repository before deployment.
Troubleshooting is an important part of Kubernetes administration.
This repository includes intentionally incorrect or incomplete YAML examples designed for identifying configuration issues and understanding Kubernetes failure scenarios.
Examples include:
broken-app.yaml
broken-backend.yaml
broken-crontab.yaml
broken-init.yaml
broken-secure.yaml
broken-svc.yaml
These exercises help develop practical troubleshooting skills, including:
- Identifying invalid resource configurations.
- Understanding workload startup failures.
- Debugging Service and application connectivity.
- Troubleshooting initialization problems.
- Recognizing security configuration issues.
- Understanding scheduling and deployment failures.
Note: Files prefixed with broken- are troubleshooting exercises and should not be treated as production-ready manifests.
k8s-task/
│
├── my-api/
│
├── my-app/
│
├── argo-app.yaml
├── backend-tier.yaml
├── broken-app.yaml
├── broken-backend.yaml
├── broken-crontab.yaml
├── broken-init.yaml
├── broken-secure.yaml
├── broken-svc.yaml
│
├── cm.yaml
├── cronjob.yaml
├── crontab-crd.yaml
├── daemonset.yaml
│
├── db-sts.yaml
├── db-svc.yaml
├── db-tier.yaml
│
├── deny-all.yaml
├── frontend-tier.yaml
├── full-stack.yaml
│
├── ha-deploy.yaml
├── ha-preferred.yaml
├── high-app.yaml
├── hog.yaml
├── hourly-backup.yaml
│
├── hpa-app.yaml
├── hpa.yaml
├── init-pod.yaml
│
├── job-failing.yaml
├── job-parallel.yaml
├── job-success.yaml
│
├── liveness-pod.yaml
├── low-app.yaml
├── multi-pod.yaml
├── nginx-deploy.yaml
│
├── node-affinity.yaml
├── pod-cm.yaml
├── pod-distribution-budget.yaml
├── pod-nodeslector-toleration.yaml
├── pod-sa.yaml
├── pod.yaml
├── pod2.yaml
│
├── priority.yaml
├── pvc.yaml
├── qanary-strategy.yaml
├── quota.yaml
├── rollout-deploy.yaml
├── sa.yaml
├── secure-pod.yaml
├── service-lab.yaml
└── sts.yaml
The structure above represents the repository layout at the time of documentation. The application directories may contain additional source code and configuration files.
To work with the examples, the following tools and knowledge are recommended:
- Linux command-line fundamentals.
- Basic YAML knowledge.
- Docker fundamentals.
- Kubernetes cluster.
kubectlCLI.- Basic understanding of container networking.
Optional tools for advanced exercises:
- Helm
- Argo CD
- A local Kubernetes environment such as kind or Minikube.
The manifests are intended to be inspected, modified, and applied individually according to each exercise.
Check cluster nodes:
kubectl get nodesList available namespaces:
kubectl get namespacesInspect Pods:
kubectl get pods -AValidate a manifest:
kubectl apply --dry-run=client -f <manifest.yaml>Apply a manifest:
kubectl apply -f <manifest.yaml>Inspect a resource:
kubectl describe <resource-type> <resource-name>View application logs:
kubectl logs <pod-name>Delete resources created by a manifest:
kubectl delete -f <manifest.yaml>Important: Review each manifest before applying it. Some examples are intentionally designed to demonstrate invalid configurations or troubleshooting scenarios.
This project was developed while following the learning materials and practical exercises from:
Kubernetes Zero to Production – Suchan Madhikarmi
The original repository provides the structured learning path and reference material.
This repository contains my practical Kubernetes exercises, YAML configurations, and application examples developed during that learning journey.
Please refer to the original repository for its own documentation, contribution guidelines, and license information.
Mahbod Rahimian
DevOps Engineer