2020-06-19 14:52:56 +08:00
<!DOCTYPE HTML>
< html lang = "zh-hans" >
< head >
< meta charset = "UTF-8" >
< meta content = "text/html; charset=utf-8" http-equiv = "Content-Type" >
< title > Secret 配置 · Kubernetes Handbook - Kubernetes中文指南/云原生应用架构实践手册 by Jimmy Song(宋净超)< / title >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" / >
< meta name = "description" content = "" >
< meta name = "generator" content = "GitBook 3.2.3" >
< meta name = "author" content = "Jimmy Song( 宋净超) " >
< link rel = "stylesheet" href = "../gitbook/style.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-splitter/splitter.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-page-toc-button/plugin.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-image-captions/image-captions.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-back-to-top-button/plugin.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-search-plus/search.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-prism/prism-ghcolors.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-alerts/style.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-fontsettings/website.css" >
< meta name = "HandheldFriendly" content = "true" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1, user-scalable=no" >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "black" >
< link rel = "apple-touch-icon-precomposed" sizes = "152x152" href = "../gitbook/images/apple-touch-icon-precomposed-152.png" >
< link rel = "shortcut icon" href = "../gitbook/images/favicon.ico" type = "image/x-icon" >
< link rel = "next" href = "resource-quota-management.html" / >
< link rel = "prev" href = "configure-pod-service-account.html" / >
< link rel = "shortcut icon" href = '../favicon.ico' type = "image/x-icon" >
< link rel = "bookmark" href = '../favicon.ico' type = "image/x-icon" >
< style >
@media only screen and (max-width: 640px) {
.book-header .hidden-mobile {
display: none;
}
}
< / style >
< script >
window["gitbook-plugin-github-buttons"] = {"repo":"rootsongjc/kubernetes-handbook","types":["star"],"size":"small"};
< / script >
< / head >
< body >
< div class = "book" >
< div class = "book-summary" >
< div id = "book-search-input" role = "search" >
< input type = "text" placeholder = "输入并搜索" / >
< / div >
< nav role = "navigation" >
< ul class = "summary" >
< li >
< a href = "https://jimmysong.io" target = "_blank" class = "custom-link" > 回到主页< / a >
< / li >
< li >
2020-10-10 20:02:03 +08:00
< a href = "https://jimmysong.io/awesome-cloud-native" target = "_blank" class = "custom-link" > 云原生开源项目大全< / a >
2020-06-19 14:52:56 +08:00
< / li >
< li >
< a href = "https://cloudnative.to" target = "_blank" class = "custom-link" > 云原生社区< / a >
< / li >
< li class = "divider" > < / li >
< li class = "header" > 前言< / li >
< li class = "chapter " data-level = "1.1" data-path = "../" >
< a href = "../" >
< b > 1.1.< / b >
序言
< / a >
< / li >
< li class = "header" > 云原生< / li >
< li class = "chapter " data-level = "2.1" data-path = "../cloud-native/cloud-native-definition.html" >
< a href = "../cloud-native/cloud-native-definition.html" >
< b > 2.1.< / b >
云原生( Cloud Native) 的定义
< / a >
< / li >
< li class = "chapter " data-level = "2.2" data-path = "../cloud-native/cloud-native-philosophy.html" >
< a href = "../cloud-native/cloud-native-philosophy.html" >
< b > 2.2.< / b >
云原生的设计哲学
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.3" data-path = "../cloud-native/quick-start.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< a href = "../cloud-native/quick-start.html" >
2020-06-19 14:52:56 +08:00
< b > 2.3.< / b >
2020-11-18 19:26:50 +08:00
云原生新手入门指南
< / a >
< / li >
< li class = "chapter " data-level = "2.4" data-path = "../cloud-native/play-with-kubernetes.html" >
< a href = "../cloud-native/play-with-kubernetes.html" >
< b > 2.4.< / b >
2020-06-19 14:52:56 +08:00
Play with Kubernetes
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.5" data-path = "../cloud-native/cloud-native-local-quick-start.html" >
2020-06-19 14:52:56 +08:00
< a href = "../cloud-native/cloud-native-local-quick-start.html" >
2020-11-18 19:26:50 +08:00
< b > 2.5.< / b >
2020-06-19 14:52:56 +08:00
快速部署一个云原生本地实验环境
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.6" data-path = "../cloud-native/setup-kubernetes-with-rancher-and-aliyun.html" >
2020-06-19 14:52:56 +08:00
< a href = "../cloud-native/setup-kubernetes-with-rancher-and-aliyun.html" >
2020-11-18 19:26:50 +08:00
< b > 2.6.< / b >
2020-06-19 14:52:56 +08:00
使用 Rancher 在阿里云上部署 Kubenretes 集群
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.7" data-path = "../cloud-native/kubernetes-and-cloud-native-app-overview.html" >
2020-06-19 14:52:56 +08:00
< a href = "../cloud-native/kubernetes-and-cloud-native-app-overview.html" >
2020-11-18 19:26:50 +08:00
< b > 2.7.< / b >
2020-06-19 14:52:56 +08:00
Kubernetes 与云原生应用概览
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.8" data-path = "../cloud-native/from-kubernetes-to-cloud-native.html" >
2020-06-19 14:52:56 +08:00
< a href = "../cloud-native/from-kubernetes-to-cloud-native.html" >
2020-11-18 19:26:50 +08:00
< b > 2.8.< / b >
2020-06-19 14:52:56 +08:00
云原生应用之路 —— 从 Kubernetes 到 Cloud Native
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9" data-path = "../cloud-native/define-cloud-native-app.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/define-cloud-native-app.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
定义云原生应用
2020-06-19 14:52:56 +08:00
< / a >
< ul class = "articles" >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1" data-path = "../cloud-native/oam.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/oam.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.1.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
OAM
2020-06-19 14:52:56 +08:00
< / a >
2020-06-24 16:47:22 +08:00
< ul class = "articles" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1.1" data-path = "../cloud-native/workload.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/workload.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.1.1.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
Workload
2020-06-19 14:52:56 +08:00
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1.2" data-path = "../cloud-native/component.html" >
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/component.html" >
2020-11-18 19:26:50 +08:00
< b > 2.9.1.2.< / b >
2020-06-24 16:47:22 +08:00
Component
< / a >
2020-06-19 14:52:56 +08:00
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1.3" data-path = "../cloud-native/trait.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/trait.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.1.3.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
Trait
2020-06-19 14:52:56 +08:00
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1.4" data-path = "../cloud-native/application-scope.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/application-scope.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.1.4.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
Application Scope
2020-06-19 14:52:56 +08:00
< / a >
2020-06-24 16:47:22 +08:00
< / li >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.1.5" data-path = "../cloud-native/application-configuration.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/application-configuration.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.1.5.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
Application Configuration
2020-06-19 14:52:56 +08:00
< / a >
< / li >
2020-06-24 16:47:22 +08:00
< / ul >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.9.2" data-path = "../cloud-native/crossplane.html" >
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/crossplane.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.9.2.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
Crossplane
2020-06-19 14:52:56 +08:00
< / a >
< / li >
2020-06-24 16:47:22 +08:00
< / ul >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.10" data-path = "../cloud-native/cloud-native-programming-languages.html" >
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/cloud-native-programming-languages.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.10.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
云原生编程语言
2020-06-19 14:52:56 +08:00
< / a >
2020-06-24 16:47:22 +08:00
< ul class = "articles" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.10.1" data-path = "../cloud-native/cloud-native-programming-language-ballerina.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/cloud-native-programming-language-ballerina.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.10.1.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
云原生编程语言 Ballerina
2020-06-19 14:52:56 +08:00
< / a >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.10.2" data-path = "../cloud-native/cloud-native-programming-language-pulumi.html" >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/cloud-native-programming-language-pulumi.html" >
2020-06-19 14:52:56 +08:00
2020-11-18 19:26:50 +08:00
< b > 2.10.2.< / b >
2020-06-19 14:52:56 +08:00
2020-06-24 16:47:22 +08:00
云原生编程语言 Pulumi
2020-06-19 14:52:56 +08:00
< / a >
< / li >
< / ul >
< / li >
2020-11-18 19:26:50 +08:00
< li class = "chapter " data-level = "2.11" data-path = "../cloud-native/the-future-of-cloud-native.html" >
2020-06-24 16:47:22 +08:00
< a href = "../cloud-native/the-future-of-cloud-native.html" >
2020-11-18 19:26:50 +08:00
< b > 2.11.< / b >
2020-06-24 16:47:22 +08:00
云原生的未来
< / a >
< / li >
2020-06-19 14:52:56 +08:00
< li class = "header" > 概念与原理< / li >
< li class = "chapter " data-level = "3.1" data-path = "../concepts/" >
< a href = "../concepts/" >
< b > 3.1.< / b >
Kubernetes 架构
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.1.1" data-path = "../concepts/concepts.html" >
< a href = "../concepts/concepts.html" >
< b > 3.1.1.< / b >
设计理念
< / a >
< / li >
< li class = "chapter " data-level = "3.1.2" data-path = "../concepts/etcd.html" >
< a href = "../concepts/etcd.html" >
< b > 3.1.2.< / b >
Etcd 解析
< / a >
< / li >
< li class = "chapter " data-level = "3.1.3" data-path = "../concepts/open-interfaces.html" >
< a href = "../concepts/open-interfaces.html" >
< b > 3.1.3.< / b >
开放接口
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.1.3.1" data-path = "../concepts/cri.html" >
< a href = "../concepts/cri.html" >
< b > 3.1.3.1.< / b >
CRI - Container Runtime Interface( 容器运行时接口)
< / a >
< / li >
< li class = "chapter " data-level = "3.1.3.2" data-path = "../concepts/cni.html" >
< a href = "../concepts/cni.html" >
< b > 3.1.3.2.< / b >
CNI - Container Network Interface( 容器网络接口)
< / a >
< / li >
< li class = "chapter " data-level = "3.1.3.3" data-path = "../concepts/csi.html" >
< a href = "../concepts/csi.html" >
< b > 3.1.3.3.< / b >
CSI - Container Storage Interface( 容器存储接口)
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.2" data-path = "../concepts/networking.html" >
< a href = "../concepts/networking.html" >
< b > 3.2.< / b >
Kubernetes 中的网络
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.2.1" data-path = "../concepts/flannel.html" >
< a href = "../concepts/flannel.html" >
< b > 3.2.1.< / b >
Kubernetes 中的网络解析 —— 以 flannel 为例
< / a >
< / li >
< li class = "chapter " data-level = "3.2.2" data-path = "../concepts/calico.html" >
< a href = "../concepts/calico.html" >
< b > 3.2.2.< / b >
Kubernetes 中的网络解析 —— 以 calico 为例
< / a >
< / li >
< li class = "chapter " data-level = "3.2.3" data-path = "../concepts/cilium.html" >
< a href = "../concepts/cilium.html" >
< b > 3.2.3.< / b >
具备 API 感知的网络和安全性管理开源软件 Cilium
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.2.3.1" data-path = "../concepts/cilium-concepts.html" >
< a href = "../concepts/cilium-concepts.html" >
< b > 3.2.3.1.< / b >
Cilium 架构设计与概念解析
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.3" data-path = "../concepts/objects.html" >
< a href = "../concepts/objects.html" >
< b > 3.3.< / b >
资源对象与基本概念解析
< / a >
< / li >
< li class = "chapter " data-level = "3.4" data-path = "../concepts/pod-state-and-lifecycle.html" >
< a href = "../concepts/pod-state-and-lifecycle.html" >
< b > 3.4.< / b >
Pod 状态与生命周期管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.4.1" data-path = "../concepts/pod-overview.html" >
< a href = "../concepts/pod-overview.html" >
< b > 3.4.1.< / b >
Pod 概览
< / a >
< / li >
< li class = "chapter " data-level = "3.4.2" data-path = "../concepts/pod.html" >
< a href = "../concepts/pod.html" >
< b > 3.4.2.< / b >
Pod 解析
< / a >
< / li >
< li class = "chapter " data-level = "3.4.3" data-path = "../concepts/init-containers.html" >
< a href = "../concepts/init-containers.html" >
< b > 3.4.3.< / b >
Init 容器
< / a >
< / li >
< li class = "chapter " data-level = "3.4.4" data-path = "../concepts/pause-container.html" >
< a href = "../concepts/pause-container.html" >
< b > 3.4.4.< / b >
Pause 容器
< / a >
< / li >
< li class = "chapter " data-level = "3.4.5" data-path = "../concepts/pod-security-policy.html" >
< a href = "../concepts/pod-security-policy.html" >
< b > 3.4.5.< / b >
Pod 安全策略
< / a >
< / li >
< li class = "chapter " data-level = "3.4.6" data-path = "../concepts/pod-lifecycle.html" >
< a href = "../concepts/pod-lifecycle.html" >
< b > 3.4.6.< / b >
Pod 的生命周期
< / a >
< / li >
< li class = "chapter " data-level = "3.4.7" data-path = "../concepts/pod-hook.html" >
< a href = "../concepts/pod-hook.html" >
< b > 3.4.7.< / b >
Pod Hook
< / a >
< / li >
< li class = "chapter " data-level = "3.4.8" data-path = "../concepts/pod-preset.html" >
< a href = "../concepts/pod-preset.html" >
< b > 3.4.8.< / b >
Pod Preset
< / a >
< / li >
< li class = "chapter " data-level = "3.4.9" data-path = "../concepts/pod-disruption-budget.html" >
< a href = "../concepts/pod-disruption-budget.html" >
< b > 3.4.9.< / b >
Pod 中断与 PDB( Pod 中断预算)
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.5" data-path = "../concepts/cluster.html" >
< a href = "../concepts/cluster.html" >
< b > 3.5.< / b >
集群资源管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.5.1" data-path = "../concepts/node.html" >
< a href = "../concepts/node.html" >
< b > 3.5.1.< / b >
Node
< / a >
< / li >
< li class = "chapter " data-level = "3.5.2" data-path = "../concepts/namespace.html" >
< a href = "../concepts/namespace.html" >
< b > 3.5.2.< / b >
Namespace
< / a >
< / li >
< li class = "chapter " data-level = "3.5.3" data-path = "../concepts/label.html" >
< a href = "../concepts/label.html" >
< b > 3.5.3.< / b >
Label
< / a >
< / li >
< li class = "chapter " data-level = "3.5.4" data-path = "../concepts/annotation.html" >
< a href = "../concepts/annotation.html" >
< b > 3.5.4.< / b >
Annotation
< / a >
< / li >
< li class = "chapter " data-level = "3.5.5" data-path = "../concepts/taint-and-toleration.html" >
< a href = "../concepts/taint-and-toleration.html" >
< b > 3.5.5.< / b >
Taint 和 Toleration( 污点和容忍)
< / a >
< / li >
< li class = "chapter " data-level = "3.5.6" data-path = "../concepts/garbage-collection.html" >
< a href = "../concepts/garbage-collection.html" >
< b > 3.5.6.< / b >
垃圾收集
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.6" data-path = "../concepts/controllers.html" >
< a href = "../concepts/controllers.html" >
< b > 3.6.< / b >
控制器
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.6.1" data-path = "../concepts/deployment.html" >
< a href = "../concepts/deployment.html" >
< b > 3.6.1.< / b >
Deployment
< / a >
< / li >
< li class = "chapter " data-level = "3.6.2" data-path = "../concepts/statefulset.html" >
< a href = "../concepts/statefulset.html" >
< b > 3.6.2.< / b >
StatefulSet
< / a >
< / li >
< li class = "chapter " data-level = "3.6.3" data-path = "../concepts/daemonset.html" >
< a href = "../concepts/daemonset.html" >
< b > 3.6.3.< / b >
DaemonSet
< / a >
< / li >
< li class = "chapter " data-level = "3.6.4" data-path = "../concepts/replicaset.html" >
< a href = "../concepts/replicaset.html" >
< b > 3.6.4.< / b >
ReplicationController 和 ReplicaSet
< / a >
< / li >
< li class = "chapter " data-level = "3.6.5" data-path = "../concepts/job.html" >
< a href = "../concepts/job.html" >
< b > 3.6.5.< / b >
Job
< / a >
< / li >
< li class = "chapter " data-level = "3.6.6" data-path = "../concepts/cronjob.html" >
< a href = "../concepts/cronjob.html" >
< b > 3.6.6.< / b >
CronJob
< / a >
< / li >
< li class = "chapter " data-level = "3.6.7" data-path = "../concepts/horizontal-pod-autoscaling.html" >
< a href = "../concepts/horizontal-pod-autoscaling.html" >
< b > 3.6.7.< / b >
Horizontal Pod Autoscaling
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.6.7.1" data-path = "../concepts/custom-metrics-hpa.html" >
< a href = "../concepts/custom-metrics-hpa.html" >
< b > 3.6.7.1.< / b >
自定义指标 HPA
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.6.8" data-path = "../concepts/admission-controller.html" >
< a href = "../concepts/admission-controller.html" >
< b > 3.6.8.< / b >
准入控制器( Admission Controller)
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.7" data-path = "../concepts/service-discovery.html" >
< a href = "../concepts/service-discovery.html" >
< b > 3.7.< / b >
服务发现
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.7.1" data-path = "../concepts/service.html" >
< a href = "../concepts/service.html" >
< b > 3.7.1.< / b >
Service
< / a >
< / li >
< li class = "chapter " data-level = "3.7.2" data-path = "../concepts/ingress.html" >
< a href = "../concepts/ingress.html" >
< b > 3.7.2.< / b >
Ingress
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.7.2.1" data-path = "../concepts/traefik-ingress-controller.html" >
< a href = "../concepts/traefik-ingress-controller.html" >
< b > 3.7.2.1.< / b >
Traefik Ingress Controller
< / a >
< / li >
< / ul >
2021-02-09 20:56:37 +08:00
< / li >
< li class = "chapter " data-level = "3.7.3" data-path = "../concepts/kubernetes-service-api.html" >
< a href = "../concepts/kubernetes-service-api.html" >
< b > 3.7.3.< / b >
Kubernetes Service API
< / a >
2021-02-10 18:38:59 +08:00
< ul class = "articles" >
< li class = "chapter " data-level = "3.7.3.1" data-path = "../concepts/service-api-overview.html" >
< a href = "../concepts/service-api-overview.html" >
< b > 3.7.3.1.< / b >
Service API 简介
< / a >
< / li >
< / ul >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.8" data-path = "../concepts/authentication-and-permission.html" >
< a href = "../concepts/authentication-and-permission.html" >
< b > 3.8.< / b >
身份与权限控制
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.8.1" data-path = "../concepts/serviceaccount.html" >
< a href = "../concepts/serviceaccount.html" >
< b > 3.8.1.< / b >
ServiceAccount
< / a >
< / li >
< li class = "chapter " data-level = "3.8.2" data-path = "../concepts/rbac.html" >
< a href = "../concepts/rbac.html" >
< b > 3.8.2.< / b >
RBAC—— 基于角色的访问控制
< / a >
< / li >
< li class = "chapter " data-level = "3.8.3" data-path = "../concepts/network-policy.html" >
< a href = "../concepts/network-policy.html" >
< b > 3.8.3.< / b >
NetworkPolicy
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.9" data-path = "../concepts/storage.html" >
< a href = "../concepts/storage.html" >
< b > 3.9.< / b >
存储
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.9.1" data-path = "../concepts/secret.html" >
< a href = "../concepts/secret.html" >
< b > 3.9.1.< / b >
Secret
< / a >
< / li >
< li class = "chapter " data-level = "3.9.2" data-path = "../concepts/configmap.html" >
< a href = "../concepts/configmap.html" >
< b > 3.9.2.< / b >
ConfigMap
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.9.2.1" data-path = "../concepts/configmap-hot-update.html" >
< a href = "../concepts/configmap-hot-update.html" >
< b > 3.9.2.1.< / b >
ConfigMap 的热更新
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.9.3" data-path = "../concepts/volume.html" >
< a href = "../concepts/volume.html" >
< b > 3.9.3.< / b >
Volume
< / a >
< / li >
< li class = "chapter " data-level = "3.9.4" data-path = "../concepts/persistent-volume.html" >
< a href = "../concepts/persistent-volume.html" >
< b > 3.9.4.< / b >
Persistent Volume( 持久化卷)
< / a >
< / li >
< li class = "chapter " data-level = "3.9.5" data-path = "../concepts/storageclass.html" >
< a href = "../concepts/storageclass.html" >
< b > 3.9.5.< / b >
Storage Class
< / a >
< / li >
< li class = "chapter " data-level = "3.9.6" data-path = "../concepts/local-persistent-storage.html" >
< a href = "../concepts/local-persistent-storage.html" >
< b > 3.9.6.< / b >
本地持久化存储
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.10" data-path = "../concepts/extension.html" >
< a href = "../concepts/extension.html" >
< b > 3.10.< / b >
集群扩展
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.10.1" data-path = "../concepts/custom-resource.html" >
< a href = "../concepts/custom-resource.html" >
< b > 3.10.1.< / b >
使用自定义资源扩展 API
< / a >
< / li >
< li class = "chapter " data-level = "3.10.2" data-path = "../concepts/crd.html" >
< a href = "../concepts/crd.html" >
< b > 3.10.2.< / b >
使用 CRD 扩展 Kubernetes API
< / a >
< / li >
< li class = "chapter " data-level = "3.10.3" data-path = "../concepts/aggregated-api-server.html" >
< a href = "../concepts/aggregated-api-server.html" >
< b > 3.10.3.< / b >
Aggregated API Server
< / a >
< / li >
< li class = "chapter " data-level = "3.10.4" data-path = "../concepts/apiservice.html" >
< a href = "../concepts/apiservice.html" >
< b > 3.10.4.< / b >
APIService
< / a >
< / li >
< li class = "chapter " data-level = "3.10.5" data-path = "../concepts/service-catalog.html" >
< a href = "../concepts/service-catalog.html" >
< b > 3.10.5.< / b >
Service Catalog
< / a >
2021-02-09 20:56:37 +08:00
< / li >
< li class = "chapter " data-level = "3.10.6" data-path = "../concepts/multicluster.html" >
< a href = "../concepts/multicluster.html" >
< b > 3.10.6.< / b >
多集群管理
< / a >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "3.11" data-path = "../concepts/scheduling.html" >
< a href = "../concepts/scheduling.html" >
< b > 3.11.< / b >
资源调度
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "3.11.1" data-path = "../concepts/qos.html" >
< a href = "../concepts/qos.html" >
< b > 3.11.1.< / b >
QoS( 服务质量等级)
< / a >
< / li >
< / ul >
< / li >
< li class = "header" > 用户指南< / li >
< li class = "chapter " data-level = "4.1" data-path = "./" >
< a href = "./" >
< b > 4.1.< / b >
用户指南
< / a >
< / li >
< li class = "chapter " data-level = "4.2" data-path = "resource-configuration.html" >
< a href = "resource-configuration.html" >
< b > 4.2.< / b >
资源对象配置
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "4.2.1" data-path = "configure-liveness-readiness-probes.html" >
< a href = "configure-liveness-readiness-probes.html" >
< b > 4.2.1.< / b >
配置 Pod 的 liveness 和 readiness 探针
< / a >
< / li >
< li class = "chapter " data-level = "4.2.2" data-path = "configure-pod-service-account.html" >
< a href = "configure-pod-service-account.html" >
< b > 4.2.2.< / b >
配置 Pod 的 Service Account
< / a >
< / li >
< li class = "chapter active" data-level = "4.2.3" data-path = "secret-configuration.html" >
< a href = "secret-configuration.html" >
< b > 4.2.3.< / b >
Secret 配置
< / a >
< / li >
< li class = "chapter " data-level = "4.2.4" data-path = "resource-quota-management.html" >
< a href = "resource-quota-management.html" >
< b > 4.2.4.< / b >
管理 namespace 中的资源配额
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "4.3" data-path = "command-usage.html" >
< a href = "command-usage.html" >
< b > 4.3.< / b >
命令使用
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "4.3.1" data-path = "docker-cli-to-kubectl.html" >
< a href = "docker-cli-to-kubectl.html" >
< b > 4.3.1.< / b >
Docker 用户过渡到 kubectl 命令行指南
< / a >
< / li >
< li class = "chapter " data-level = "4.3.2" data-path = "using-kubectl.html" >
< a href = "using-kubectl.html" >
< b > 4.3.2.< / b >
kubectl 命令概览
< / a >
< / li >
< li class = "chapter " data-level = "4.3.3" data-path = "kubectl-cheatsheet.html" >
< a href = "kubectl-cheatsheet.html" >
< b > 4.3.3.< / b >
kubectl 命令技巧大全
< / a >
< / li >
< li class = "chapter " data-level = "4.3.4" data-path = "using-etcdctl-to-access-kubernetes-data.html" >
< a href = "using-etcdctl-to-access-kubernetes-data.html" >
< b > 4.3.4.< / b >
使用 etcdctl 访问 kubernetes 数据
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "4.4" data-path = "cluster-security-management.html" >
< a href = "cluster-security-management.html" >
< b > 4.4.< / b >
集群安全性管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "4.4.1" data-path = "managing-tls-in-a-cluster.html" >
< a href = "managing-tls-in-a-cluster.html" >
< b > 4.4.1.< / b >
管理集群中的 TLS
< / a >
< / li >
< li class = "chapter " data-level = "4.4.2" data-path = "kubelet-authentication-authorization.html" >
< a href = "kubelet-authentication-authorization.html" >
< b > 4.4.2.< / b >
kubelet 的认证授权
< / a >
< / li >
< li class = "chapter " data-level = "4.4.3" data-path = "tls-bootstrapping.html" >
< a href = "tls-bootstrapping.html" >
< b > 4.4.3.< / b >
2020-07-17 11:08:23 +08:00
TLS Bootstrap
2020-06-19 14:52:56 +08:00
< / a >
< / li >
< li class = "chapter " data-level = "4.4.4" data-path = "kubectl-user-authentication-authorization.html" >
< a href = "kubectl-user-authentication-authorization.html" >
< b > 4.4.4.< / b >
创建用户认证授权的 kubeconfig 文件
< / a >
< / li >
< li class = "chapter " data-level = "4.4.5" data-path = "ip-masq-agent.html" >
< a href = "ip-masq-agent.html" >
< b > 4.4.5.< / b >
IP 伪装代理
< / a >
< / li >
< li class = "chapter " data-level = "4.4.6" data-path = "auth-with-kubeconfig-or-token.html" >
< a href = "auth-with-kubeconfig-or-token.html" >
< b > 4.4.6.< / b >
使用 kubeconfig 或 token 进行用户身份认证
< / a >
< / li >
< li class = "chapter " data-level = "4.4.7" data-path = "authentication.html" >
< a href = "authentication.html" >
< b > 4.4.7.< / b >
Kubernetes 中的用户与身份认证授权
< / a >
< / li >
< li class = "chapter " data-level = "4.4.8" data-path = "kubernetes-security-best-practice.html" >
< a href = "kubernetes-security-best-practice.html" >
< b > 4.4.8.< / b >
Kubernetes 集群安全性配置最佳实践
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "4.5" data-path = "access-kubernetes-cluster.html" >
< a href = "access-kubernetes-cluster.html" >
< b > 4.5.< / b >
访问 Kubernetes 集群
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "4.5.1" data-path = "access-cluster.html" >
< a href = "access-cluster.html" >
< b > 4.5.1.< / b >
访问集群
< / a >
< / li >
< li class = "chapter " data-level = "4.5.2" data-path = "authenticate-across-clusters-kubeconfig.html" >
< a href = "authenticate-across-clusters-kubeconfig.html" >
< b > 4.5.2.< / b >
使用 kubeconfig 文件配置跨集群认证
< / a >
< / li >
< li class = "chapter " data-level = "4.5.3" data-path = "connecting-to-applications-port-forward.html" >
< a href = "connecting-to-applications-port-forward.html" >
< b > 4.5.3.< / b >
通过端口转发访问集群中的应用程序
< / a >
< / li >
< li class = "chapter " data-level = "4.5.4" data-path = "service-access-application-cluster.html" >
< a href = "service-access-application-cluster.html" >
< b > 4.5.4.< / b >
使用 service 访问群集中的应用程序
< / a >
< / li >
< li class = "chapter " data-level = "4.5.5" data-path = "accessing-kubernetes-pods-from-outside-of-the-cluster.html" >
< a href = "accessing-kubernetes-pods-from-outside-of-the-cluster.html" >
< b > 4.5.5.< / b >
从外部访问 Kubernetes 中的 Pod
< / a >
< / li >
< li class = "chapter " data-level = "4.5.6" data-path = "cabin-mobile-dashboard-for-kubernetes.html" >
< a href = "cabin-mobile-dashboard-for-kubernetes.html" >
< b > 4.5.6.< / b >
Cabin - Kubernetes 手机客户端
< / a >
< / li >
< li class = "chapter " data-level = "4.5.7" data-path = "kubernetes-desktop-client.html" >
< a href = "kubernetes-desktop-client.html" >
< b > 4.5.7.< / b >
2020-06-29 12:32:43 +08:00
Lens - Kubernetes IDE/桌面客户端
2020-06-19 14:52:56 +08:00
< / a >
< / li >
< li class = "chapter " data-level = "4.5.8" data-path = "kubernator-kubernetes-ui.html" >
< a href = "kubernator-kubernetes-ui.html" >
< b > 4.5.8.< / b >
Kubernator - 更底层的 Kubernetes UI
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "4.6" data-path = "application-development-deployment-flow.html" >
< a href = "application-development-deployment-flow.html" >
< b > 4.6.< / b >
在 Kubernetes 中开发部署应用
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "4.6.1" data-path = "deploy-applications-in-kubernetes.html" >
< a href = "deploy-applications-in-kubernetes.html" >
< b > 4.6.1.< / b >
适用于 kubernetes 的应用开发部署流程
< / a >
< / li >
< li class = "chapter " data-level = "4.6.2" data-path = "migrating-hadoop-yarn-to-kubernetes.html" >
< a href = "migrating-hadoop-yarn-to-kubernetes.html" >
< b > 4.6.2.< / b >
迁移传统应用到 Kubernetes 中 —— 以 Hadoop YARN 为例
< / a >
< / li >
< li class = "chapter " data-level = "4.6.3" data-path = "using-statefulset.html" >
< a href = "using-statefulset.html" >
< b > 4.6.3.< / b >
使用 StatefulSet 部署用状态应用
< / a >
< / li >
< / ul >
< / li >
< li class = "header" > 最佳实践< / li >
< li class = "chapter " data-level = "5.1" data-path = "../practice/" >
< a href = "../practice/" >
< b > 5.1.< / b >
最佳实践概览
< / a >
< / li >
< li class = "chapter " data-level = "5.2" data-path = "../practice/install-kubernetes-on-centos.html" >
< a href = "../practice/install-kubernetes-on-centos.html" >
< b > 5.2.< / b >
在 CentOS 上部署 Kubernetes 集群
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.2.1" data-path = "../practice/create-tls-and-secret-key.html" >
< a href = "../practice/create-tls-and-secret-key.html" >
< b > 5.2.1.< / b >
创建 TLS 证书和秘钥
< / a >
< / li >
< li class = "chapter " data-level = "5.2.2" data-path = "../practice/create-kubeconfig.html" >
< a href = "../practice/create-kubeconfig.html" >
< b > 5.2.2.< / b >
创建 kubeconfig 文件
< / a >
< / li >
< li class = "chapter " data-level = "5.2.3" data-path = "../practice/etcd-cluster-installation.html" >
< a href = "../practice/etcd-cluster-installation.html" >
< b > 5.2.3.< / b >
创建高可用 etcd 集群
< / a >
< / li >
< li class = "chapter " data-level = "5.2.4" data-path = "../practice/kubectl-installation.html" >
< a href = "../practice/kubectl-installation.html" >
< b > 5.2.4.< / b >
安装 kubectl 命令行工具
< / a >
< / li >
< li class = "chapter " data-level = "5.2.5" data-path = "../practice/master-installation.html" >
< a href = "../practice/master-installation.html" >
< b > 5.2.5.< / b >
部署 master 节点
< / a >
< / li >
< li class = "chapter " data-level = "5.2.6" data-path = "../practice/flannel-installation.html" >
< a href = "../practice/flannel-installation.html" >
< b > 5.2.6.< / b >
安装 flannel 网络插件
< / a >
< / li >
< li class = "chapter " data-level = "5.2.7" data-path = "../practice/node-installation.html" >
< a href = "../practice/node-installation.html" >
< b > 5.2.7.< / b >
部署 node 节点
< / a >
< / li >
< li class = "chapter " data-level = "5.2.8" data-path = "../practice/kubedns-addon-installation.html" >
< a href = "../practice/kubedns-addon-installation.html" >
< b > 5.2.8.< / b >
安装 kubedns 插件
< / a >
< / li >
< li class = "chapter " data-level = "5.2.9" data-path = "../practice/dashboard-addon-installation.html" >
< a href = "../practice/dashboard-addon-installation.html" >
< b > 5.2.9.< / b >
安装 dashboard 插件
< / a >
< / li >
< li class = "chapter " data-level = "5.2.10" data-path = "../practice/heapster-addon-installation.html" >
< a href = "../practice/heapster-addon-installation.html" >
< b > 5.2.10.< / b >
安装 heapster 插件
< / a >
< / li >
< li class = "chapter " data-level = "5.2.11" data-path = "../practice/efk-addon-installation.html" >
< a href = "../practice/efk-addon-installation.html" >
< b > 5.2.11.< / b >
安装 EFK 插件
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.3" data-path = "../practice/install-kubernetes-with-kubeadm.html" >
< a href = "../practice/install-kubernetes-with-kubeadm.html" >
< b > 5.3.< / b >
生产级的 Kubernetes 简化管理工具 kubeadm
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.3.1" data-path = "../practice/install-kubernetes-on-ubuntu-server-16.04-with-kubeadm.html" >
< a href = "../practice/install-kubernetes-on-ubuntu-server-16.04-with-kubeadm.html" >
< b > 5.3.1.< / b >
使用 kubeadm 在 Ubuntu Server 16.04 上快速构建测试集群
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.4" data-path = "../practice/service-discovery-and-loadbalancing.html" >
< a href = "../practice/service-discovery-and-loadbalancing.html" >
< b > 5.4.< / b >
服务发现与负载均衡
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.4.1" data-path = "../practice/traefik-ingress-installation.html" >
< a href = "../practice/traefik-ingress-installation.html" >
< b > 5.4.1.< / b >
安装 Traefik ingress
< / a >
< / li >
< li class = "chapter " data-level = "5.4.2" data-path = "../practice/distributed-load-test.html" >
< a href = "../practice/distributed-load-test.html" >
< b > 5.4.2.< / b >
分布式负载测试
< / a >
< / li >
< li class = "chapter " data-level = "5.4.3" data-path = "../practice/network-and-cluster-perfermance-test.html" >
< a href = "../practice/network-and-cluster-perfermance-test.html" >
< b > 5.4.3.< / b >
网络和集群性能测试
< / a >
< / li >
< li class = "chapter " data-level = "5.4.4" data-path = "../practice/edge-node-configuration.html" >
< a href = "../practice/edge-node-configuration.html" >
< b > 5.4.4.< / b >
边缘节点配置
< / a >
< / li >
< li class = "chapter " data-level = "5.4.5" data-path = "../practice/nginx-ingress-installation.html" >
< a href = "../practice/nginx-ingress-installation.html" >
< b > 5.4.5.< / b >
安装 Nginx ingress
< / a >
< / li >
< li class = "chapter " data-level = "5.4.6" data-path = "../practice/dns-installation.html" >
< a href = "../practice/dns-installation.html" >
< b > 5.4.6.< / b >
安装配置 DNS
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.4.6.1" data-path = "../practice/configuring-dns.html" >
< a href = "../practice/configuring-dns.html" >
< b > 5.4.6.1.< / b >
安装配置 Kube-dns
< / a >
< / li >
< li class = "chapter " data-level = "5.4.6.2" data-path = "../practice/coredns.html" >
< a href = "../practice/coredns.html" >
< b > 5.4.6.2.< / b >
安装配置 CoreDNS
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.5" data-path = "../practice/operation.html" >
< a href = "../practice/operation.html" >
< b > 5.5.< / b >
运维管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.5.1" data-path = "../practice/master-ha.html" >
< a href = "../practice/master-ha.html" >
< b > 5.5.1.< / b >
Master 节点高可用
< / a >
< / li >
< li class = "chapter " data-level = "5.5.2" data-path = "../practice/service-rolling-update.html" >
< a href = "../practice/service-rolling-update.html" >
< b > 5.5.2.< / b >
服务滚动升级
< / a >
< / li >
< li class = "chapter " data-level = "5.5.3" data-path = "../practice/app-log-collection.html" >
< a href = "../practice/app-log-collection.html" >
< b > 5.5.3.< / b >
应用日志收集
< / a >
< / li >
< li class = "chapter " data-level = "5.5.4" data-path = "../practice/configuration-best-practice.html" >
< a href = "../practice/configuration-best-practice.html" >
< b > 5.5.4.< / b >
配置最佳实践
< / a >
< / li >
< li class = "chapter " data-level = "5.5.5" data-path = "../practice/monitor.html" >
< a href = "../practice/monitor.html" >
< b > 5.5.5.< / b >
集群及应用监控
< / a >
< / li >
< li class = "chapter " data-level = "5.5.6" data-path = "../practice/data-persistence-problem.html" >
< a href = "../practice/data-persistence-problem.html" >
< b > 5.5.6.< / b >
数据持久化问题
< / a >
< / li >
< li class = "chapter " data-level = "5.5.7" data-path = "../practice/manage-compute-resources-container.html" >
< a href = "../practice/manage-compute-resources-container.html" >
< b > 5.5.7.< / b >
管理容器的计算资源
< / a >
< / li >
< li class = "chapter " data-level = "5.5.8" data-path = "../practice/federation.html" >
< a href = "../practice/federation.html" >
< b > 5.5.8.< / b >
集群联邦
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.6" data-path = "../practice/storage.html" >
< a href = "../practice/storage.html" >
< b > 5.6.< / b >
存储管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.6.1" data-path = "../practice/glusterfs.html" >
< a href = "../practice/glusterfs.html" >
< b > 5.6.1.< / b >
GlusterFS
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.6.1.1" data-path = "../practice/using-glusterfs-for-persistent-storage.html" >
< a href = "../practice/using-glusterfs-for-persistent-storage.html" >
< b > 5.6.1.1.< / b >
使用 GlusterFS 做持久化存储
< / a >
< / li >
< li class = "chapter " data-level = "5.6.1.2" data-path = "../practice/using-heketi-gluster-for-persistent-storage.html" >
< a href = "../practice/using-heketi-gluster-for-persistent-storage.html" >
< b > 5.6.1.2.< / b >
使用 Heketi 作为 Kubernetes 的持久存储 GlusterFS 的 external provisioner
< / a >
< / li >
< li class = "chapter " data-level = "5.6.1.3" data-path = "../practice/storage-for-containers-using-glusterfs-with-openshift.html" >
< a href = "../practice/storage-for-containers-using-glusterfs-with-openshift.html" >
< b > 5.6.1.3.< / b >
在 OpenShift 中使用 GlusterFS 做持久化存储
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.6.2" data-path = "../practice/glusterd-2.0.html" >
< a href = "../practice/glusterd-2.0.html" >
< b > 5.6.2.< / b >
GlusterD-2.0
< / a >
< / li >
< li class = "chapter " data-level = "5.6.3" data-path = "../practice/ceph.html" >
< a href = "../practice/ceph.html" >
< b > 5.6.3.< / b >
Ceph
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.6.3.1" data-path = "../practice/ceph-helm-install-guide-zh.html" >
< a href = "../practice/ceph-helm-install-guide-zh.html" >
< b > 5.6.3.1.< / b >
用 Helm 托管安装 Ceph 集群并提供后端存储
< / a >
< / li >
< li class = "chapter " data-level = "5.6.3.2" data-path = "../practice/using-ceph-for-persistent-storage.html" >
< a href = "../practice/using-ceph-for-persistent-storage.html" >
< b > 5.6.3.2.< / b >
使用 Ceph 做持久化存储
< / a >
< / li >
< li class = "chapter " data-level = "5.6.3.3" data-path = "../practice/rbd-provisioner.html" >
< a href = "../practice/rbd-provisioner.html" >
< b > 5.6.3.3.< / b >
使用 rbd-provisioner 提供 rbd 持久化存储
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.6.4" data-path = "../practice/openebs.html" >
< a href = "../practice/openebs.html" >
< b > 5.6.4.< / b >
OpenEBS
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.6.4.1" data-path = "../practice/using-openebs-for-persistent-storage.html" >
< a href = "../practice/using-openebs-for-persistent-storage.html" >
< b > 5.6.4.1.< / b >
使用 OpenEBS 做持久化存储
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.6.5" data-path = "../practice/rook.html" >
< a href = "../practice/rook.html" >
< b > 5.6.5.< / b >
Rook
< / a >
< / li >
< li class = "chapter " data-level = "5.6.6" data-path = "../practice/nfs.html" >
< a href = "../practice/nfs.html" >
< b > 5.6.6.< / b >
NFS
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.6.6.1" data-path = "../practice/using-nfs-for-persistent-storage.html" >
< a href = "../practice/using-nfs-for-persistent-storage.html" >
< b > 5.6.6.1.< / b >
利用 NFS 动态提供 Kubernetes 后端存储卷
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.7" data-path = "../practice/monitoring.html" >
< a href = "../practice/monitoring.html" >
< b > 5.7.< / b >
集群与应用监控
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.7.1" data-path = "../practice/heapster.html" >
< a href = "../practice/heapster.html" >
< b > 5.7.1.< / b >
Heapster
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.7.1.1" data-path = "../practice/using-heapster-to-get-object-metrics.html" >
< a href = "../practice/using-heapster-to-get-object-metrics.html" >
< b > 5.7.1.1.< / b >
使用 Heapster 获取集群和对象的 metric 数据
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.7.2" data-path = "../practice/prometheus.html" >
< a href = "../practice/prometheus.html" >
< b > 5.7.2.< / b >
Prometheus
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.7.2.1" data-path = "../practice/using-prometheus-to-monitor-kuberentes-cluster.html" >
< a href = "../practice/using-prometheus-to-monitor-kuberentes-cluster.html" >
< b > 5.7.2.1.< / b >
使用 Prometheus 监控 kubernetes 集群
< / a >
< / li >
< li class = "chapter " data-level = "5.7.2.2" data-path = "../practice/promql.html" >
< a href = "../practice/promql.html" >
< b > 5.7.2.2.< / b >
Prometheus 查询语言 PromQL 使用说明
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.7.3" data-path = "../practice/vistio-visualize-your-istio-mesh.html" >
< a href = "../practice/vistio-visualize-your-istio-mesh.html" >
< b > 5.7.3.< / b >
使用 Vistio 监控 Istio 服务网格中的流量
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.8" data-path = "../practice/distributed-tracing.html" >
< a href = "../practice/distributed-tracing.html" >
< b > 5.8.< / b >
分布式跟踪
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.8.1" data-path = "../practice/opentracing.html" >
< a href = "../practice/opentracing.html" >
< b > 5.8.1.< / b >
OpenTracing
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.9" data-path = "../practice/services-management-tool.html" >
< a href = "../practice/services-management-tool.html" >
< b > 5.9.< / b >
服务编排管理
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.9.1" data-path = "../practice/helm.html" >
< a href = "../practice/helm.html" >
< b > 5.9.1.< / b >
使用 Helm 管理 Kubernetes 应用
< / a >
< / li >
< li class = "chapter " data-level = "5.9.2" data-path = "../practice/create-private-charts-repo.html" >
< a href = "../practice/create-private-charts-repo.html" >
< b > 5.9.2.< / b >
构建私有 Chart 仓库
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.10" data-path = "../practice/ci-cd.html" >
< a href = "../practice/ci-cd.html" >
< b > 5.10.< / b >
持续集成与发布
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.10.1" data-path = "../practice/jenkins-ci-cd.html" >
< a href = "../practice/jenkins-ci-cd.html" >
< b > 5.10.1.< / b >
使用 Jenkins 进行持续集成与发布
< / a >
< / li >
< li class = "chapter " data-level = "5.10.2" data-path = "../practice/drone-ci-cd.html" >
< a href = "../practice/drone-ci-cd.html" >
< b > 5.10.2.< / b >
使用 Drone 进行持续集成与发布
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.11" data-path = "../practice/update-and-upgrade.html" >
< a href = "../practice/update-and-upgrade.html" >
< b > 5.11.< / b >
更新与升级
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.11.1" data-path = "../practice/manually-upgrade.html" >
< a href = "../practice/manually-upgrade.html" >
< b > 5.11.1.< / b >
手动升级 Kubernetes 集群
< / a >
< / li >
< li class = "chapter " data-level = "5.11.2" data-path = "../practice/dashboard-upgrade.html" >
< a href = "../practice/dashboard-upgrade.html" >
< b > 5.11.2.< / b >
升级 dashboard
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.12" data-path = "../practice/controller-extended.html" >
< a href = "../practice/controller-extended.html" >
< b > 5.12.< / b >
扩展控制器
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.12.1" data-path = "../practice/openkruise.html" >
< a href = "../practice/openkruise.html" >
< b > 5.12.1.< / b >
OpenKruise
< / a >
2020-06-22 17:07:42 +08:00
< ul class = "articles" >
< li class = "chapter " data-level = "5.12.1.1" data-path = "../practice/in-place-update.html" >
< a href = "../practice/in-place-update.html" >
< b > 5.12.1.1.< / b >
原地升级
< / a >
< / li >
< / ul >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
< li class = "header" > 领域应用< / li >
< li class = "chapter " data-level = "6.1" data-path = "../usecases/" >
< a href = "../usecases/" >
< b > 6.1.< / b >
领域应用概览
< / a >
< / li >
< li class = "chapter " data-level = "6.2" data-path = "../usecases/microservices.html" >
< a href = "../usecases/microservices.html" >
< b > 6.2.< / b >
微服务架构
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "6.2.1" data-path = "../usecases/service-discovery-in-microservices.html" >
< a href = "../usecases/service-discovery-in-microservices.html" >
< b > 6.2.1.< / b >
微服务中的服务发现
< / a >
< / li >
< li class = "chapter " data-level = "6.2.2" data-path = "../usecases/microservices-for-java-developers.html" >
< a href = "../usecases/microservices-for-java-developers.html" >
< b > 6.2.2.< / b >
使用 Java 构建微服务并发布到 Kubernetes 平台
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "6.2.2.1" data-path = "../usecases/spring-boot-quick-start-guide.html" >
< a href = "../usecases/spring-boot-quick-start-guide.html" >
< b > 6.2.2.1.< / b >
Spring Boot 快速开始指南
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.3" data-path = "../usecases/observability.html" >
2020-06-19 14:52:56 +08:00
2020-11-23 12:24:15 +08:00
< a href = "../usecases/observability.html" >
2020-06-19 14:52:56 +08:00
< b > 6.3.< / b >
2020-11-23 12:24:15 +08:00
可观察性
< / a >
< / li >
< li class = "chapter " data-level = "6.4" data-path = "../usecases/service-mesh.html" >
< a href = "../usecases/service-mesh.html" >
< b > 6.4.< / b >
2020-06-19 14:52:56 +08:00
Service Mesh 服务网格
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1" data-path = "../usecases/the-enterprise-path-to-service-mesh-architectures.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/the-enterprise-path-to-service-mesh-architectures.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.< / b >
2020-06-19 14:52:56 +08:00
企业级服务网格架构
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1.1" data-path = "../usecases/service-mesh-fundamental.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/service-mesh-fundamental.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.1.< / b >
2020-06-19 14:52:56 +08:00
Service Mesh 基础
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1.2" data-path = "../usecases/comparing-service-mesh-technologies.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/comparing-service-mesh-technologies.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.2.< / b >
2020-06-19 14:52:56 +08:00
Service Mesh 技术对比
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1.3" data-path = "../usecases/service-mesh-adoption-and-evolution.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/service-mesh-adoption-and-evolution.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.3.< / b >
2020-06-19 14:52:56 +08:00
采纳和演进
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1.4" data-path = "../usecases/service-mesh-customization-and-integration.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/service-mesh-customization-and-integration.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.4.< / b >
2020-06-19 14:52:56 +08:00
定制和集成
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.1.5" data-path = "../usecases/service-mesh-conclusion.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/service-mesh-conclusion.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.1.5.< / b >
2020-06-19 14:52:56 +08:00
总结
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2" data-path = "../usecases/istio.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/istio.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.< / b >
2020-06-19 14:52:56 +08:00
Istio
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.1" data-path = "../usecases/istio-installation.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/istio-installation.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.1.< / b >
2020-06-19 14:52:56 +08:00
安装并试用 Istio service mesh
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.2" data-path = "../usecases/sidecar-spec-in-istio.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/sidecar-spec-in-istio.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.2.< / b >
2020-06-19 14:52:56 +08:00
Istio 中 sidecar 的注入规范及示例
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.3" data-path = "../usecases/istio-community-tips.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/istio-community-tips.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.3.< / b >
2020-06-19 14:52:56 +08:00
如何参与 Istio 社区及注意事项
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.4" data-path = "../usecases/istio-tutorials-collection.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/istio-tutorials-collection.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.4.< / b >
2020-06-19 14:52:56 +08:00
Istio 免费学习资源汇总
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.5" data-path = "../usecases/understand-sidecar-injection-and-traffic-hijack-in-istio-service-mesh.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/understand-sidecar-injection-and-traffic-hijack-in-istio-service-mesh.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.5.< / b >
2020-06-19 14:52:56 +08:00
Sidecar 的注入与流量劫持
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.6" data-path = "../usecases/envoy-sidecar-routing-of-istio-service-mesh-deep-dive.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/envoy-sidecar-routing-of-istio-service-mesh-deep-dive.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.6.< / b >
2020-06-19 14:52:56 +08:00
Envoy Sidecar 代理的路由转发
< / a >
2020-11-18 17:21:45 +08:00
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.2.7" data-path = "../usecases/how-to-integrate-istio-with-vm.html" >
2020-11-18 17:21:45 +08:00
< a href = "../usecases/how-to-integrate-istio-with-vm.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.2.7.< / b >
2020-11-18 17:21:45 +08:00
Istio 如何支持虚拟机
< / a >
2020-12-25 20:38:09 +08:00
< / li >
< li class = "chapter " data-level = "6.4.2.8" data-path = "../usecases/istio-vm-support.html" >
< a href = "../usecases/istio-vm-support.html" >
< b > 6.4.2.8.< / b >
Istio 支持虚拟机的历史
< / a >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.3" data-path = "../usecases/linkerd.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/linkerd.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.3.< / b >
2020-06-19 14:52:56 +08:00
Linkerd
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.3.1" data-path = "../usecases/linkerd-user-guide.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/linkerd-user-guide.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.3.1.< / b >
2020-06-19 14:52:56 +08:00
Linkerd 使用指南
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.4" data-path = "../usecases/conduit.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/conduit.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.4.< / b >
2020-06-19 14:52:56 +08:00
Conduit
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.4.1" data-path = "../usecases/conduit-overview.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/conduit-overview.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.4.1.< / b >
2020-06-19 14:52:56 +08:00
Condiut 概览
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.4.2" data-path = "../usecases/conduit-installation.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/conduit-installation.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.4.2.< / b >
2020-06-19 14:52:56 +08:00
安装 Conduit
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.5" data-path = "../usecases/envoy.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/envoy.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.5.< / b >
2020-06-19 14:52:56 +08:00
Envoy
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.5.1" data-path = "../usecases/envoy-terminology.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/envoy-terminology.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.5.1.< / b >
2020-06-19 14:52:56 +08:00
Envoy 的架构与基本术语
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.5.2" data-path = "../usecases/envoy-front-proxy.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/envoy-front-proxy.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.5.2.< / b >
2020-06-19 14:52:56 +08:00
Envoy 作为前端代理
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.5.3" data-path = "../usecases/envoy-mesh-in-kubernetes-tutorial.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/envoy-mesh-in-kubernetes-tutorial.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.5.3.< / b >
2020-06-19 14:52:56 +08:00
Envoy mesh 教程
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.4.6" data-path = "../usecases/mosn.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/mosn.html" >
2020-11-23 12:24:15 +08:00
< b > 6.4.6.< / b >
2020-06-19 14:52:56 +08:00
MOSN
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.5" data-path = "../usecases/big-data.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/big-data.html" >
2020-11-23 12:24:15 +08:00
< b > 6.5.< / b >
2020-06-19 14:52:56 +08:00
大数据
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.5.1" data-path = "../usecases/spark-standalone-on-kubernetes.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/spark-standalone-on-kubernetes.html" >
2020-11-23 12:24:15 +08:00
< b > 6.5.1.< / b >
2020-06-19 14:52:56 +08:00
Spark standalone on Kubernetes
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.5.2" data-path = "../usecases/running-spark-with-kubernetes-native-scheduler.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/running-spark-with-kubernetes-native-scheduler.html" >
2020-11-23 12:24:15 +08:00
< b > 6.5.2.< / b >
2020-06-19 14:52:56 +08:00
运行支持 Kubernetes 原生调度的 Spark 程序
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.6" data-path = "../usecases/serverless.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/serverless.html" >
2020-11-23 12:24:15 +08:00
< b > 6.6.< / b >
2020-06-19 14:52:56 +08:00
Serverless 架构
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.6.1" data-path = "../usecases/understanding-serverless.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/understanding-serverless.html" >
2020-11-23 12:24:15 +08:00
< b > 6.6.1.< / b >
2020-06-19 14:52:56 +08:00
理解 Serverless
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.6.2" data-path = "../usecases/faas.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/faas.html" >
2020-11-23 12:24:15 +08:00
< b > 6.6.2.< / b >
2020-06-19 14:52:56 +08:00
FaaS( 函数即服务)
< / a >
< ul class = "articles" >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.6.2.1" data-path = "../usecases/openfaas-quick-start.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/openfaas-quick-start.html" >
2020-11-23 12:24:15 +08:00
< b > 6.6.2.1.< / b >
2020-06-19 14:52:56 +08:00
OpenFaaS 快速入门指南
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.6.3" data-path = "../usecases/knative.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/knative.html" >
2020-11-23 12:24:15 +08:00
< b > 6.6.3.< / b >
2020-06-19 14:52:56 +08:00
Knative
< / a >
< / li >
< / ul >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.7" data-path = "../usecases/edge-computing.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/edge-computing.html" >
2020-11-23 12:24:15 +08:00
< b > 6.7.< / b >
2020-06-19 14:52:56 +08:00
边缘计算
< / a >
< / li >
2020-11-23 12:24:15 +08:00
< li class = "chapter " data-level = "6.8" data-path = "../usecases/ai.html" >
2020-06-19 14:52:56 +08:00
< a href = "../usecases/ai.html" >
2020-11-23 12:24:15 +08:00
< b > 6.8.< / b >
2020-06-19 14:52:56 +08:00
人工智能
< / a >
< / li >
< li class = "header" > 开发指南< / li >
< li class = "chapter " data-level = "7.1" data-path = "../develop/" >
< a href = "../develop/" >
< b > 7.1.< / b >
开发指南概览
< / a >
< / li >
< li class = "chapter " data-level = "7.2" data-path = "../develop/sigs-and-working-group.html" >
< a href = "../develop/sigs-and-working-group.html" >
< b > 7.2.< / b >
SIG 和工作组
< / a >
< / li >
< li class = "chapter " data-level = "7.3" data-path = "../develop/developing-environment.html" >
< a href = "../develop/developing-environment.html" >
< b > 7.3.< / b >
开发环境搭建
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "7.3.1" data-path = "../develop/using-vagrant-and-virtualbox-for-development.html" >
< a href = "../develop/using-vagrant-and-virtualbox-for-development.html" >
< b > 7.3.1.< / b >
本地分布式开发环境搭建(使用 Vagrant 和 Virtualbox)
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "7.4" data-path = "../develop/testing.html" >
< a href = "../develop/testing.html" >
< b > 7.4.< / b >
单元测试和集成测试
< / a >
< / li >
< li class = "chapter " data-level = "7.5" data-path = "../develop/client-go-sample.html" >
< a href = "../develop/client-go-sample.html" >
< b > 7.5.< / b >
client-go 示例
< / a >
< / li >
< li class = "chapter " data-level = "7.6" data-path = "../develop/operator.html" >
< a href = "../develop/operator.html" >
< b > 7.6.< / b >
Operator
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "7.6.1" data-path = "../develop/operator-sdk.html" >
< a href = "../develop/operator-sdk.html" >
< b > 7.6.1.< / b >
operator-sdk
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "7.7" data-path = "../develop/kubebuilder.html" >
< a href = "../develop/kubebuilder.html" >
< b > 7.7.< / b >
kubebuilder
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "7.7.1" data-path = "../develop/kubebuilder-example.html" >
< a href = "../develop/kubebuilder-example.html" >
< b > 7.7.1.< / b >
使用 kubebuilder 创建 operator 示例
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "7.8" data-path = "../develop/advance-developer.html" >
< a href = "../develop/advance-developer.html" >
< b > 7.8.< / b >
高级开发指南
< / a >
< / li >
< li class = "chapter " data-level = "7.9" data-path = "../develop/contribute.html" >
< a href = "../develop/contribute.html" >
< b > 7.9.< / b >
社区贡献
< / a >
< / li >
< li class = "chapter " data-level = "7.10" data-path = "../develop/minikube.html" >
< a href = "../develop/minikube.html" >
< b > 7.10.< / b >
Minikube
< / a >
< / li >
< li class = "header" > CNCF( 云原生计算基金会) < / li >
< li class = "chapter " data-level = "8.1" data-path = "../cloud-native/cncf.html" >
< a href = "../cloud-native/cncf.html" >
< b > 8.1.< / b >
CNCF - 云原生计算基金会简介
< / a >
< / li >
< li class = "chapter " data-level = "8.2" data-path = "../cloud-native/cncf-charter.html" >
< a href = "../cloud-native/cncf-charter.html" >
< b > 8.2.< / b >
CNCF 章程
< / a >
< / li >
< li class = "chapter " data-level = "8.3" data-path = "../cloud-native/cncf-sig.html" >
< a href = "../cloud-native/cncf-sig.html" >
< b > 8.3.< / b >
CNCF 特别兴趣小组( SIG) 说明
< / a >
< / li >
< li class = "chapter " data-level = "8.4" data-path = "../cloud-native/cncf-sandbox-criteria.html" >
< a href = "../cloud-native/cncf-sandbox-criteria.html" >
< b > 8.4.< / b >
开源项目加入 CNCF Sandbox 的要求
< / a >
< / li >
< li class = "chapter " data-level = "8.5" data-path = "../cloud-native/cncf-project-governing.html" >
< a href = "../cloud-native/cncf-project-governing.html" >
< b > 8.5.< / b >
CNCF 中的项目治理
< / a >
< / li >
< li class = "chapter " data-level = "8.6" data-path = "../cloud-native/cncf-ambassador.html" >
< a href = "../cloud-native/cncf-ambassador.html" >
< b > 8.6.< / b >
CNCF Ambassador
< / a >
< / li >
< li class = "header" > 附录< / li >
< li class = "chapter " data-level = "9.1" data-path = "../appendix/" >
< a href = "../appendix/" >
< b > 9.1.< / b >
附录说明
< / a >
< / li >
< li class = "chapter " data-level = "9.2" data-path = "../appendix/debug-kubernetes-services.html" >
< a href = "../appendix/debug-kubernetes-services.html" >
< b > 9.2.< / b >
Kubernetes 中的应用故障排查
< / a >
< / li >
< li class = "chapter " data-level = "9.3" data-path = "../appendix/material-share.html" >
< a href = "../appendix/material-share.html" >
< b > 9.3.< / b >
Kubernetes 相关资讯和情报链接
< / a >
< / li >
< li class = "chapter " data-level = "9.4" data-path = "../appendix/docker-best-practice.html" >
< a href = "../appendix/docker-best-practice.html" >
< b > 9.4.< / b >
Docker 最佳实践
< / a >
< / li >
< li class = "chapter " data-level = "9.5" data-path = "../appendix/tricks.html" >
< a href = "../appendix/tricks.html" >
< b > 9.5.< / b >
使用技巧
< / a >
< / li >
< li class = "chapter " data-level = "9.6" data-path = "../appendix/issues.html" >
< a href = "../appendix/issues.html" >
< b > 9.6.< / b >
问题记录
< / a >
< / li >
< li class = "chapter " data-level = "9.7" data-path = "../appendix/kubernetes-changelog.html" >
< a href = "../appendix/kubernetes-changelog.html" >
< b > 9.7.< / b >
Kubernetes 版本更新日志
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "9.7.1" data-path = "../appendix/kubernetes-1.7-changelog.html" >
< a href = "../appendix/kubernetes-1.7-changelog.html" >
< b > 9.7.1.< / b >
Kubernetes1.7 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.2" data-path = "../appendix/kubernetes-1.8-changelog.html" >
< a href = "../appendix/kubernetes-1.8-changelog.html" >
< b > 9.7.2.< / b >
Kubernetes1.8 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.3" data-path = "../appendix/kubernetes-1.9-changelog.html" >
< a href = "../appendix/kubernetes-1.9-changelog.html" >
< b > 9.7.3.< / b >
Kubernetes1.9 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.4" data-path = "../appendix/kubernetes-1.10-changelog.html" >
< a href = "../appendix/kubernetes-1.10-changelog.html" >
< b > 9.7.4.< / b >
Kubernetes1.10 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.5" data-path = "../appendix/kubernetes-1.11-changelog.html" >
< a href = "../appendix/kubernetes-1.11-changelog.html" >
< b > 9.7.5.< / b >
Kubernetes1.11 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.6" data-path = "../appendix/kubernetes-1.12-changelog.html" >
< a href = "../appendix/kubernetes-1.12-changelog.html" >
< b > 9.7.6.< / b >
Kubernetes1.12 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.7" data-path = "../appendix/kubernetes-1.13-changelog.html" >
< a href = "../appendix/kubernetes-1.13-changelog.html" >
< b > 9.7.7.< / b >
Kubernetes1.13 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.8" data-path = "../appendix/kubernetes-1.14-changelog.html" >
< a href = "../appendix/kubernetes-1.14-changelog.html" >
< b > 9.7.8.< / b >
Kubernetes1.14 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.9" data-path = "../appendix/kubernetes-1.15-changelog.html" >
< a href = "../appendix/kubernetes-1.15-changelog.html" >
< b > 9.7.9.< / b >
Kubernetes1.15 更新日志
< / a >
2020-08-27 23:26:28 +08:00
< / li >
< li class = "chapter " data-level = "9.7.10" data-path = "../appendix/kubernetes-1.16-changelog.html" >
< a href = "../appendix/kubernetes-1.16-changelog.html" >
< b > 9.7.10.< / b >
Kubernetes1.16 更新日志
< / a >
< / li >
< li class = "chapter " data-level = "9.7.11" data-path = "../appendix/kubernetes-1.17-changelog.html" >
< a href = "../appendix/kubernetes-1.17-changelog.html" >
< b > 9.7.11.< / b >
Kubernetes1.17 更新日志
< / a >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "9.8" data-path = "../appendix/summary-and-outlook.html" >
< a href = "../appendix/summary-and-outlook.html" >
< b > 9.8.< / b >
Kubernetes 及云原生年度总结及展望
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "9.8.1" data-path = "../appendix/kubernetes-and-cloud-native-summary-in-2017-and-outlook-for-2018.html" >
< a href = "../appendix/kubernetes-and-cloud-native-summary-in-2017-and-outlook-for-2018.html" >
< b > 9.8.1.< / b >
Kubernetes 与云原生 2017 年年终总结及 2018 年展望
< / a >
< / li >
< li class = "chapter " data-level = "9.8.2" data-path = "../appendix/kubernetes-and-cloud-native-summary-in-2018-and-outlook-for-2019.html" >
< a href = "../appendix/kubernetes-and-cloud-native-summary-in-2018-and-outlook-for-2019.html" >
< b > 9.8.2.< / b >
Kubernetes 与云原生 2018 年年终总结及 2019 年展望
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "9.9" data-path = "../appendix/cncf-annual-report.html" >
< a href = "../appendix/cncf-annual-report.html" >
< b > 9.9.< / b >
CNCF 年度报告解读
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "9.9.1" data-path = "../appendix/cncf-annual-report-2018.html" >
< a href = "../appendix/cncf-annual-report-2018.html" >
< b > 9.9.1.< / b >
CNCF 2018 年年度报告解读
< / a >
2021-01-09 21:48:01 +08:00
< / li >
< li class = "chapter " data-level = "9.9.2" data-path = "../appendix/cncf-annual-report-2020.html" >
< a href = "../appendix/cncf-annual-report-2020.html" >
< b > 9.9.2.< / b >
CNCF 2020 年年度报告解读
< / a >
2020-06-19 14:52:56 +08:00
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "9.10" data-path = "../appendix/about-kcsp.html" >
< a href = "../appendix/about-kcsp.html" >
< b > 9.10.< / b >
Kubernetes 认证服务提供商( KCSP) 说明
< / a >
< / li >
< li class = "chapter " data-level = "9.11" data-path = "../appendix/about-cka-candidate.html" >
< a href = "../appendix/about-cka-candidate.html" >
< b > 9.11.< / b >
认证 Kubernetes 管理员( CKA) 说明
< / a >
< / li >
< li class = "divider" > < / li >
< li >
< a href = "https://www.gitbook.com" target = "blank" class = "gitbook-link" >
本书使用 GitBook 发布
< / a >
< / li >
< / ul >
< / nav >
< / div >
< div class = "book-body" >
< div class = "body-inner" >
< div class = "book-header" role = "navigation" >
<!-- Title -->
< h1 >
< i class = "fa fa-circle-o-notch fa-spin" > < / i >
< a href = ".." > Secret 配置< / a >
< / h1 >
< / div >
< div class = "page-wrapper" tabindex = "-1" role = "main" >
< div class = "page-inner" >
< div class = "search-plus" id = "book-search-results" >
< div class = "search-noresults" >
< section class = "normal markdown-section" >
< h1 id = "secret-配置" > Secret 配 置 < / h1 >
< p > < code > Secret< / code > 对 象 类 型 用 来 保 存 敏 感 信 息 , 例 如 密 码 、 OAuth 令 牌 和 ssh key。 将 这 些 信 息 放 在 < code > secret< / code > 中 比 放 在 < code > pod< / code > 的 定 义 中 或 者 docker 镜 像 中 来 说 更 加 安 全 和 灵 活 。 < / p >
< h2 id = "secret-概览" > Secret 概 览 < / h2 >
< p > Secret 是 一 种 包 含 少 量 敏 感 信 息 例 如 密 码 、 token 或 key 的 对 象 。 这 样 的 信 息 可 能 会 被 放 在 Pod spec 中 或 者 镜 像 中 ; 将 其 放 在 一 个 secret 对 象 中 可 以 更 好 地 控 制 它 的 用 途 , 并 降 低 意 外 暴 露 的 风 险 。 < / p >
< p > 用 户 可 以 创 建 secret, 同 时 系 统 也 创 建 了 一 些 secret。 < / p >
< p > 要 使 用 secret, pod 需 要 引 用 secret。 Pod 可 以 用 两 种 方 式 使 用 secret: 作 为 < a href = "https://kubernetes.io/docs/concepts/storage/volumes" target = "_blank" > volume< / a > 中 的 文 件 被 挂 载 到 pod 中 的 一 个 或 者 多 个 容 器 里 , 或 者 当 kubelet 为 pod 拉 取 镜 像 时 使 用 。 < / p >
< h3 id = "内置-secret" > 内 置 secret< / h3 >
< h4 id = "service-account-使用-api-凭证自动创建和附加-secret" > Service Account 使 用 API 凭 证 自 动 创 建 和 附 加 secret< / h4 >
< p > Kubernetes 自 动 创 建 包 含 访 问 API 凭 据 的 secret, 并 自 动 修 改 您 的 pod 以 使 用 此 类 型 的 secret。 < / p >
< p > 如 果 需 要 , 可 以 禁 用 或 覆 盖 自 动 创 建 和 使 用 API凭 据 。 但 是 , 如 果 您 需 要 的 只 是 安 全 地 访 问 apiserver, 我 们 推 荐 这 样 的 工 作 流 程 。 < / p >
< p > 参 阅 < a href = "https://kubernetes.io/docs/user-guide/service-accounts" target = "_blank" > Service Account< / a > 文 档 获 取 关 于 Service Account 如 何 工 作 的 更 多 信 息 。 < / p >
< h3 id = "创建您自己的-secret" > 创 建 您 自 己 的 Secret< / h3 >
< h4 id = "使用-kubectl-创建-secret" > 使 用 kubectl 创 建 Secret< / h4 >
< p > 假 设 有 些 pod 需 要 访 问 数 据 库 。 这 些 pod 需 要 使 用 的 用 户 名 和 密 码 在 您 本 地 机 器 的 < code > ./username.txt< / code > 和 < code > ./password.txt< / code > 文 件 里 。 < / p >
< pre class = "language-" > < code class = "lang-bash" > < span class = "token comment" > # Create files needed for rest of example.< / span >
$ < span class = "token builtin class-name" > echo< / span > -n < span class = "token string" > " admin" < / span > < span class = "token operator" > > < / span > ./username.txt
$ < span class = "token builtin class-name" > echo< / span > -n < span class = "token string" > " 1f2d1e2e67df" < / span > < span class = "token operator" > > < / span > ./password.txt
< / code > < / pre >
< p > < code > kubectl create secret< / code > 命 令 将 这 些 文 件 打 包 到 一 个 Secret 中 并 在 API server 中 创 建 了 一 个 对 象 。 < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl create secret generic db-user-pass --from-file< span class = "token operator" > =< / span > ./username.txt --from-file< span class = "token operator" > =< / span > ./password.txt
secret < span class = "token string" > " db-user-pass" < / span > created
< / code > < / pre >
< p > 您 可 以 这 样 检 查 刚 创 建 的 secret: < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl get secrets
NAME TYPE DATA AGE
db-user-pass Opaque < span class = "token number" > 2< / span > 51s
$ kubectl describe secrets/db-user-pass
Name: db-user-pass
Namespace: default
Labels: < span class = "token operator" > < < / span > none< span class = "token operator" > > < / span >
Annotations: < span class = "token operator" > < < / span > none< span class = "token operator" > > < / span >
Type: Opaque
Data
< span class = "token operator" > ==< / span > < span class = "token operator" > ==< / span >
password.txt: < span class = "token number" > 12< / span > bytes
username.txt: < span class = "token number" > 5< / span > bytes
< / code > < / pre >
< p > 请 注 意 , 默 认 情 况 下 , < code > get< / code > 和 < code > describe< / code > 命 令 都 不 会 显 示 文 件 的 内 容 。 这 是 为 了 防 止 将 secret 中 的 内 容 被 意 外 暴 露 给 从 终 端 日 志 记 录 中 刻 意 寻 找 它 们 的 人 。 < / p >
< p > 请 参 阅 < a href = "https://kubernetes.io/docs/concepts/configuration/secret#decoding-a-secret" target = "_blank" > 解 码 secret< / a > 了 解 如 何 查 看 它 们 的 内 容 。 < / p >
< h4 id = "手动创建-secret" > 手 动 创 建 Secret< / h4 >
< p > 您 也 可 以 先 以 json 或 yaml 格 式 在 文 件 中 创 建 一 个 secret 对 象 , 然 后 创 建 该 对 象 。 < / p >
< p > 每 一 项 必 须 是 base64 编 码 : < / p >
< pre class = "language-" > < code class = "lang-bash" > $ < span class = "token builtin class-name" > echo< / span > -n < span class = "token string" > " admin" < / span > < span class = "token operator" > |< / span > base64
< span class = "token assign-left variable" > YWRtaW4< / span > < span class = "token operator" > =< / span >
$ < span class = "token builtin class-name" > echo< / span > -n < span class = "token string" > " 1f2d1e2e67df" < / span > < span class = "token operator" > |< / span > base64
MWYyZDFlMmU2N2Rm
< / code > < / pre >
< p > 现 在 可 以 像 这 样 写 一 个 secret 对 象 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Secret
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > type< / span > < span class = "token punctuation" > :< / span > Opaque
< span class = "token key atrule" > data< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > username< / span > < span class = "token punctuation" > :< / span > YWRtaW4=
< span class = "token key atrule" > password< / span > < span class = "token punctuation" > :< / span > MWYyZDFlMmU2N2Rm
< / code > < / pre >
< p > 数 据 字 段 是 一 个 映 射 。 它 的 键 必 须 匹 配 DNS_SUBDOMAIN, 前 导 点 也 是 可 以 的 。 这 些 值 可 以 是 任 意 数 据 , 使 用 base64 进 行 编 码 。 < / p >
< p > 使 用 < code > kubectl create< / code > 创 建 secret: < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl create -f ./secret.yaml
secret < span class = "token string" > " mysecret" < / span > created
< / code > < / pre >
< p > < strong > 编 码 注 意 : < / strong > secret 数 据 的 序 列 化 JSON 和 YAML 值 使 用 base64 编 码 成 字 符 串 。 换 行 符 在 这 些 字 符 串 中 无 效 , 必 须 省 略 。 当 在 Darwin/OS X上 使 用 < code > base64< / code > 实 用 程 序 时 , 用 户 应 避 免 使 用 < code > -b< / code > 选 项 来 拆 分 长 行 。 另 外 , 对 于 Linux用 户 如 果 < code > -w< / code > 选 项 不 可 用 的 话 , 应 该 添 加 选 项 < code > -w 0< / code > 到 < code > base64< / code > 命 令 或 管 道 < code > base64 | tr -d ' \n' < / code > 。 < / p >
< h4 id = "解码-secret" > 解 码 Secret< / h4 >
< p > 可 以 使 用 < code > kubectl get secret< / code > 命 令 获 取 secret。 例 如 , 获 取 在 上 一 节 中 创 建 的 secret: < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl get secret mysecret -o yaml
apiVersion: v1
data:
username: < span class = "token assign-left variable" > YWRtaW4< / span > < span class = "token operator" > =< / span >
password: MWYyZDFlMmU2N2Rm
kind: Secret
metadata:
creationTimestamp: < span class = "token number" > 2016< / span > -01-22T18:41:56Z
name: mysecret
namespace: default
resourceVersion: < span class = "token string" > " 164619" < / span >
selfLink: /api/v1/namespaces/default/secrets/mysecret
uid: cfee02d6-c137-11e5-8d73-42010af00002
type: Opaque
< / code > < / pre >
< p > 解 码 密 码 字 段 : < / p >
< pre class = "language-" > < code class = "lang-bash" > $ < span class = "token builtin class-name" > echo< / span > < span class = "token string" > " MWYyZDFlMmU2N2Rm" < / span > < span class = "token operator" > |< / span > base64 --decode
1f2d1e2e67df
< / code > < / pre >
< h3 id = "使用-secret" > 使 用 Secret< / h3 >
< p > Secret 可 以 作 为 数 据 卷 被 挂 载 , 或 作 为 环 境 变 量 暴 露 出 来 以 供 pod 中 的 容 器 使 用 。 它 们 也 可 以 被 系 统 的 其 他 部 分 使 用 , 而 不 直 接 暴 露 在 pod 内 。 例 如 , 它 们 可 以 保 存 凭 据 , 系 统 的 其 他 部 分 应 该 用 它 来 代 表 您 与 外 部 系 统 进 行 交 互 。 < / p >
< h4 id = "在-pod-中使用-secret-文件" > 在 Pod 中 使 用 Secret 文 件 < / h4 >
< p > 在 Pod 中 的 volume 里 使 用 Secret: < / p >
< ol >
< li > 创 建 一 个 secret 或 者 使 用 已 有 的 secret。 多 个 pod 可 以 引 用 同 一 个 secret。 < / li >
< li > 修 改 您 的 pod 的 定 义 在 < code > spec.volumes[]< / code > 下 增 加 一 个 volume。 可 以 给 这 个 volume 随 意 命 名 , 它 的 < code > spec.volumes[].secret.secretName< / code > 必 须 等 于 secret 对 象 的 名 字 。 < / li >
< li > 将 < code > spec.containers[].volumeMounts[]< / code > 加 到 需 要 用 到 该 secret 的 容 器 中 。 指 定 < code > spec.containers[].volumeMounts[].readOnly = true< / code > 和 < code > spec.containers[].volumeMounts[].mountPath< / code > 为 您 想 要 该 secret 出 现 的 尚 未 使 用 的 目 录 。 < / li >
< li > 修 改 您 的 镜 像 并 且 / 或 者 命 令 行 让 程 序 从 该 目 录 下 寻 找 文 件 。 Secret 的 < code > data< / code > 映 射 中 的 每 一 个 键 都 成 为 了 < code > mountPath< / code > 下 的 一 个 文 件 名 。 < / li >
< / ol >
< p > 这 是 一 个 在 pod 中 使 用 volume 挂 在 secret 的 例 子 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > redis
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/foo" < / span >
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > mysecret
< / code > < / pre >
< p > 您 想 要 用 的 每 个 secret 都 需 要 在 < code > spec.volumes< / code > 中 指 明 。 < / p >
< p > 如 果 pod 中 有 多 个 容 器 , 每 个 容 器 都 需 要 自 己 的 < code > volumeMounts< / code > 配 置 块 , 但 是 每 个 secret 只 需 要 一 个 < code > spec.volumes< / code > 。 < / p >
< p > 您 可 以 打 包 多 个 文 件 到 一 个 secret 中 , 或 者 使 用 的 多 个 secret, 怎 样 方 便 就 怎 样 来 。 < / p >
< p > < strong > 向 特 性 路 径 映 射 secret 密 钥 < / strong > < / p >
< p > 我 们 还 可 以 控 制 Secret key 映 射 在 volume 中 的 路 径 。 您 可 以 使 用 < code > spec.volumes[].secret.items< / code > 字 段 修 改 每 个 key 的 目 标 路 径 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > redis
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/foo" < / span >
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > items< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > key< / span > < span class = "token punctuation" > :< / span > username
< span class = "token key atrule" > path< / span > < span class = "token punctuation" > :< / span > my< span class = "token punctuation" > -< / span > group/my< span class = "token punctuation" > -< / span > username
< / code > < / pre >
< p > 将 会 发 生 什 么 呢 : < / p >
< ul >
< li > < code > username< / code > secret 存 储 在 < code > /etc/foo/my-group/my-username< / code > 文 件 中 而 不 是 < code > /etc/foo/username< / code > 中 。 < / li >
< li > < code > password< / code > secret 没 有 被 影 射 < / li >
< / ul >
< p > 如 果 使 用 了 < code > spec.volumes[].secret.items< / code > , 只 有 在 < code > items< / code > 中 指 定 的 key 被 影 射 。 要 使 用 secret 中 所 有 的 key, 所 有 这 些 都 必 须 列 在 < code > items< / code > 字 段 中 。 所 有 列 出 的 密 钥 必 须 存 在 于 相 应 的 secret 中 。 否 则 , 不 会 创 建 卷 。 < / p >
< p > < strong > Secret 文 件 权 限 < / strong > < / p >
< p > 您 还 可 以 指 定 secret 将 拥 有 的 权 限 模 式 位 文 件 。 如 果 不 指 定 , 默 认 使 用 < code > 0644< / code > 。 您 可 以 为 整 个 保 密 卷 指 定 默 认 模 式 , 如 果 需 要 , 可 以 覆 盖 每 个 密 钥 。 < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > redis
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/foo" < / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > defaultMode< / span > < span class = "token punctuation" > :< / span > < span class = "token number" > 256< / span >
< / code > < / pre >
< p > 然 后 , secret 将 被 挂 载 到 < code > /etc/foo< / code > 目 录 , 所 有 通 过 该 secret volume 挂 载 创 建 的 文 件 的 权 限 都 是 < code > 0400< / code > 。 < / p >
< p > 请 注 意 , JSON 规 范 不 支 持 八 进 制 符 号 , 因 此 使 用 256 值 作 为 0400 权 限 。 如 果 您 使 用 yaml 而 不 是 json 作 为 pod, 则 可 以 使 用 八 进 制 符 号 以 更 自 然 的 方 式 指 定 权 限 。 < / p >
< p > 您 还 可 以 是 用 映 射 , 如 上 一 个 示 例 , 并 为 不 同 的 文 件 指 定 不 同 的 权 限 , 如 下 所 示 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mypod
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > redis
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/foo" < / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > foo
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > items< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > key< / span > < span class = "token punctuation" > :< / span > username
< span class = "token key atrule" > path< / span > < span class = "token punctuation" > :< / span > my< span class = "token punctuation" > -< / span > group/my< span class = "token punctuation" > -< / span > username
< span class = "token key atrule" > mode< / span > < span class = "token punctuation" > :< / span > < span class = "token number" > 511< / span >
< / code > < / pre >
< p > 在 这 种 情 况 下 , 导 致 < code > /etc/foo/my-group/my-username< / code > 的 文 件 的 权 限 值 为 < code > 0777< / code > 。 由 于 JSON 限 制 , 必 须 以 十 进 制 格 式 指 定 模 式 。 < / p >
< p > 请 注 意 , 如 果 稍 后 阅 读 此 权 限 值 可 能 会 以 十 进 制 格 式 显 示 。 < / p >
< p > < strong > 从 Volume 中 消 费 secret 值 < / strong > < / p >
< p > 在 挂 载 的 secret volume 的 容 器 内 , secret key 将 作 为 文 件 , 并 且 secret 的 值 使 用 base-64 解 码 并 存 储 在 这 些 文 件 中 。 这 是 在 上 面 的 示 例 容 器 内 执 行 的 命 令 的 结 果 : < / p >
< pre class = "language-" > < code class = "lang-bash" > $ < span class = "token function" > ls< / span > /etc/foo/
username
password
$ < span class = "token function" > cat< / span > /etc/foo/username
admin
$ < span class = "token function" > cat< / span > /etc/foo/password
1f2d1e2e67df
< / code > < / pre >
< p > 容 器 中 的 程 序 负 责 从 文 件 中 读 取 secret。 < / p >
< p > < strong > 挂 载 的 secret 被 自 动 更 新 < / strong > < / p >
< p > 当 已 经 在 volume 中 消 被 消 费 的 secret 被 更 新 时 , 被 映 射 的 key 也 将 被 更 新 。 < / p >
< p > Kubelet 在 周 期 性 同 步 时 检 查 被 挂 载 的 secret 是 不 是 最 新 的 。 但 是 , 它 正 在 使 用 其 基 于 本 地 ttl 的 缓 存 来 获 取 当 前 的 secret 值 。 结 果 是 , 当 secret 被 更 新 的 时 刻 到 将 新 的 secret 映 射 到 pod 的 时 刻 的 总 延 迟 可 以 与 kubelet 中 的 secret 缓 存 的 kubelet sync period + ttl 一 样 长 。 < / p >
< h4 id = "secret-作为环境变量" > Secret 作 为 环 境 变 量 < / h4 >
< p > 将 secret 作 为 pod 中 的 环 境 变 量 使 用 : < / p >
< ol >
< li > 创 建 一 个 secret 或 者 使 用 一 个 已 存 在 的 secret。 多 个 pod 可 以 引 用 同 一 个 secret。 < / li >
< li > 在 每 个 容 器 中 修 改 您 想 要 使 用 secret key 的 Pod 定 义 , 为 要 使 用 的 每 个 secret key 添 加 一 个 环 境 变 量 。 消 费 secret key 的 环 境 变 量 应 填 充 secret 的 名 称 , 并 键 入 < code > env[x].valueFrom.secretKeyRef< / code > 。 < / li >
< li > 修 改 镜 像 并 / 或 者 命 令 行 , 以 便 程 序 在 指 定 的 环 境 变 量 中 查 找 值 。 < / li >
< / ol >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > env< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mycontainer
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > redis
< span class = "token key atrule" > env< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > SECRET_USERNAME
< span class = "token key atrule" > valueFrom< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretKeyRef< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > key< / span > < span class = "token punctuation" > :< / span > username
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > SECRET_PASSWORD
< span class = "token key atrule" > valueFrom< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretKeyRef< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > mysecret
< span class = "token key atrule" > key< / span > < span class = "token punctuation" > :< / span > password
< span class = "token key atrule" > restartPolicy< / span > < span class = "token punctuation" > :< / span > Never
< / code > < / pre >
< p > < strong > 消 费 环 境 变 量 里 的 Secret 值 < / strong > < / p >
< p > 在 一 个 消 耗 环 境 变 量 secret 的 容 器 中 , secret key 作 为 包 含 secret 数 据 的 base-64 解 码 值 的 常 规 环 境 变 量 。 这 是 从 上 面 的 示 例 在 容 器 内 执 行 的 命 令 的 结 果 : < / p >
< pre class = "language-" > < code class = "lang-bash" > $ < span class = "token builtin class-name" > echo< / span > < span class = "token variable" > $SECRET_USERNAME< / span >
admin
$ < span class = "token builtin class-name" > echo< / span > < span class = "token variable" > $SECRET_PASSWORD< / span >
1f2d1e2e67df
< / code > < / pre >
< h4 id = "使用-imagepullsecret" > 使 用 imagePullSecret< / h4 >
< p > imagePullSecret 是 将 包 含 Docker( 或 其 他 ) 镜 像 注 册 表 密 码 的 secret 传 递 给 Kubelet 的 一 种 方 式 , 因 此 可 以 代 表 您 的 pod 拉 取 私 有 镜 像 。 < / p >
< p > < strong > 手 动 指 定 imagePullSecret< / strong > < / p >
< p > imagePullSecret 的 使 用 在 < a href = "https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod" target = "_blank" > 镜 像 文 档 < / a > 中 说 明 。 < / p >
< h3 id = "安排-imagepullsecrets-自动附加" > 安 排 imagePullSecrets 自 动 附 加 < / h3 >
< p > 您 可 以 手 动 创 建 imagePullSecret, 并 从 serviceAccount 引 用 它 。 使 用 该 serviceAccount 创 建 的 任 何 pod 和 默 认 使 用 该 serviceAccount 的 pod 将 会 将 其 的 imagePullSecret 字 段 设 置 为 服 务 帐 户 的 imagePullSecret 字 段 。 有 关 该 过 程 的 详 细 说 明 , 请 参 阅 < a href = "https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#adding-imagepullsecrets-to-a-service-account" target = "_blank" > 将 ImagePullSecrets 添 加 到 服 务 帐 户 < / a > 。 < / p >
< h4 id = "自动挂载手动创建的-secret" > 自 动 挂 载 手 动 创 建 的 Secret< / h4 >
< p > 手 动 创 建 的 secret( 例 如 包 含 用 于 访 问 github 帐 户 的 令 牌 ) 可 以 根 据 其 服 务 帐 户 自 动 附 加 到 pod。 请 参 阅 < a href = "https://kubernetes.io/docs/tasks/run-application/podpreset" target = "_blank" > 使 用 PodPreset 向 Pod 中 注 入 信 息 < / a > 以 获 取 该 进 程 的 详 细 说 明 。 < / p >
< h2 id = "详细" > 详 细 < / h2 >
< h3 id = "限制" > 限 制 < / h3 >
< p > 验 证 secret volume 来 源 确 保 指 定 的 对 象 引 用 实 际 上 指 向 一 个 类 型 为 Secret 的 对 象 。 因 此 , 需 要 在 依 赖 于 它 的 任 何 pod 之 前 创 建 一 个 secret。 < / p >
< p > Secret API 对 象 驻 留 在 命 名 空 间 中 。 它 们 只 能 由 同 一 命 名 空 间 中 的 pod 引 用 。 < / p >
< p > 每 个 secret 的 大 小 限 制 为 1MB。 这 是 为 了 防 止 创 建 非 常 大 的 secret 会 耗 尽 apiserver 和 kubelet 的 内 存 。 然 而 , 创 建 许 多 较 小 的 secret 也 可 能 耗 尽 内 存 。 更 全 面 得 限 制 secret 对 内 存 使 用 的 更 全 面 的 限 制 是 计 划 中 的 功 能 。 < / p >
< p > Kubelet 仅 支 持 从 API server 获 取 的 Pod 使 用 secret。 这 包 括 使 用 kubectl 创 建 的 任 何 pod, 或 间 接 通 过 replication controller 创 建 的 pod。 它 不 包 括 通 过 kubelet < code > --manifest-url< / code > 标 志 , 其 < code > --config< / code > 标 志 或 其 REST API 创 建 的 pod( 这 些 不 是 创 建 pod 的 常 用 方 法 ) 。 < / p >
< p > 必 须 先 创 建 secret, 除 非 将 它 们 标 记 为 可 选 项 , 否 则 必 须 在 将 其 作 为 环 境 变 量 在 pod 中 使 用 之 前 创 建 secret。 对 不 存 在 的 secret 的 引 用 将 阻 止 其 启 动 。 < / p >
< p > 通 过 < code > secretKeyRef< / code > 对 不 存 在 于 命 名 的 key 中 的 key 进 行 引 用 将 阻 止 该 启 动 。 < / p >
< p > 用 于 通 过 < code > envFrom< / code > 填 充 环 境 变 量 的 secret, 这 些 环 境 变 量 具 有 被 认 为 是 无 效 环 境 变 量 名 称 的 key 将 跳 过 这 些 键 。 该 pod 将 被 允 许 启 动 。 将 会 有 一 个 事 件 , 其 原 因 是 < code > InvalidVariableNames< / code > , 该 消 息 将 包 含 被 跳 过 的 无 效 键 的 列 表 。 该 示 例 显 示 一 个 pod, 它 指 的 是 包 含 2个 无 效 键 , 1badkey 和 2alsobad 的 默 认 /mysecret ConfigMap。 < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl get events
LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON
0s 0s < span class = "token number" > 1< / span > dapi-test-pod Pod Warning InvalidEnvironmentVariableNames kubelet, < span class = "token number" > 127.0< / span > .0.1 Keys < span class = "token punctuation" > [< / span > 1badkey, 2alsobad< span class = "token punctuation" > ]< / span > from the EnvFrom secret default/mysecret were skipped since they are considered invalid environment variable names.
< / code > < / pre >
< h3 id = "secret-与-pod-生命周期的联系" > Secret 与 Pod 生 命 周 期 的 联 系 < / h3 >
< p > 通 过 API 创 建 的 Pod 时 , 不 会 检 查 应 用 的 secret 是 否 存 在 。 一 旦 Pod 被 调 度 , kubelet 就 会 尝 试 获 取 该 secret 的 值 。 如 果 获 取 不 到 该 secret, 或 者 暂 时 无 法 与 API server 建 立 连 接 , kubelet 将 会 定 期 重 试 。 Kubelet 将 会 报 告 关 于 pod 的 事 件 , 并 解 释 它 无 法 启 动 的 原 因 。 一 旦 获 取 的 secret, kubelet将 创 建 并 装 载 一 个 包 含 它 的 卷 。 在 安 装 所 有 pod的 卷 之 前 , 都 不 会 启 动 pod 的 容 器 。 < / p >
< h2 id = "使用案例" > 使 用 案 例 < / h2 >
< h3 id = "使用案例:包含-ssh-密钥的-pod" > 使 用 案 例 : 包 含 ssh 密 钥 的 pod< / h3 >
< p > 创 建 一 个 包 含 ssh key 的 secret: < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl create secret generic ssh-key-secret --from-file< span class = "token operator" > =< / span > ssh-privatekey< span class = "token operator" > =< / span > /path/to/.ssh/id_rsa --from-file< span class = "token operator" > =< / span > ssh-publickey< span class = "token operator" > =< / span > /path/to/.ssh/id_rsa.pub
< / code > < / pre >
< p > < strong > 安 全 性 注 意 事 项 < / strong > : 发 送 自 己 的 ssh 密 钥 之 前 要 仔 细 思 考 : 集 群 的 其 他 用 户 可 能 有 权 访 问 该 密 钥 。 使 用 您 想 要 共 享 Kubernetes 群 集 的 所 有 用 户 可 以 访 问 的 服 务 帐 户 , 如 果 它 们 遭 到 入 侵 , 可 以 撤 销 。 < / p >
< p > 现 在 我 们 可 以 创 建 一 个 使 用 ssh 密 钥 引 用 secret 的 pod, 并 在 一 个 卷 中 使 用 它 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > test< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > labels< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > test
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > ssh< span class = "token punctuation" > -< / span > key< span class = "token punctuation" > -< / span > secret
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > ssh< span class = "token punctuation" > -< / span > test< span class = "token punctuation" > -< / span > container
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > mySshImage
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/secret-volume" < / span >
< / code > < / pre >
< p > 当 容 器 中 的 命 令 运 行 时 , 密 钥 的 片 段 将 可 在 以 下 目 录 : < / p >
< pre class = "language-" > < code > /etc/secret-volume/ssh-publickey
/etc/secret-volume/ssh-privatekey
< / code > < / pre > < p > 然 后 容 器 可 以 自 由 使 用 密 钥 数 据 建 立 一 个 ssh 连 接 。 < / p >
< h3 id = "使用案例:包含-prodtest-凭据的-pod" > 使 用 案 例 : 包 含 prod/test 凭 据 的 pod< / h3 >
< p > 下 面 的 例 子 说 明 一 个 pod 消 费 一 个 包 含 prod 凭 据 的 secret, 另 一 个 pod 使 用 测 试 环 境 凭 据 消 费 secret。 < / p >
< p > 创 建 secret: < / p >
< pre class = "language-" > < code class = "lang-bash" > $ kubectl create secret generic prod-db-secret --from-literal< span class = "token operator" > =< / span > username< span class = "token operator" > =< / span > produser --from-literal< span class = "token operator" > =< / span > password< span class = "token operator" > =< / span > Y4nys7f11
secret < span class = "token string" > " prod-db-secret" < / span > created
$ kubectl create secret generic test-db-secret --from-literal< span class = "token operator" > =< / span > username< span class = "token operator" > =< / span > testuser --from-literal< span class = "token operator" > =< / span > password< span class = "token operator" > =< / span > iluvtests
secret < span class = "token string" > " test-db-secret" < / span > created
< / code > < / pre >
< p > 创 建 pod : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > List
< span class = "token key atrule" > items< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > labels< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > secret
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > container
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > myClientImage
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/secret-volume" < / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > test< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > labels< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > test< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > test< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > secret
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > container
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > myClientImage
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/secret-volume" < / span >
< / code > < / pre >
< p > 这 两 个 容 器 将 在 其 文 件 系 统 上 显 示 以 下 文 件 , 其 中 包 含 每 个 容 器 环 境 的 值 : < / p >
< pre class = "language-" > < code > /etc/secret-volume/username
/etc/secret-volume/password
< / code > < / pre > < p > 请 注 意 , 两 个 pod 的 spec 配 置 中 仅 有 一 个 字 段 有 所 不 同 ; 这 有 助 于 使 用 普 通 的 pod 配 置 模 板 创 建 具 有 不 同 功 能 的 pod。 您 可 以 使 用 两 个 service account 进 一 步 简 化 基 本 pod spec: 一 个 名 为 < code > prod-user< / code > 拥 有 < code > prod-db-secret< / code > , 另 一 个 称 为 < code > test-user< / code > 拥 有 < code > test-db-secret< / code > 。 然 后 , pod spec 可 以 缩 短 为 , 例 如 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > labels< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > serviceAccount< / span > < span class = "token punctuation" > :< / span > prod< span class = "token punctuation" > -< / span > db< span class = "token punctuation" > -< / span > client
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > db< span class = "token punctuation" > -< / span > client< span class = "token punctuation" > -< / span > container
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > myClientImage
< / code > < / pre >
< h3 id = "使用案例:secret-卷中以点号开头的文件" > 使 用 案 例 : secret 卷 中 以 点 号 开 头 的 文 件 < / h3 >
< p > 为 了 将 数 据 “ 隐 藏 ” 起 来 ( 即 文 件 名 以 点 号 开 头 的 文 件 ) , 简 单 地 说 让 该 键 以 一 个 点 开 始 。 例 如 , 当 如 下 secret 被 挂 载 到 卷 中 : < / p >
< pre class = "language-" > < code class = "lang-yaml" > < span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Secret
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > dotfile< span class = "token punctuation" > -< / span > secret
< span class = "token key atrule" > data< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > .secret-file< / span > < span class = "token punctuation" > :< / span > dmFsdWUtMg0KDQo=
< span class = "token punctuation" > ---< / span >
< span class = "token key atrule" > kind< / span > < span class = "token punctuation" > :< / span > Pod
< span class = "token key atrule" > apiVersion< / span > < span class = "token punctuation" > :< / span > v1
< span class = "token key atrule" > metadata< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > dotfiles< span class = "token punctuation" > -< / span > pod
< span class = "token key atrule" > spec< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > volumes< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > secret< / span > < span class = "token punctuation" > :< / span >
< span class = "token key atrule" > secretName< / span > < span class = "token punctuation" > :< / span > dotfile< span class = "token punctuation" > -< / span > secret
< span class = "token key atrule" > containers< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > dotfile< span class = "token punctuation" > -< / span > test< span class = "token punctuation" > -< / span > container
< span class = "token key atrule" > image< / span > < span class = "token punctuation" > :< / span > gcr.io/google_containers/busybox
< span class = "token key atrule" > command< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > ls
< span class = "token punctuation" > -< / span > < span class = "token string" > " -l" < / span >
< span class = "token punctuation" > -< / span > < span class = "token string" > " /etc/secret-volume" < / span >
< span class = "token key atrule" > volumeMounts< / span > < span class = "token punctuation" > :< / span >
< span class = "token punctuation" > -< / span > < span class = "token key atrule" > name< / span > < span class = "token punctuation" > :< / span > secret< span class = "token punctuation" > -< / span > volume
< span class = "token key atrule" > readOnly< / span > < span class = "token punctuation" > :< / span > < span class = "token boolean important" > true< / span >
< span class = "token key atrule" > mountPath< / span > < span class = "token punctuation" > :< / span > < span class = "token string" > " /etc/secret-volume" < / span >
< / code > < / pre >
< p > < code > Secret-volume< / code > 将 包 含 一 个 单 独 的 文 件 , 叫 做 < code > .secret-file< / code > , < code > dotfile-test-container< / code > 的 < code > /etc/secret-volume/.secret-file< / code > 路 径 下 将 有 该 文 件 。 < / p >
< p > < strong > 注 意 < / strong > < / p >
< p > 以 点 号 开 头 的 文 件 在 < code > ls -l< / code > 的 输 出 中 被 隐 藏 起 来 了 ; 列 出 目 录 内 容 时 , 必 须 使 用 < code > ls -la< / code > 才 能 查 看 它 们 。 < / p >
< h3 id = "使用案例:secret-仅对-pod-中的一个容器可见" > 使 用 案 例 : Secret 仅 对 pod 中 的 一 个 容 器 可 见 < / h3 >
< p > 考 虑 以 下 一 个 需 要 处 理 HTTP 请 求 的 程 序 , 执 行 一 些 复 杂 的 业 务 逻 辑 , 然 后 使 用 HMAC 签 署 一 些 消 息 。 因 为 它 具 有 复 杂 的 应 用 程 序 逻 辑 , 所 以 在 服 务 器 中 可 能 会 出 现 一 个 未 被 注 意 的 远 程 文 件 读 取 漏 洞 , 这 可 能 会 将 私 钥 暴 露 给 攻 击 者 。 < / p >
< p > 这 可 以 在 两 个 容 器 中 分 为 两 个 进 程 : 前 端 容 器 , 用 于 处 理 用 户 交 互 和 业 务 逻 辑 , 但 无 法 看 到 私 钥 ; 以 及 可 以 看 到 私 钥 的 签 名 者 容 器 , 并 且 响 应 来 自 前 端 的 简 单 签 名 请 求 ( 例 如 通 过 本 地 主 机 网 络 ) 。 < / p >
< p > 使 用 这 种 分 割 方 法 , 攻 击 者 现 在 必 须 欺 骗 应 用 程 序 服 务 器 才 能 进 行 任 意 的 操 作 , 这 可 能 比 使 其 读 取 文 件 更 难 。 < / p >
< h2 id = "最佳实践" > 最 佳 实 践 < / h2 >
< h3 id = "客户端使用-secret-api" > 客 户 端 使 用 secret API< / h3 >
< p > 当 部 署 与 secret API 交 互 的 应 用 程 序 时 , 应 使 用 诸 如 < a href = "https://kubernetes.io/docs/admin/authorization/rbac/" target = "_blank" > RBAC< / a > 之 类 的 < a href = "https://kubernetes.io/docs/admin/authorization/" target = "_blank" > 授 权 策 略 < / a > 来 限 制 访 问 。 < / p >
< p > Secret 的 重 要 性 通 常 不 尽 相 同 , 其 中 许 多 可 能 只 对 Kubernetes 集 群 内 ( 例 如 service account 令 牌 ) 和 对 外 部 系 统 造 成 影 响 。 即 使 一 个 应 用 程 序 可 以 理 解 其 期 望 的 与 之 交 互 的 secret 的 权 力 , 但 是 同 一 命 名 空 间 中 的 其 他 应 用 程 序 也 可 以 使 这 些 假 设 无 效 。 < / p >
< p > 由 于 这 些 原 因 , 在 命 名 空 间 中 < code > watch< / code > 和 < code > list< / code > secret 的 请 求 是 非 常 强 大 的 功 能 , 应 该 避 免 这 样 的 行 为 , 因 为 列 出 secret 可 以 让 客 户 端 检 查 所 有 secret 是 否 在 该 命 名 空 间 中 。 在 群 集 中 < code > watch< / code > 和 < code > list< / code > 所 有 secret 的 能 力 应 该 只 保 留 给 最 有 特 权 的 系 统 级 组 件 。 < / p >
< p > 需 要 访 问 secrets API 的 应 用 程 序 应 该 根 据 他 们 需 要 的 secret 执 行 < code > get< / code > 请 求 。 这 允 许 管 理 员 限 制 对 所 有 secret 的 访 问 , 同 时 设 置 < a href = "https://kubernetes.io/docs/admin/authorization/rbac/#referring-to-resources" target = "_blank" > 白 名 单 访 问 < / a > 应 用 程 序 需 要 的 各 个 实 例 。 < / p >
< p > 为 了 提 高 循 环 获 取 的 性 能 , 客 户 端 可 以 设 计 引 用 secret 的 资 源 , 然 后 < code > watch< / code > 资 源 , 在 引 用 更 改 时 重 新 请 求 secret。 < / p >
< h2 id = "安全属性" > 安 全 属 性 < / h2 >
< h3 id = "保护" > 保 护 < / h3 >
< p > 因 为 < code > secret< / code > 对 象 可 以 独 立 于 使 用 它 们 的 < code > pod< / code > 而 创 建 , 所 以 在 创 建 、 查 看 和 编 辑 pod 的 流 程 中 secret 被 暴 露 的 风 险 较 小 。 系 统 还 可 以 对 < code > secret< / code > 对 象 采 取 额 外 的 预 防 措 施 , 例 如 避 免 将 其 写 入 到 磁 盘 中 可 能 的 位 置 。 < / p >
< p > 只 有 当 节 点 上 的 pod 需 要 用 到 该 secret 时 , 该 secret 才 会 被 发 送 到 该 节 点 上 。 它 不 会 被 写 入 磁 盘 , 而 是 存 储 在 tmpfs 中 。 一 旦 依 赖 于 它 的 pod 被 删 除 , 它 就 被 删 除 。 < / p >
< p > 在 大 多 数 Kubernetes 项 目 维 护 的 发 行 版 中 , 用 户 与 API server 之 间 的 通 信 以 及 从 API server 到 kubelet 的 通 信 都 受 到 SSL/TLS 的 保 护 。 通 过 这 些 通 道 传 输 时 , secret 受 到 保 护 。 < / p >
< p > 节 点 上 的 secret 数 据 存 储 在 tmpfs 卷 中 , 因 此 不 会 传 到 节 点 上 的 其 他 磁 盘 。 < / p >
< p > 同 一 节 点 上 的 很 多 个 pod 可 能 拥 有 多 个 secret。 但 是 , 只 有 pod 请 求 的 secret 在 其 容 器 中 才 是 可 见 的 。 因 此 , 一 个 pod 不 能 访 问 另 一 个 Pod 的 secret。 < / p >
< p > Pod 中 有 多 个 容 器 。 但 是 , pod 中 的 每 个 容 器 必 须 请 求 其 挂 载 卷 中 的 secret 卷 才 能 在 容 器 内 可 见 。 这 可 以 用 于 < a href = "https://kubernetes.io/docs/concepts/configuration/secret#use-case-secret-visible-to-one-container-in-a-pod" target = "_blank" > 在 Pod 级 别 构 建 安 全 分 区 < / a > 。 < / p >
< h3 id = "风险" > 风 险 < / h3 >
< ul >
< li > API server 的 secret 数 据 以 纯 文 本 的 方 式 存 储 在 etcd 中 ; 因 此 : < ul >
< li > 管 理 员 应 该 限 制 admin 用 户 访 问 etcd; < / li >
< li > API server 中 的 secret 数 据 位 于 etcd 使 用 的 磁 盘 上 ; 管 理 员 可 能 希 望 在 不 再 使 用 时 擦 除 /粉 碎 etcd 使 用 的 磁 盘 < / li >
< / ul >
< / li >
< li > 如 果 您 将 secret 数 据 编 码 为 base64 的 清 单 ( JSON 或 YAML) 文 件 , 共 享 该 文 件 或 将 其 检 入 代 码 库 , 这 样 的 话 该 密 码 将 会 被 泄 露 。 Base64 编 码 不 是 一 种 加 密 方 式 , 一 样 也 是 纯 文 本 。 < / li >
< li > 应 用 程 序 在 从 卷 中 读 取 secret 后 仍 然 需 要 保 护 secret 的 值 , 例 如 不 会 意 外 记 录 或 发 送 给 不 信 任 方 。 < / li >
< li > 可 以 创 建 和 使 用 secret 的 pod 的 用 户 也 可 以 看 到 该 secret 的 值 。 即 使 API server 策 略 不 允 许 用 户 读 取 secret 对 象 , 用 户 也 可 以 运 行 暴 露 secret 的 pod。 < / li >
< li > 如 果 运 行 了 多 个 副 本 , 那 么 这 些 secret 将 在 它 们 之 间 共 享 。 默 认 情 况 下 , etcd 不 能 保 证 与 SSL/TLS 的 对 等 通 信 , 尽 管 可 以 进 行 配 置 。 < / li >
< li > 目 前 , 任 何 节 点 的 root 用 户 都 可 以 通 过 模 拟 kubelet 来 读 取 API server 中 的 任 何 secret。 只 有 向 实 际 需 要 它 们 的 节 点 发 送 secret 才 能 限 制 单 个 节 点 的 根 漏 洞 的 影 响 , 该 功 能 还 在 计 划 中 。 < / li >
< / ul >
< p > 原 文 地 址 : < a href = "https://github.com/rootsongjc/kubernetes.github.io/blob/master/docs/concepts/configuration/secret.md" target = "_blank" > https://github.com/rootsongjc/kubernetes.github.io/blob/master/docs/concepts/configuration/secret.md< / a > < / p >
2020-11-18 19:26:50 +08:00
< footer class = "page-footer" > < span class = "copyright" > < a href = "https://mp.weixin.qq.com/s/vWlSdzz2MNdXRr0sd2-LFg" target = "_blank" > 加 入 云 原 生 社 区 < / a > < p > < / p > Copyright © 2017-2020 | Distributed under < a href = "https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target = "_blank" > CC BY 4.0< / a > | < a href = "https://jimmysong.io" target = "_blank" > jimmysong.io< / a > all right reserved, powered by Gitbook< / span > < span class = "footer-modification" > Updated at
2021-02-25 22:34:12 +08:00
2021-02-25 14:28:52
2020-06-19 14:52:56 +08:00
< / span > < / footer >
< / section >
< / div >
< div class = "search-results" >
< div class = "has-results" >
< h1 class = "search-results-title" > < span class = 'search-results-count' > < / span > results matching "< span class = 'search-query' > < / span > "< / h1 >
< ul class = "search-results-list" > < / ul >
< / div >
< div class = "no-results" >
< h1 class = "search-results-title" > No results matching "< span class = 'search-query' > < / span > "< / h1 >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< a href = "configure-pod-service-account.html" class = "navigation navigation-prev " aria-label = "Previous page: 配置 Pod 的 Service Account" >
< i class = "fa fa-angle-left" > < / i >
< / a >
< a href = "resource-quota-management.html" class = "navigation navigation-next " aria-label = "Next page: 管理 namespace 中的资源配额" >
< i class = "fa fa-angle-right" > < / i >
< / a >
< / div >
< script >
var gitbook = gitbook || [];
gitbook.push(function() {
2021-02-25 22:34:12 +08:00
gitbook.page.hasChanged({"page":{"title":"Secret 配置","level":"4.2.3","depth":2,"next":{"title":"管理 namespace 中的资源配额","level":"4.2.4","depth":2,"path":"guide/resource-quota-management.md","ref":"guide/resource-quota-management.md","articles":[]},"previous":{"title":"配置 Pod 的 Service Account","level":"4.2.2","depth":2,"path":"guide/configure-pod-service-account.md","ref":"guide/configure-pod-service-account.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","codesnippet","splitter","page-toc-button","image-captions","editlink","back-to-top-button","-lunr","-search","search-plus","github-buttons@2.1.0","favicon@^0.0.2","tbfed-pagefooter@^0.0.1","3-ba","theme-default","-highlight","prism","prism-themes","sitemap-general","lightbox","ga","alerts"],"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"< a href = https://mp.weixin.qq.com/s/vWlSdzz2MNdXRr0sd2-LFg > 加入云原生社区< / a > < / p > Copyright © 2017-2020 | Distributed under < a href = https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh > CC BY 4.0< / a > | < a href = https://jimmysong.io > jimmysong.io< / a > ","modify_label":" Updated at ","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-ghcolors.css"]},"github":{"url":"https://github.com/rootsongjc/kubernetes-handbook"},"editlink":{"label":"编辑本页","multilingual":false,"base":"https://github.com/rootsongjc/kubernetes-handbook/blob/master/"},"splitter":{},"codesnippet":{},"sitemap-general":{"prefix":"https://jimmysong.io/kubernetes-handbook/"},"fontsettings":{"theme":"white","family":"sans","size":2},"favicon":{"shortcut":"favicon.ico","bookmark":"favicon.ico"},"lightbox":{"jquery":true,"sameUuid":false},"page-toc-button":{},"back-to-top-button":{},"prism-themes":{},"alerts":{},"github-buttons":{"repo":"rootsongjc/kubernetes-handbook","types":["star"],"size":"small"},"3-ba":{"configuration":"auto","token":"11f7d254cfa4e0ca44b175c66d379ecc"},"ga":{"configuration":"auto","token":"UA-93485976-1"},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"showLevel":true,"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}},"search-plus":{},"image-captions":{"caption":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_: _CAPTION_","variable_name":"_pictures"}},"theme":"default","author":"Jimmy Song( 宋净超) ","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"_pictures":[{"backlink":"index.html#fig1.1.1","level":"1.1","list_caption":"Figure: Stargazers over time","alt":"Stargazers over time","nro":1,"url":"https://starcharts.herokuapp.com/rootsongjc/kubernetes-handbook.svg","index":1,"caption_template":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_: _CAPTION_","label":"Stargazers over time","attributes":{},"skip":false,"key":"1.1.1"},{"backlink":"cloud-native/play-with-kubernetes.html#fig2.4.1","level":"2.4","list_caption":"Figure: Play with Kubernetes网页截图","alt":"Play with Kubernetes网页截图","nro":2,"url":"../images/play-with-kubernetes.jpg","index":1,"caption_template":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_: _CAPTION_","label":"Play with Kubernetes网页截图","attributes":{},"skip":false,"key":"2.4.1"},{"backlink":"cloud-native/cloud-native-local-quick-start.html#fig2.5.1","level":"2.5","list_caption":"Figure: Kubernetes dashboard","alt":"Kubernetes dashboard","nro":3,"url":"https://github.com/rootsongjc/kubernetes-vagrant-centos-cluster/raw/master/images/dashboard-animation.gif","index":1,"caption_template":"图
2020-06-19 14:52:56 +08:00
});
< / script >
< / div >
< script src = "../gitbook/gitbook.js" > < / script >
< script src = "../gitbook/theme.js" > < / script >
< script src = "../gitbook/gitbook-plugin-github/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-splitter/splitter.js" > < / script >
< script src = "../gitbook/gitbook-plugin-page-toc-button/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-editlink/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-back-to-top-button/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js" > < / script >
< script src = "../gitbook/gitbook-plugin-search-plus/search.js" > < / script >
< script src = "../gitbook/gitbook-plugin-github-buttons/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-3-ba/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js" > < / script >
< script src = "../gitbook/gitbook-plugin-ga/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-alerts/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-sharing/buttons.js" > < / script >
< script src = "../gitbook/gitbook-plugin-fontsettings/fontsettings.js" > < / script >
< / body >
< / html >