This section provides practical examples to help you run Kubernetes core features hands-on. Each example can be executed independently and includes all necessary YAML files and commands.

Choose Examples by Goal#

“Which example should I start with?”

flowchart TD
    START[Start Practice] --> Q1{Is Kubernetes<br>installed?}

    Q1 -->|No| A[Environment Setup]
    Q1 -->|Yes| Q2{Do you have<br>Kubernetes experience?}

    Q2 -->|First time| B[Basic Example]
    Q2 -->|Some experience| Q3{Want to deploy<br>real app?}

    Q3 -->|Yes| C[Spring Boot Deployment]
    Q3 -->|No| Q4{Need state management /<br>operations?}

    Q4 -->|State management| D[StatefulSet Lab]
    Q4 -->|Access control| E[RBAC Configuration]
    Q4 -->|Scheduling| F[CronJob Lab]

    A -->|After completion| B
    B -->|After completion| C
    C -->|After completion| D

    style A fill:#90EE90
    style B fill:#87CEEB
    style C fill:#DDA0DD
    style D fill:#FFD700
    style E fill:#FFA07A
    style F fill:#98FB98
Your SituationRecommended ExampleWhat You’ll Learn
New to KubernetesEnvironment SetupBasic ExampleCluster setup, Pod/Service basics
Know concepts but lack hands-onBasic ExampleRun Pod, Deployment, Service directly
Want to deploy real appsSpring Boot DeploymentApply ConfigMap, Secret, Probe
Need stateful appsStatefulSet LabPVC templates, Headless Service
Want to manage access permissionsRBAC Configuration LabRole, ServiceAccount, RoleBinding
Want to automate periodic tasksCronJob LabScheduling, concurrency policies

Example List#

ExampleDifficultyEstimated TimeTopics Covered
Environment Setup⭐ Beginner30 minLocal environment with Minikube, Kind
Basic Example⭐⭐ Basic60 minPod, Deployment, Service hands-on
Spring Boot Deployment⭐⭐⭐ Intermediate90 minReal application deployment
StatefulSet Lab⭐⭐⭐ Intermediate60 minMySQL StatefulSet, PVC, Headless Service
RBAC Configuration Lab⭐⭐⭐ Intermediate45 minRole, ServiceAccount, per-namespace access control
CronJob Lab⭐⭐⭐ Intermediate45 minPeriodic backup, concurrency policies, alert setup

Prerequisites#

All examples require the following environment:

  • Docker 24.x or higher
  • kubectl 1.29.x or higher
  • Local Kubernetes cluster (Minikube or Kind)

If your environment is not set up, start with the Environment Setup example.