๐ŸŒ Detecting your locationโ€ฆ

Kubernetes for Beginners 2026: Deploy Your First App on K8s

โฑ๏ธ2 min read  ยท  381 words
Kubernetes for Beginners 2026: Deploy Your First App on K8s

Kubernetes (K8s) is the standard platform for running containerized applications at scale in 2026. Every major cloud provider offers managed Kubernetes: EKS (AWS), GKE (Google), AKS (Azure). This beginner guide explains core concepts and gets your first app running in a cluster.

Core Concepts

  • Pod: Smallest deployable unit โ€” one or more containers sharing network/storage
  • Deployment: Manages multiple pod replicas, handles rolling updates
  • Service: Stable network endpoint for a set of pods
  • Namespace: Virtual cluster for resource isolation
  • ConfigMap/Secret: Configuration and sensitive data injection

Install kubectl and Minikube (Local Testing)

# Install kubectl
curl -LO https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl && sudo mv kubectl /usr/local/bin/

# Install Minikube (local cluster)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

# Start cluster
minikube start --cpus 2 --memory 4096
kubectl cluster-info

Deploy Your First App

# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
  namespace: default
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: myapp:1.0
        ports:
        - containerPort: 8000
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 512Mi

# service.yaml
apiVersion: v1
kind: Service
metadata:
  name: myapp-service
spec:
  selector:
    app: myapp
  ports:
  - port: 80
    targetPort: 8000
  type: LoadBalancer

kubectl apply -f deployment.yaml
kubectl apply -f service.yaml

# Check status
kubectl get pods
kubectl get services
kubectl describe pod <pod-name>

Essential kubectl Commands

# Get resources
kubectl get pods -n default
kubectl get deployments
kubectl get services

# View logs
kubectl logs <pod-name>
kubectl logs -f <pod-name>  # follow

# Exec into pod
kubectl exec -it <pod-name> -- /bin/bash

# Scale deployment
kubectl scale deployment myapp --replicas=5

# Rolling update (zero downtime)
kubectl set image deployment/myapp myapp=myapp:2.0

# Rollback
kubectl rollout undo deployment/myapp

ConfigMaps and Secrets

# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: myapp-config
data:
  DATABASE_HOST: postgres-service
  APP_ENV: production

---
# secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: myapp-secret
type: Opaque
stringData:
  DATABASE_PASSWORD: supersecret

Conclusion

Kubernetes is complex but the core concepts are straightforward. Master Pods, Deployments, and Services, then add Ingress for routing and HorizontalPodAutoscaler for auto-scaling. For production, use a managed service (EKS/GKE/AKS) rather than self-hosting the control plane.

MD Rafikul Islam

Written by

MD Rafikul Islam is a software developer and the editor of TechPulse. He writes about developer tooling, hardware, and the practical decisions that come up in day-to-day engineering work โ€” which laptop to buy, which framework to commit to, why a build broke at 2am. He tests the tools he writes about and says plainly when something is not worth the money. Corrections and corrections requests are welcome at rony.yf25@gmail.com.

โœ๏ธ Leave a Comment

Your email address will not be published. Required fields are marked *

๐ŸŒ Read in:๐Ÿ‡ฌ๐Ÿ‡ง English๐Ÿ‡ง๐Ÿ‡ท Portuguรชs๐Ÿ‡ธ๐Ÿ‡ฆ ุงู„ุนุฑุจูŠุฉ๐Ÿ‡ฎ๐Ÿ‡ณ เคนเคฟเคจเฅเคฆเฅ€