Bird
Raised Fist0
Kubernetesdevops~10 mins

What is Kubernetes - Visual Explanation

Choose your learning style10 modes available
Process Flow - What is Kubernetes
User wants to run apps
↓
Kubernetes receives request
↓
Kubernetes schedules app containers
↓
Containers run on cluster nodes
↓
Kubernetes monitors and manages containers
↓
Apps stay running, scale, and recover
Kubernetes takes your app requests, runs them as containers on many computers, and keeps them healthy and running.
Execution Sample
Kubernetes
kubectl apply -f app.yaml
kubectl get pods
kubectl describe pod app-pod
kubectl delete pod app-pod
These commands create an app container, check its status, see details, and then remove it.
Process Table
StepCommandActionResult
1kubectl apply -f app.yamlSend app config to KubernetesKubernetes schedules and starts app container
2kubectl get podsRequest list of running containersShows app container running with status 'Running'
3kubectl describe pod app-podRequest detailed info about app containerShows container details like IP, status, events
4kubectl delete pod app-podRequest to stop and remove app containerContainer is stopped and removed from cluster
💡 All commands complete successfully, app container lifecycle demonstrated
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4
App Container StateNot runningScheduled and StartingRunningRunning with detailsDeleted
Key Moments - 3 Insights
Why does Kubernetes need to schedule containers?
Kubernetes decides which computer (node) runs your app container to balance load and resources, as shown in step 1 of the execution_table.
What does 'kubectl get pods' show?
'kubectl get pods' lists all running containers (pods) and their status, helping you see if your app is running, as in step 2.
Why delete a pod after creating it?
Deleting a pod stops the app container and frees resources, demonstrating the full lifecycle, as in step 4.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the app container state after step 2?
AScheduled and Starting
BDeleted
CRunning
DNot running
💡 Hint
Check the 'Result' column in row for step 2 and the variable_tracker after step 2
At which step does Kubernetes schedule the app container?
AStep 2
BStep 1
CStep 3
DStep 4
💡 Hint
Look at the 'Action' and 'Result' columns in the execution_table for step 1
If you skip 'kubectl delete pod app-pod', what happens to the app container state?
AIt stays Running
BIt becomes Deleted automatically
CIt never starts
DIt crashes
💡 Hint
Refer to variable_tracker after step 4 and understand the delete command effect
Concept Snapshot
Kubernetes manages app containers across many computers.
Use 'kubectl apply' to start apps.
Use 'kubectl get pods' to check running apps.
Use 'kubectl describe pod' for details.
Use 'kubectl delete pod' to stop apps.
It keeps apps running, scaling, and recovering automatically.
Full Transcript
Kubernetes is a tool that helps you run your apps inside containers on many computers called a cluster. When you want to run an app, you give Kubernetes a description file (like app.yaml). Kubernetes then decides where to run your app container and starts it. You can check which apps are running with 'kubectl get pods'. To see more details about a running app, use 'kubectl describe pod'. When you want to stop the app, use 'kubectl delete pod'. Kubernetes manages the whole process to keep your apps running smoothly.

Practice

(1/5)
1. What is the main purpose of Kubernetes?
easy
A. To design websites with HTML and CSS
B. To manage and run many copies of programs across multiple computers
C. To write code for mobile applications
D. To create databases for storing data

Solution

  1. Step 1: Understand Kubernetes role

    Kubernetes is a tool that helps run many copies of programs on many computers.
  2. Step 2: Compare options

    Only To manage and run many copies of programs across multiple computers describes managing programs across computers, which matches Kubernetes' purpose.
  3. Final Answer:

    To manage and run many copies of programs across multiple computers -> Option B
  4. Quick Check:

    Kubernetes = Manage many program copies [OK]
Hint: Kubernetes manages many program copies on many computers [OK]
Common Mistakes:
  • Confusing Kubernetes with programming languages
  • Thinking Kubernetes is for website design
  • Mixing Kubernetes with database creation
2. Which command is used to interact with Kubernetes from the command line?
easy
A. kubectl
B. docker
C. git
D. npm

Solution

  1. Step 1: Identify Kubernetes command-line tool

    The tool to control Kubernetes is called kubectl.
  2. Step 2: Check other options

    Docker manages containers, git manages code versions, npm manages JavaScript packages, so they are not correct.
  3. Final Answer:

    kubectl -> Option A
  4. Quick Check:

    Kubernetes CLI = kubectl [OK]
Hint: Use kubectl to control Kubernetes from terminal [OK]
Common Mistakes:
  • Using docker instead of kubectl for Kubernetes
  • Confusing git with Kubernetes commands
  • Thinking npm controls Kubernetes
3. What happens if a program managed by Kubernetes crashes on one computer?
medium
A. Kubernetes deletes all copies of the program
B. The program stays crashed and Kubernetes does nothing
C. Kubernetes automatically restarts the program on the same or another computer
D. You must manually restart the program yourself

Solution

  1. Step 1: Understand Kubernetes fault handling

    Kubernetes watches programs and restarts them automatically if they crash.
  2. Step 2: Evaluate options

    Only Kubernetes automatically restarts the program on the same or another computer describes automatic restart, which matches Kubernetes behavior.
  3. Final Answer:

    Kubernetes automatically restarts the program on the same or another computer -> Option C
  4. Quick Check:

    Kubernetes auto-restarts crashed programs [OK]
Hint: Kubernetes auto-restarts crashed programs [OK]
Common Mistakes:
  • Thinking Kubernetes ignores crashed programs
  • Believing Kubernetes deletes programs on crash
  • Assuming manual restart is always needed
4. You run kubectl get pods but get an error saying "connection refused". What is the likely problem?
medium
A. Kubernetes cluster is not running or unreachable
B. The kubectl command is misspelled
C. Your computer has no internet connection
D. You typed the wrong pod name

Solution

  1. Step 1: Analyze error message

    "Connection refused" means kubectl cannot reach the Kubernetes cluster.
  2. Step 2: Check options

    Misspelling would cause command not found, no internet is unrelated if cluster is local, wrong pod name gives different error.
  3. Final Answer:

    Kubernetes cluster is not running or unreachable -> Option A
  4. Quick Check:

    Connection refused = cluster unreachable [OK]
Hint: Connection refused means cluster is down or unreachable [OK]
Common Mistakes:
  • Assuming internet is required for local cluster
  • Thinking typo causes connection refused
  • Confusing pod name errors with connection errors
5. You want to keep a program running with 3 copies at all times using Kubernetes. Which Kubernetes object should you create?
hard
A. Namespace
B. Service
C. ConfigMap
D. Deployment

Solution

  1. Step 1: Identify object for managing program copies

    A Deployment manages multiple copies (replicas) of a program and keeps them running.
  2. Step 2: Review other objects

    Service exposes programs to network, ConfigMap stores config data, Namespace groups resources, none manage replicas.
  3. Final Answer:

    Deployment -> Option D
  4. Quick Check:

    Multiple copies managed by Deployment [OK]
Hint: Use Deployment to keep multiple program copies running [OK]
Common Mistakes:
  • Confusing Service with Deployment
  • Using ConfigMap to manage replicas
  • Thinking Namespace controls program copies
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard