This repository contains a collection of practical Kubernetes examples and tutorials, covering various aspects of Kubernetes deployment, configuration, and management.
.
├── crd-example/ # Custom Resource Definition examples
├── docker-buildx-example/ # Multi-architecture Docker builds
├── ingress-example/ # Kubernetes Ingress configuration
├── oc-deploy-example/ # OpenShift deployment examples
├── operator-example/ # Kubernetes Operator patterns
├── pod-test/ # Pod configuration and testing
├── prow-example/ # Prow CI/CD configuration
├── deployment.yaml # Basic Nginx deployment
├── service.yaml # NodePort service example
└── docs/
└── tutorial.md # Detailed tutorials and guides
- Files:
deployment.yaml
,service.yaml
- Description: A minimal example of deploying an Nginx web server and exposing it via NodePort
- Features: Basic deployment and service configuration
- Tutorial: See docs/tutorial.md
- Location:
crd-example/
- Description: Examples of creating and using Custom Resource Definitions in Kubernetes
- Use Cases: Extending Kubernetes API with custom resources
- Location:
docker-buildx-example/
- Description: Examples of using Docker Buildx for multi-architecture container builds
- Features: Cross-platform container builds
- Location:
ingress-example/
- Description: Examples of configuring Ingress resources for HTTP/HTTPS routing
- Features: Load balancing, SSL termination, path-based routing
- Location:
oc-deploy-example/
- Description: Examples of deploying applications on OpenShift
- Features: OpenShift-specific configurations and best practices
- Location:
operator-example/
- Description: Examples of building and deploying Kubernetes Operators
- Features: Custom controller patterns, operator SDK usage
- Location:
pod-test/
- Description: Examples of pod configuration and testing scenarios
- Features: Pod lifecycle management, testing patterns
- Location:
prow-example/
- Description: Examples of Prow CI/CD configuration for Kubernetes
- Features: Automated testing, code review, and deployment workflows
-
Clone this repository:
git clone https://github.com/yourusername/k8s-example.git cd k8s-example
-
Choose a subproject that matches your needs
-
Follow the specific instructions in each subproject's directory
-
For basic Kubernetes concepts, start with the tutorial in docs/tutorial.md
- A running Kubernetes cluster (Minikube, Kind, or cloud-based like EKS/GKE)
kubectl
installed and configured- Basic understanding of Kubernetes concepts
- Docker (for container-related examples)
- Go (for operator and CRD examples)
Contributions are welcome! Please feel free to submit a Pull Request. When contributing:
- Create a new branch for your feature
- Add appropriate documentation
- Include tests where applicable
- Follow the existing code style
This project is licensed under the MIT License - see the LICENSE file for details.