AutoDeploy
← All guides

Kubernetes

LOWOrchestrationBEGINNER

Kubernetes Fundamentals: Deploying and Managing Applications

Learn the fundamentals of Kubernetes, including architecture, Pods, Deployments, Services, ConfigMaps, and Secrets.

Est. Time

45 minutes

Version

v1.0.0

Updated

7/24/2026

Author

AutoDeploy Team

Tags

#kubernetes#pods#deployments#services#configmaps#secrets

Prerequisites

  • A running Kubernetes cluster (minikube, kind, or a managed cluster)
  • kubectl installed and configured

Setup Guide

Download guide

Kubernetes Fundamentals: Deploying and Managing Applications

Problem

A walkthrough of the core Kubernetes objects and how they fit together to run a real application.

Solution

1. Understand the core objects

Pod        — the smallest deployable unit, one or more containers sharing storage/network
Deployment — manages a set of replica Pods and rolls out changes
Service    — a stable network endpoint in front of a changing set of Pods
ConfigMap  — non-secret configuration data
Secret     — sensitive configuration data (base64-encoded, not encrypted by default)

2. Create a Deployment

kubectl create deployment web --image=nginx:1.27 --replicas=3

3. Expose it with a Service

kubectl expose deployment web --port=80 --type=ClusterIP

4. Store configuration in a ConfigMap

kubectl create configmap web-config --from-literal=LOG_LEVEL=info

5. Store sensitive values in a Secret

kubectl create secret generic web-secret --from-literal=API_KEY=changeme

6. Mount both into the Deployment

spec:
  containers:
    - name: web
      image: nginx:1.27
      envFrom:
        - configMapRef: { name: web-config }
        - secretRef: { name: web-secret }

7. Roll out a change and watch it happen gradually, not all at once

kubectl set image deployment/web nginx=nginx:1.28
kubectl rollout status deployment/web

8. Roll back if something's wrong

kubectl rollout undo deployment/web

9. Check the state of everything you just created

kubectl get deployments,services,configmaps,secrets,pods

Next Steps

  • Explore Ingress for routing external traffic
  • Learn about Horizontal Pod Autoscaling
  • Set resource requests/limits on every container
  • Read up on Namespaces for multi-tenant clusters

References

Last updated on 7/24/2026 · Part of the AutoDeploy DevOps Documentation library