Coursera 笔记

Module 01 · Containers and Containerization

Course Overview课程概述

Coursera ↗

Hello, and welcome to this course!
你好,欢迎来到这门课程!

In this course, you will learn how to build cloud-native applications using current containerization tools and technologies such as Docker, container registries, Kubernetes, Red Hat, OpenShift, and Istio. You will also gain insights into how to deploy and scale your applications in any public, private, or hybrid cloud.
在这门课程中,你将学习如何使用当前的容器化工具和技术(如 Docker、容器注册中心、Kubernetes、Red Hat、OpenShift 和 Istio)来构建云原生应用程序。你还将深入了解如何在任何公共云、私有云或混合云中部署和扩展你的应用程序。

The skills taught in this course are essential to anyone in the fields of software development, back-end and full-stack development, cloud architects, cloud system engineers, DevOps practitioners, site reliability engineers (SRE), cloud networking specialists, and many other roles.
本课程所教授的技能对于软件开发、后端和全栈开发、云架构师、云系统工程师、DevOps 从业者、站点可靠性工程师(SRE)、云网络专家以及其他许多角色的人员来说都是必不可少的。

Prerequisites 前提条件

No prior knowledge of Containers is required. It is recommended to have a basic understanding of cloud and programming concepts. 
无需具备容器的先验知识。建议对云和编程概念有基本的了解。

Course objectives课程目标

After completing this course, you will be able to:
完成本课程后,您将能够:

  • Use containers, learn how to move applications quickly across any environment.
    使用容器,学习如何快速将应用程序迁移到任何环境中。
  • Build cloud-native applications using Docker, Kubernetes, OpenShift, and Istio.
    使用 Docker、Kubernetes、OpenShift 和 Istio 构建云原生应用程序。
  • Describe and leverage Kubernetes architecture to set up and use an entire lifecycle-based container management system.
    描述并利用 Kubernetes 架构来建立和使用基于整个生命周期的容器管理系统。
  • Create and leverage a YAML deployment file to configure and create resources such as pods, services, ReplicaSets, and others in a declarative way.
    创建并利用 YAML 部署文件以声明式方式配置和创建诸如 Pod、服务、ReplicaSets 等资源。

This course has five modules, which are listed below. We encourage you to set aside several hours each week to successfully complete all modules in five weeks. Consistency will best help you achieve your learning goals!
本课程共有五个模块,如下所示。我们鼓励您每周抽出数小时时间,在五周内成功完成所有模块。保持一致性将最有助于您实现学习目标!

You will derive the maximum benefit from viewing all videos and readings and solidifying that knowledge by completing all of the activities.
您将通过观看所有视频和阅读材料,并通过完成所有活动来巩固知识,从而获得最大收益。

Module 1: Containers and Containerization 模块 1:容器和容器化

Start your first week by learning about container concepts, features, use cases, and benefits. Building on your new knowledge of containers, you’ll learn what Docker does and discover why Docker is a winner with developers. You’ll learn what Docker is, become acquainted with Docker processes, and explore Docker’s underlying technology. Learn about how developers and organizations can benefit from using Docker and see which situations are challenging for using Docker. Next, learn how to build a container image using a Dockerfile, how to create a running container using that image, become familiar with the Docker command line interface (CLI), and explore frequently used Docker commands. You’ll become knowledgeable about Docker objects, Dockerfile commands, container image naming, and learn how Docker uses networks, storage, and plugins. Then, assimilate this knowledge when you see Docker architecture components in action and explore containerization using Docker. At the end of this first week, you’ll pull an image from a Docker Hub registry. You’ll run an image as a container using Docker, build and tag an image using a Dockerfile, and push that image to a registry. 
从第一周开始,您将学习容器概念、特性、应用场景和优势。在您掌握容器知识的基础上,您将了解 Docker 的功能,并发现为什么 Docker 在开发者中备受青睐。您将学习 Docker 是什么,熟悉 Docker 进程,并探索 Docker 的底层技术。了解开发者和组织如何从使用 Docker 中获益,以及使用 Docker 时哪些情况具有挑战性。接下来,您将学习如何使用 Dockerfile 构建容器镜像,如何使用该镜像创建运行中的容器,熟悉 Docker 命令行界面(CLI),并探索常用 Docker 命令。您将了解 Docker 对象、Dockerfile 命令、容器镜像命名,以及学习 Docker 如何使用网络、存储和插件。然后,在您看到 Docker 架构组件实际运行时,整合这些知识,并探索使用 Docker 的容器化技术。在本周结束时,您将从 Docker Hub 注册中心拉取一个镜像。您将使用 Docker 将镜像作为容器运行,使用 Dockerfile 构建和标记镜像,并将该镜像推送到注册中心。

Module 2: Kubernetes Basics 模块 2:Kubernetes 基础

In this module, you will learn what container orchestration is. Then, explore how developers can use container orchestration to create and manage complex container environment development lifecycles. Kubernetes is currently the most popular container orchestration platform. You’ll examine key Kubernetes architectural components, including control plane components and controllers. Explore Kubernetes objects, and learn how specific Kubernetes objects such as Pods, ReplicaSets, and Deployments work. Then, learn how developers use the Kubernetes command line interface (CLI), or “kubectl” to manipulate objects, manage workloads in a Kubernetes cluster, and apply basic kubectl commands. You’ll be able to differentiate the benefits and drawbacks of using imperative and declarative commands. At the end of this module, you will use the kubectl CLI commands to create resources on an actual Kubernetes cluster. You’ll use the Kubernetes CLI to create a Kubernetes pod, create a Kubernetes deployment, create a ReplicaSet, and see Kubernetes load balancing in action.
在本模块中,您将学习什么是容器编排。然后,探索开发人员如何使用容器编排来创建和管理复杂的容器环境开发生命周期。Kubernetes 目前是最流行的容器编排平台。您将考察 Kubernetes 的关键架构组件,包括控制平面组件和控制器。探索 Kubernetes 对象,并学习特定 Kubernetes 对象(如 Pods、ReplicaSets 和 Deployments)的工作原理。然后,学习开发人员如何使用 Kubernetes 命令行界面(CLI),即“kubectl”,来操作对象、管理 Kubernetes 集群中的工作负载,并应用基本的 kubectl 命令。您将能够区分使用命令式和声明式命令的优缺点。在本模块结束时,您将使用 kubectl CLI 命令在真实的 Kubernetes 集群上创建资源。您将使用 Kubernetes CLI 创建一个 Kubernetes Pod,创建一个 Kubernetes 部署,创建一个 ReplicaSet,并观察 Kubernetes 负载均衡的实际应用。

Module 3: Managing Applications with Kubernetes 模块 3:使用 Kubernetes 管理应用程序

In Module 3, you’ll explore ReplicaSets, autoscaling, rolling updates, ConfigMaps, Secrets, and service bindings, and learn how you can use these capabilities to manage Kubernetes applications. You’ll learn how ReplicaSets scale applications to meet increasing demand, and how autoscaling creates dynamic demand-based scaling. You’ll see how to use rolling updates to publish application updates and roll back changes without interrupting the user experience. You’ll also learn how to use ConfigMaps and Secrets to provide configuration variables and sensitive information to your deployments and to keep your code clean. At the end of this module, you’ll scale and update applications deployed in Kubernetes.
在模块 3 中,您将探索副本集、自动扩展、滚动更新、配置映射、机密和服务绑定,并学习如何使用这些功能来管理 Kubernetes 应用程序。您将学习副本集如何扩展应用程序以满足不断增长的需求,以及自动扩展如何创建基于需求的动态扩展。您将了解如何使用滚动更新来发布应用程序更新并在不影响用户体验的情况下回滚更改。您还将学习如何使用配置映射和机密为您的部署提供配置变量和敏感信息,以保持代码的清洁。在本模块结束时,您将扩展和更新部署在 Kubernetes 中的应用程序。

Module 4: The Kubernetes Ecosystem: OpenShift, Istio, etc. 模块 4:Kubernetes 生态系统:OpenShift、Istio 等。

In Module 4, you’ll learn more about the growing Kubernetes ecosystem and explore additional tools that work well with Kubernetes to support cloud-native development. You’ll gain an understanding of the similarities and differences between Red Hat ®OpenShift® and Kubernetes and see what OpenShift architecture looks like. You’ll learn about OpenShift builds and BuildConfigs, and OpenShift build strategies and triggers. You'll also discover how operators can deploy whole applications with ease. Finally, you’ll examine how the Istio service mesh manages and secures traffic and communication between an application’s services. At the end of this module, you’ll use the oc CLI to perform commands on an OpenShift cluster. You’ll also use the OpenShift build capabilities to deploy an application from source code stored in a Git repository.
在模块 4 中,您将深入了解不断发展的 Kubernetes 生态系统,并探索与 Kubernetes 协同工作以支持云原生开发的附加工具。您将理解 Red Hat ®OpenShift®与 Kubernetes 之间的异同,并了解 OpenShift 架构。您将学习 OpenShift 构建和 BuildConfigs,以及 OpenShift 构建策略和触发器。您还将发现如何通过操作员轻松部署整个应用程序。最后,您将考察 Istio 服务网格如何管理和保护应用程序服务之间的流量和通信。在本模块结束时,您将使用 oc CLI 对 OpenShift 集群执行命令。您还将使用 OpenShift 构建功能从存储在 Git 仓库中的源代码部署应用程序。

Module 5: Final Assignment 模块 5:最终作业

For the Final Project, you will put into practice the tools and concepts learned in this course, and deploy a simple guestbook application with Docker and Kubernetes. The entire application will be deployed and managed on OpenShift.
在最终项目中,您将实践在本课程中学到的工具和概念,并使用 Docker 和 Kubernetes 部署一个简单的留言簿应用程序。整个应用程序将在 OpenShift 上部署和管理。

Congratulations on taking these steps to further your knowledge and career! Enjoy your journey.
恭喜您迈出了这些步骤来进一步您的知识和职业生涯!享受您的旅程。