Kubernetes Usage Guide: A Beginner's Guide for Engineers and Developers

For engineers and developers new to Kubernetes, I'll briefly explain the basic concepts of Kubernetes along with practical usage examples.
For detailed information, please refer to the official documentation!

Kubernetes Documentation Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation.
1. The Need for Containers and Kubernetes
1.1. What are Containers?
Containers are lightweight, isolated environments that package applications and their dependencies (libraries, configuration files, etc.) into a single package for execution. Unlike virtual machines (VMs), containers share the host operating system's kernel, making them more efficient.

Containers provide the following advantages:
- Consistency: Ensures identical execution environments across development, testing, and production.
- Efficiency: Uses fewer resources than VMs.
- Scalability: Easily deploy and manage hundreds or thousands of containers.
- Isolation: Different applications can run safely on the same host.
The most widely used container runtime is Docker. https://chonchony.tistory.com/m/entry/Docker-%EB%8F%84%EC%BB%A4%EB%9E%80-%EB%AC%B4%EC%97%87%EC%9D%B8%EA%B0%80
Docker is used to create, deploy, and run containers. To create containers, you follow these steps:
- Write Dockerfile: Define the application environment (base image, code, dependencies, configuration).
- Build Image: Create a container image using the Dockerfile.
- Run Container: Execute containers based on the image.
1.2. The Importance of Containers
Containers are essential in modern software development. We use containers for the following reasons:
- Portability: Containers run identically across cloud, on-premises, and local environments.
- Scaling: Applications can be easily replicated and scaled.
- Microservices: Complex applications can be separated into small, independent services.
However, managing containers at scale requires complex tasks (e.g., scaling, networking, failure recovery). This is where Kubernetes becomes necessary.

2. Introduction to Kubernetes
2.1. What is Kubernetes?
Kubernetes (K8s) is an open-source platform that automatically deploys, scales, and manages containerized applications. Developed by Google and currently managed by the Cloud Native Computing Foundation (CNCF), Kubernetes provides the following key features:
Feature | Description |
---|---|
Service Discovery & Load Balancing | Assigns DNS names or IPs to containers and distributes traffic. |
Storage Orchestration | Automatically mounts various storage types including local and cloud storage. |
Automated Rollouts & Rollbacks | Safely applies application updates and recovers to previous versions if issues occur. |
Automatic Bin Packing | Optimizes resources to efficiently place containers. |
Self-healing | Automatically restarts or replaces failed containers. |
Secret Management | Safely manages sensitive information like passwords and tokens. |
Batch Execution | Runs one-time jobs or CI/CD pipelines. |
Horizontal Scaling | Automatically scales applications up/down based on CPU usage and other metrics. |
IPv4/IPv6 Dual Stack | Supports both IPv4 and IPv6 addresses. |
Extensibility | Designed to allow addition of new features. |
Kubernetes is used in many TOP500 supercomputer systems and supported by major cloud providers like AWS, Google Cloud, and Azure.
2.2. Why Use Kubernetes?
Kubernetes is essential for container management for the following reasons:
- Automation: Automates deployment, scaling, and updates to increase developer productivity.
- Scalability: Supports everything from small clusters to large-scale production environments.
- High Availability: Ensures applications run without interruption.
- Portability: Works identically across various environments.
- Community Support: As an open-source project, it provides active community support and rich documentation.
3. Kubernetes Architecture
A Kubernetes cluster consists of several components. The main components are:
Component | Description |
---|---|
Master Node | Manages the cluster, including API server, scheduler, and controller manager. |
Worker Node | Nodes where applications run, including kubelet and kube-proxy. |
etcd | Distributed key-value storage that stores cluster state and configuration information. |
kube-apiserver | Provides the Kubernetes API and manages cluster state. |
kube-scheduler | Places workloads on appropriate nodes. |
kube-controller-manager | Maintains cluster state and manages replication, node status, etc. |
kubelet | Runs and manages containers on nodes. |
kube-proxy | Handles networking and load balancing. |
Container Runtime | Runtime that executes containers, such as Docker or containerd. |
Key Kubernetes objects:
- Pod: The basic execution unit in Kubernetes, containing one or more containers.
- Deployment: Manages pods and handles scaling and updates.
- Service: Provides stable network endpoints for pods.
4. Getting Started with Kubernetes
4.1. Basic kubectl Commands
Here are frequently used kubectl commands:
Command | Description |
---|---|
kubectl get nodes | Displays the list of cluster nodes. |
kubectl get pods | Displays the list of running pods. |
kubectl get deployments | Displays the list of deployments. |
kubectl get services | Displays the list of services. |
kubectl create | Creates resources (deployments, services, etc.). |
kubectl delete | Deletes resources. |
kubectl logs | Displays pod logs. |
kubectl describe | Displays detailed information about resources. |
5. Example: Deploying a Simple Application
Here's a simple example of deploying an nginx web server:
bash
# Create a deployment
kubectl create deployment nginx-deployment --image=nginx
# Expose the deployment as a service
kubectl expose deployment nginx-deployment --port=80 --type=NodePort
# Check the status
kubectl get pods
kubectl get services
6. Conclusion
Kubernetes is a frequently used tool for efficiently managing and orchestrating containerized applications. From a user perspective, understanding this much should be sufficient. For those studying server infrastructure, I think you'll quickly master it by reading the official documentation mentioned above.
Next Steps
To deepen your Kubernetes knowledge:
- Practice with local tools like Minikube or Docker Desktop
- Learn about advanced concepts like ConfigMaps, Secrets, and Persistent Volumes
- Explore monitoring and logging solutions
- Study security best practices
- Consider managed Kubernetes services (EKS, GKE, AKS)
Kubernetes may seem complex at first, but once you understand the core concepts, it becomes an incredibly powerful tool for modern application deployment and management.