Docker, and Kubernetes (K8S)

 

1) 1) Youtube: Why people are using Docker? (Cantonese)



  • Docker is assigning difference resources (CPU, RAM, HDD, network IP address) to different containers so that they will not be crashed together.
  • Each container acts as an independent VM that will not affect other containers (e.g. even in the same PC), saving the resources.



2) 2) YouTube: Virtual Machines vs. Containers: What's the ACTUAL Difference? (by Coding Gopher)

  • Differences between VM and Docker:


3)3) YouTube: Docker 10分钟快速入门 (PuTongHua, by 奇乐编程学院)



  • Virtual Machine (VM) needs to virtualize hardwares, to pretend to run an entire OS environment, making the entire system to be large, with lower efficiency.


  • Docker does not virtualize the bottom hardware, but provides an isolated working environment for each container.


  • Three important concepts in Docker: Dockerfile, Image and Container.


  • Through the image, we can build different containers, which are like many VMs.
  • Docker Concepts Explained: Dockerfile, Image, and Container (vs. Virtual Machines)

    Docker is a platform for developing, shipping, and running applications in lightweight, isolated environments called containers. Unlike traditional Virtual Machines (VMs), Docker containers share the host OS kernel, making them faster and more resource-efficient.







  • Running Docker on VSCode





  • Docker can package both the working environment and the program to be a "Container".




  • Kubernetes(簡稱 K8S)是一個開源的容器管理系統,可幫助您簡化應用程式的部署、管理和扩展流程。K8S 可讓您輕鬆地在多個服務器上運行您的應用程式,並可提供高可用性和自動擴展功能。Kubernetes 是由 Google 開發的,並在全球擁有廣泛的使用者群體。如果您想要學習如何使用 K8S 管理您的應用程式,請觀看我們的教學影片「Kubernetes(K8S)是什麼」,我們將為您詳細講解 K8S 的功能和實用技巧。

  • By DeekSeek 2025-May:
  • Docker vs. Kubernetes: Key Differences Explained

    Both Docker and Kubernetes (K8s) are essential tools in modern cloud-native development, but they serve different purposes. Here’s a breakdown of their differences:


    1. Primary Function

    DockerKubernetes
    Containerization Platform – Packages applications into lightweight, portable containers.Container Orchestration – Manages clusters of containers across multiple machines.
    Runs a single container or a small group of containers (using Docker Compose).Manages hundreds or thousands of containers across a distributed system.

    Analogy

    • Docker = A shipping container (packages software for easy transport).

    • Kubernetes = A port management system (decides where containers go, scales them, and keeps them running).


    2. Scope & Complexity

    DockerKubernetes
    Works on a single machine (laptop, server).Works across multiple machines (nodes) in a cluster.
    Simpler to set up (good for local development).More complex (requires cluster setup, YAML configurations).
    Best for: Development, CI/CD, small-scale apps.Best for: Production, microservices, large-scale apps.

    3. Key Features Comparison

    FeatureDockerKubernetes
    ScalingManual (via docker-compose scale).Automatic (auto-scaling based on demand).
    Load BalancingBasic (Docker Swarm can do it).Built-in (distributes traffic across pods).
    Self-HealingNo (containers crash and stay dead).Yes (restarts failed containers).
    NetworkingBasic (bridge networks).Advanced (multi-node networking).
    StorageLocal volumes or bind mounts.Persistent volumes (cloud storage integration).

    4. When to Use Which?

    Use Docker When:

    ✅ Developing locally.
    ✅ Building and testing container images.
    ✅ Running small apps (single-server deployments).
    ✅ Using Docker Compose for simple multi-container apps.

    Use Kubernetes When:

    ✅ Running large-scale, distributed applications.
    ✅ Need auto-scaling, failover, and zero-downtime deployments.
    ✅ Managing microservices across multiple servers.
    ✅ Deploying in cloud environments (AWS EKS, GKE, AKS).


    5. Do They Work Together?

    Yes!

    • Docker creates containers.

    • Kubernetes manages those containers in production.

    Example Workflow:

    1. Develop → Build a Node.js app with Docker.

    2. Test → Run locally using docker-compose.

    3. Deploy → Push containers to Kubernetes in the cloud.


    6. Quick Comparison Table

    AspectDockerKubernetes
    PurposeContainer runtimeContainer orchestrator
    ScalingManualAutomatic
    NetworkingSingle-hostMulti-host
    Best ForLocal dev, small appsProduction, large-scale apps
    Learning CurveEasySteeper

    7. Which Should You Learn First?

    1. Start with Docker (understand containers).

    2. Then learn Kubernetes (for scaling in production).

    Pro Tip:

    • Use Minikube or Kind to practice Kubernetes locally.

    • For simple apps, Docker Compose may be enough.


    Final Verdict

    • Docker = Your tool for building and running containers.

    • Kubernetes = Your tool for managing containers at scale.

    They’re not competitors—they’re teammates! 🚀


    Need a hands-on example? Try:

    Would you like a deeper dive into Kubernetes next? 😊









留言

這個網誌中的熱門文章

Intro to Data Science in Python

Get started with Python - Google

AI Learning Roadmap from Beginners to Experts - Getting Started from 2025 - Phase 2: Programming Fundamentals - 01a: Linux Training Academy