Video summary
Docker & Kubernetes Full Course in 5 Hours | Complete Beginner to Advanced Tutorial | Ashok IT
Main summary
Key takeaways
Summary: Docker and Kubernetes Concepts + Guides
Docker crash course (core ideas + problem/solution)
- Docker definition & purpose: Docker is described as a free, open-source containerization tool. Containerization means packaging application code and required dependencies as a single unit.
- Motivation/problem before Docker: Real projects often have a multi-layer architecture, such as:
- Frontend (example: Angular)
- Backend (example: Java)
- Database (example: MySQL)
Without containers, teams must manually prepare separate environments (e.g., Dev, SIT, UAT, Pilot/Pre-prod, Prod) by installing dependencies such as:
- Angular (e.g., Angular 13)
- Java (e.g., Java 17)
- Tomcat (e.g., Tomcat 9)
- MySQL (e.g., MySQL 8.5)
-
Key issues highlighted:
- Version conflicts across environments (e.g., Java 11 vs Java 17)
- Time-consuming and error-prone manual environment setup
- Maintenance cost during upgrades (uninstall/reinstall dependencies across all environments)
- “Works on my machine” / environmental inconsistency that can cause blame between dev/testing teams
-
Docker solution:
- Build a Docker image that bundles:
- application code (e.g., JAR/WAR, web app)
- dependencies (as needed during the image build)
- Run the same image as a Docker container in any environment without manually installing all dependencies again.
- Result: better deployment consistency, improving confidence that the app behaves similarly across environments.
- Build a Docker image that bundles:
Docker containerization workflow (architecture + terminology)
Workflow: Dockerfile → Docker image → Registry → Container
- Dockerfile: Instruction file defining dependencies and runtime configuration.
- Docker image: Build artifact containing code + dependencies.
- Docker registry (e.g., Docker Hub): Storage for images (public/private). Alternatives mentioned:
- Nexus
- JFrog
- AWS ECR
- Docker container: Running instance created from an image.
Upgrades / version changes approach
- Update dependency versions in the Dockerfile, then rebuild the image and rerun containers.
- Avoid reinstalling software on every environment machine.
Operational model (virtualization concept)
- Containers are explained using virtualization ideas:
- Install Docker engine on the host OS
- Containers run with their own packaged environment
- (Speaker analogy: like a “Linux virtual machine”)
Docker practical guide content (commands + running containers)
Docker setup tutorial (hands-on on AWS Linux VM)
- Create a Linux EC2 instance (Amazon Linux).
- Install Docker via package manager steps.
- Start Docker service.
- Add user to the docker group and verify using:
docker versiondocker info
Common Docker CLI commands covered
docker images(list images)docker ps/docker ps -a(running vs all containers)docker pull <image>docker run <image>(runs and creates a container)docker rm <container_id>(delete container)docker rmi <image>(delete image)- Cleanup:
docker system prune -a(remove stopped containers/unused images)
Image lifecycle demonstration
- Pull
hello-world, run it, and observe output (“hello from docker”). - Discuss that the
hello-worldcontainer stops after output.
Port mapping to access containerized apps
- A containerized app is not reachable externally by default.
- Use:
docker run -p <hostPort>:<containerPort> ...
- For AWS EC2 exposure, update Security Group inbound rules to allow the host port.
Detached/background mode
- Use
docker run -dto run containers in detached mode (logs not printed to the terminal). - Retrieve logs using:
docker logs <container_id>
Example mention
- A Spring Boot REST API Docker image (speaker example), including URL patterns like
Welcome <name>.
Kubernetes crash course (orchestration + architecture + practical deployment)
Kubernetes definition
- Kubernetes (K8s) is an open-source orchestration platform that manages containerized workloads.
- Mapping of terms:
- Docker = containerization
- Kubernetes = orchestration/management
Why Kubernetes is needed (as described)
In microservices architecture, many services/containers must be created and managed. Kubernetes automates:
- Scaling up/down
- Load balancing
- Self-healing (replace failed containers/pods)
- Management of many containers across multiple hosts
Key Kubernetes advantages listed
- Container orchestration
- Scalability
- Self-healing
- Load balancing
Kubernetes architecture concepts (control plane vs worker nodes)
Cluster
- A group of servers (multi-node setup emphasized).
Control plane (“master”) components
- API server
- Scheduler
- Controller manager
- etcd (cluster database for storing requests/state)
Worker node components
- Pods/containers runtime
- kubelet (node agent for worker node status/health)
- kube-proxy (networking for cluster communication)
- docker engine noted as part of the worker node explanation
Interaction flow (described)
- Developer sends requests via kubectl (CLI) or UI.
- API server receives and stores request state in etcd.
- Scheduler selects which worker node to use (using information from kubelet).
- Pods are created on worker nodes; containers start.
Kubernetes primitives: Pod + Service
Pod
- Smallest deployable unit in Kubernetes (runtime instance of an application).
- For more capacity, create multiple pod replicas.
- Self-healing: if a pod is deleted or crashes, Kubernetes recreates it.
Service
- Used to expose pods/ports.
- Pods are not directly accessible from outside the cluster by default.
- Services provide stable access.
- Service types covered (3):
- ClusterIP (internal cluster access)
- NodePort (expose via worker node port)
- LoadBalancer (external exposure with load balancing)
Kubernetes manifest YAML tutorial (high-level structure)
Manifest YAML structure
apiVersionkindmetadataspec
Deployment manifest concept (speaker’s example)
- Uses Deployment kind with replicas (e.g.,
replicas: 2) - Rolling update strategy mentioned (rolling/recreate/canary)
- Labeling + selectors emphasized:
matchLabels/ pod labels used to connect deployments/services
- Container uses an image from Docker Hub and exposes a container port (example: 8080)
Service manifest concept
kind: Servicespec.typeincludes LoadBalancerselectorlinks service to pod labels- Port mapping described (container port → service/load balancer port)
Kubernetes practical guide content (hands-on with AWS EKS)
Cluster setup approach
- Self-managed vs provider-managed clusters.
- Workshop approach: AWS EKS (managed Kubernetes).
EKS prerequisites and cost warning
- EKS is paid (billing based on usage/time).
- Recommendation: delete resources after practice to reduce cost.
EKS setup steps (hands-on)
- Create an EKS management host EC2 instance (Ubuntu).
- Install tooling on it:
kubectlaws-clieksctl
- Create IAM role for cluster permissions and attach it to the management host.
- Use
eksctl create cluster ...to create the EKS cluster. - Verify readiness with
kubectl get nodes.
Deployment in EKS (using manifests)
- Check cluster status:
kubectl get podskubectl get servicekubectl get deployment
- Apply YAML:
kubectl apply -f <file>.yml
- Verify:
kubectl get podskubectl get service(a LoadBalancer endpoint appears)kubectl get deployment
- Access the app via LoadBalancer DNS and test REST endpoint behavior.
Operational visibility
kubectl get allto list all created resources.
Self-healing demonstration
- Delete a pod:
kubectl delete pod <pod-name>
- Re-check pods; Kubernetes recreates it to maintain replica count.
Cleanup
kubectl delete all --allto remove created deployment/service/pods.
CI/CD pipeline concept mention
- Speaker outlines a Jenkins-based flow:
- Jenkins pulls code from GitHub
- builds with Maven
- creates a Docker image
- deploys using Kubernetes manifests (Docker image referenced in YAML)
- Emphasizes DevOps responsibilities:
- Docker image building
- manifest creation
- automation of Kubernetes deployment
Key tutorial/guide takeaways (as presented)
-
Docker:
- Why containers solve environment setup and version conflict issues.
- How to build and use:
- Dockerfile → Image → Container
- Practical flow:
- setup → pull image → run → port map → detach/logs → cleanup
-
Kubernetes:
- Why orchestration is required for microservices scale and reliability.
- Core pieces:
- Control plane (API server/scheduler/controller/etcd)
- Worker nodes (kubelet/kube-proxy/pods)
- Pod as smallest unit; Service for external/internal access.
- Hands-on EKS workflow:
- create EKS cluster → apply deployment/service YAML → access via LoadBalancer → test self-healing → cleanup
- CI/CD integration (high level):
- Jenkins → Docker build → Kubernetes deploy
Main speaker/source
- Ashok IT (speaker: Ashok, hosting the course)