- The Kubernetes Workshop
- Zachary Arnold Sahil Dua Wei Huang Faisal Masood Melony Qin Mohammed Abu Taleb
- 401字
- 2021-06-11 18:18:02
Introduction
In the previous chapter, we learned how to use kubectl to interact with the Kubernetes API. In this chapter and the upcoming chapters, we will use that knowledge to interact with the API to create various types of Kubernetes objects.
In a Kubernetes system, many entities represent the state of the cluster and what the cluster's workload looks like. These entities are known as Kubernetes objects. Kubernetes objects describe various things, for example, what containers will be running in the cluster, what resources they will be using, how those containers will interact with each other, and how they will be exposed to the outer world.
A pod is the basic building block of Kubernetes, and it can be described as the basic unit of deployment. Just like we define a process as a program in execution, we can define a pod as a running process in the Kubernetes world. Pods are the smallest unit of replication in Kubernetes. A pod can have any number of containers running in it. A pod is basically a wrapper around containers running on a node. Using pods instead of inpidual containers has a few benefits. For example, containers in a pod have shared volumes, Linux namespaces, and cgroups. Each pod has a unique IP address and the port space is shared by all the containers in that pod. This means that different containers inside a pod can communicate with each other using their corresponding ports on localhost.
Ideally, we should use multiple containers in a pod only when we want them to be managed and located together in the Kubernetes cluster. For example, we may have a container running our application and another container that fetches logs from the application container and forwards them to some central storage. In this case, we would want both of our containers to stay together, to share the same IP so that they can communicate over localhost, and to share the same storage so that the second container can read the logs our application container is generating.
In this chapter, we will cover what a pod is, how it works, and how to define its pod spec, which describes the state of a pod. We will go through different phases of the life cycle of a pod and learn how to control the pods using health checks or probes. Let's begin by learning how a pod is configured.
- CorelDRAW X6 中文版圖形設(shè)計(jì)實(shí)戰(zhàn)從入門到精通
- EDA技術(shù)與VHDL編程
- 異構(gòu)基因共表達(dá)網(wǎng)絡(luò)的分析方法
- 智慧城市中的移動(dòng)互聯(lián)網(wǎng)技術(shù)
- 計(jì)算機(jī)網(wǎng)絡(luò)工程實(shí)用教程(第2版)
- 物聯(lián)網(wǎng)通信技術(shù)
- Windows Server 2012 Hyper-V虛擬化管理實(shí)踐
- TD-LTE無線網(wǎng)絡(luò)規(guī)劃與設(shè)計(jì)
- jQuery Mobile Web Development Essentials
- 網(wǎng)管工具使用與技巧大全
- 物聯(lián)網(wǎng)場景設(shè)計(jì)與開發(fā)(初級)
- 5G+區(qū)塊鏈
- 大型企業(yè)微服務(wù)架構(gòu)實(shí)踐與運(yùn)營
- 一本書讀懂TCP/IP
- 網(wǎng)絡(luò)信息安全工程技術(shù)與應(yīng)用分析