Welcome to the Kubernetes (k8s) Learning Repository! This repository is a comprehensive, hands-on guide to mastering Kubernetes fundamentals through practical examples, commands, and configurations.
Note: More sections on advanced topics like ConfigMaps, Secrets, Ingress, Helm, and more will be added soon!
This repository is organized into topic-specific directories, each containing:
- Detailed README.md files: Step-by-step guides with
kubectlcommands, YAML configurations, and explanations. - Sample YAML files: Ready-to-use configuration files for resources like pods, deployments, services, etc.
- Best Practices and Notes: Tips, cautions, and discussions on when to use specific resources.
The content focuses on core Kubernetes concepts, using nginx as a common example application for simplicity. All examples assume a running Kubernetes cluster (e.g., Minikube, Kind, or a cloud-based cluster) and kubectl configured for access.
-
Setup Your Environment:
-
Navigate and Learn:
- Start with the Pods section for the basics.
- Follow the Table of Contents to progress through topics.
- Read each README.md for theory, commands, and YAML examples.
- Copy YAML files to your local environment and apply them with
kubectl apply -f <file.yaml>.
-
Hands-On Practice:
- Run the provided
kubectlcommands in your terminal. - Complete the tasks in each section to build and test resources.
- Experiment with modifications (e.g., scaling replicas, changing images) to deepen understanding.
- Use
kubectl describeandkubectl logsfor debugging.
- Run the provided
-
Cleanup:
- Delete resources after testing: e.g.,
kubectl delete -f <file.yaml>orkubectl delete ns <namespace>. - For local clusters, reset with
minikube deleteif needed.
- Delete resources after testing: e.g.,
-
Contribute:
- Found an error? Have suggestions? Fork the repo, make changes, and submit a Pull Request.
- Feel free to add new sections or examples!
- Basic knowledge of Docker/containers.
- Familiarity with YAML and command-line tools.
- A Kubernetes cluster (local or remote).
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ If this repository helps you, please star it on GitHub! Contributions and feedback are welcome.