问HN:如何清晰地学习微服务和DevOps?

1作者: shivajikobardan3 天前原帖
嗨,HN, 我已经使用 Docker、k3s(命令行)和 Rancher(图形界面)一段时间了,但有一件事一直困扰着我:我从未真正理解过我在做什么或为什么这样做是有意义的。 对我来说,虚拟化和容器化一直感觉是一样的。例如: - 在虚拟化中,我可以克隆一个虚拟机来构建一个新的虚拟机(例如在 VirtualBox 或 Hyper-V 中。我还没有使用过像 VMware 这样的“大型产品”)。 - 在 Kubernetes 中,我可以创建 Pod 或部署的副本。 但当人们说“虚拟机中有操作系统,但 Kubernetes 中没有主机操作系统”时,我就无法理解。Kubernetes 怎么能在没有操作系统的情况下运行呢?每个 Pod 或部署下面都需要一个操作系统,对吧?事实上,我看到 Kubernetes 存在一个更大的问题:与虚拟机中的单一操作系统不同,现在我们有许多操作系统实例(每个容器或 Pod 一个)。 我最近面试了一个 DevOps 团队(我有两年作为 Linux IT 支持工程师的经验),面试中出现了“虚拟化和容器化有什么区别?”或“一个 k3s 集群可以支持多少个可能的部署/Pods,为什么?”这样的问题。我对后者完全没有头绪。我想这可能与 k3s 的子网掩码有关(例如,10.42.0.x 或 /8),而主机的数量可能是 2^24 之类的,但我并不自信。 他们问我,什么是 Traefik?我说是 API 网关,因为我在 Apress 的书的介绍页面上读到过。我模糊地说它是用于 SSL 终止、反向代理、API 网关等的东西。 我对自己正在做的事情没有清晰的认识。 我想提高自己,深入理解这些概念。我已经开始全职投入学习计算机科学基础知识,如网络和操作系统(我辞去了工作),但我不确定我是否在学习“正确”的材料,以最终掌握 DevOps 概念,还是只是在阅读无关的内容。 *所以我想问 HN 社区的是:* - 微服务和容器化的基本原则是什么,特别是在容器化与虚拟化之间? - 我应该如何看待容器和虚拟机中的操作系统? - 我该如何推理 Kubernetes 或 k3s 中的集群容量(例如,Pods/部署的数量)? - 我应该专注于哪些基础知识,以真正理解 DevOps 和容器编排? 我非常感谢任何可以帮助我从困惑走向清晰的指导、资源或解释。提前谢谢大家!
查看原文
Hi HN,<p>I’ve been working with Docker, k3s (command line), and Rancher (GUI) for a while now, but there’s one thing that’s haunted me forever: I never really understood <i>what I was doing</i> or <i>why it made sense</i>.<p>To me, virtualization and containerization have always felt the same. For example: - With virtualization, I can clone a VM to build a new VM(in virtualbox or hyper-v for example. I have not yet used big daddies like vmware).<p>- With Kubernetes, I can create replicas of pods or deployments.<p>But when people say things like “there’s an OS in a virtual machine but no host OS in Kubernetes,” it just doesn’t click. How can Kubernetes run without an OS? Every pod or deployment needs an OS underneath, right? In fact, I see a bigger problem with Kubernetes: instead of having a single OS like in a VM, now we have many OS instances (one per container or pod).<p>I recently interviewed with a DevOps team (I have 2 years of experience as a Linux IT support engineer), and questions like “What’s the difference between virtualization and containerization?” or “How many possible deployments&#x2F;pods can a k3s cluster support, and why?” came up. I had no idea how to answer the latter. I thought maybe it’s related to the subnet mask of k3s (e.g., 10.42.0.x or &#x2F;8), and that the number of hosts might be 2^24 or something, but I’m not confident.<p>What is traefik? They asked me. I said api gateway as I had read that in Apress book intro page. I blabbered it was something for SSL termination, reverse proxy, api gateway etc.<p>I am unable to have clarity on things I am working.<p>I want to improve and understand these concepts deeply. I’ve started investing entire time(I quitted my job) in learning computer science foundations like networking and operating systems, but I’m unsure if I’m studying the <i>right</i> materials to finally grasp DevOps concepts or if I’m just reading irrelevant stuff.<p>*So my questions to the HN community are:* - What are the founding principles of microservices and containerization, especially regarding containerization vs virtualization?<p>- How should I think about the OS in containers vs VMs?<p>- How do I reason about cluster capacity (e.g., number of pods&#x2F;deployments) in Kubernetes or k3s?<p>- What foundational knowledge should I focus on to truly understand DevOps and container orchestration?<p>I’d appreciate any guidance, resources, or explanations that can help me move from confusion to clarity. Thanks in advance!