Skip to Content
Kubernetes即学即用(第二版)
book

Kubernetes即学即用(第二版)

by Brendan Burns, Joe Beda, Kelsey Hightower
June 2021
Intermediate to advanced
300 pages
5h 4m
Chinese
China Electric Power Press Ltd.
Content preview from Kubernetes即学即用(第二版)
78
5
持久卷是一个深层主题,有很多不同的细节,特别是持久卷、持久卷声明以
及动态提供卷的工作方式。我们将在第
15
章中深入探讨这个主题。
5.9
综合讨论
许多应用程序都是有状态的,因此无论应用程序在何种计算机上运行,我们
都必须保存好数据,并确保对基础存储卷的访问。我们看到,通过网络存储
支持的持久卷可以实现这一点。此外,我们也想确保应用程序的正常实例长
期运行,这意味着我们要确保在公开到客户端之前,运行
kuard
的容器已经
准备就绪。
Kubernetes
通过持久卷、就绪探针和存活探针以及资源约束的结合,提供了
可靠运行有状态应用程序所需的一切。示例
5-6
的清单文件中汇总了所有的
信息。
示例
5-6
kuard-pod-full.yaml
apiVersion: v1
kind: Pod
metadata:
name: kuard
spec:
volumes:
- name: "kuard-data"
nfs:
server: my.nfs.server.local
path: "/exports"
containers:
- image: gcr.io/kuar-demo/kuard-amd64:blue
name: kuard
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
cpu: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
Python数据分析

Python数据分析

Posts & Telecom Press, Ivan Idris
Python贝叶斯分析(第2版)

Python贝叶斯分析(第2版)

Posts & Telecom Press, Osvaldo Martin
Python高级编程(第2版)

Python高级编程(第2版)

Posts & Telecom Press, Michał Jaworski, Tarek Ziadé

Publisher Resources

ISBN: 9787519856762