2017-09-14 15:57:50 +08:00
<!DOCTYPE HTML>
2017-09-19 22:01:07 +08:00
< html lang = "zh-hans" >
2017-09-14 15:57:50 +08:00
< head >
< meta charset = "UTF-8" >
< meta content = "text/html; charset=utf-8" http-equiv = "Content-Type" >
2017-12-30 10:37:40 +08:00
< title > 运行支持Kubernetes原生调度的Spark程序 · Kubernetes Handbook - jimmysong.io< / title >
2017-09-14 15:57:50 +08:00
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" / >
< meta name = "description" content = "" >
< meta name = "generator" content = "GitBook 3.2.2" >
< 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" >
2017-10-09 15:28:05 +08:00
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-back-to-top-button/plugin.css" >
2017-09-14 15:57:50 +08:00
2017-10-09 15:28:05 +08:00
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-search-plus/search.css" >
2017-09-19 21:38:03 +08:00
2017-10-09 15:28:05 +08:00
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css" >
2017-09-14 15:57:50 +08:00
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-highlight/website.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-fontsettings/website.css" >
2017-10-09 15:28:05 +08:00
2017-09-14 15:57:50 +08:00
< 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 = "serverless.html" / >
< link rel = "prev" href = "spark-standalone-on-kubernetes.html" / >
2017-10-09 15:28:05 +08:00
< 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 >
2017-09-14 15:57:50 +08:00
< / head >
< body >
< div class = "book" >
< div class = "book-summary" >
< div id = "book-search-input" role = "search" >
2017-09-19 22:01:07 +08:00
< input type = "text" placeholder = "输入并搜索" / >
2017-09-14 15:57:50 +08:00
< / div >
< nav role = "navigation" >
< ul class = "summary" >
2017-10-09 15:28:05 +08:00
< li >
2017-11-15 21:18:59 +08:00
< a href = "https://jimmysong.io" target = "_blank" class = "custom-link" > Jimmy Song< / a >
2017-10-09 15:28:05 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-10-09 15:28:05 +08:00
< li class = "divider" > < / li >
2017-09-14 15:57:50 +08:00
2017-11-15 21:18:59 +08:00
< li class = "header" > 前言< / li >
2017-09-14 15:57:50 +08:00
< li class = "chapter " data-level = "1.1" data-path = "../" >
< a href = "../" >
2017-11-15 21:18:59 +08:00
< b > 1.1.< / b >
2017-10-20 10:51:14 +08:00
序言
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "header" > 云原生< / li >
2018-01-21 20:30:36 +08:00
< li class = "chapter " data-level = "2.1" data-path = "../cloud-native/play-with-kubernetes.html" >
2017-10-20 10:51:14 +08:00
2018-01-21 20:30:36 +08:00
< a href = "../cloud-native/play-with-kubernetes.html" >
2017-10-20 10:51:14 +08:00
2017-12-20 17:27:16 +08:00
< b > 2.1.< / b >
2017-11-15 21:18:59 +08:00
2018-01-21 20:30:36 +08:00
Play with Kubernetes
< / a >
< / li >
< li class = "chapter " data-level = "2.2" data-path = "../cloud-native/kubernetes-and-cloud-native-app-overview.html" >
< a href = "../cloud-native/kubernetes-and-cloud-native-app-overview.html" >
< b > 2.2.< / b >
2017-11-15 21:18:59 +08:00
Kubernetes与云原生应用概览
2017-10-20 10:51:14 +08:00
< / a >
2017-12-20 19:27:32 +08:00
< / li >
2018-01-21 20:30:36 +08:00
< li class = "chapter " data-level = "2.3" data-path = "../cloud-native/from-kubernetes-to-cloud-native.html" >
2017-12-20 19:27:32 +08:00
< a href = "../cloud-native/from-kubernetes-to-cloud-native.html" >
2018-01-21 20:30:36 +08:00
< b > 2.3.< / b >
2017-12-20 19:27:32 +08:00
云原生应用之路——从Kubernetes到Cloud Native
< / a >
2017-10-20 10:51:14 +08:00
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 概念与原理< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.1" data-path = "../concepts/" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/" >
2017-12-20 17:27:16 +08:00
< b > 3.1.< / b >
2017-11-15 21:18:59 +08:00
Kubernetes架构
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.2" data-path = "../concepts/concepts.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/concepts.html" >
2017-12-20 17:27:16 +08:00
< b > 3.2.< / b >
2017-11-15 21:18:59 +08:00
设计理念
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3" data-path = "../concepts/objects.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/objects.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.< / b >
2017-11-15 21:18:59 +08:00
资源对象与基本概念解析
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1" data-path = "../concepts/pod-overview.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/pod-overview.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.< / b >
2017-11-15 21:18:59 +08:00
Pod
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.1" data-path = "../concepts/pod.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/pod.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.1.< / b >
2017-11-15 21:18:59 +08:00
Pod解析
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.2" data-path = "../concepts/init-containers.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/init-containers.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.2.< / b >
2017-11-15 21:18:59 +08:00
Init容器
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.3" data-path = "../concepts/pod-security-policy.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/pod-security-policy.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.3.< / b >
2017-11-15 21:18:59 +08:00
Pod安全策略
2017-09-14 15:57:50 +08:00
< / a >
2017-09-17 15:39:26 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.4" data-path = "../concepts/pod-lifecycle.html" >
2017-09-17 15:39:26 +08:00
< a href = "../concepts/pod-lifecycle.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.4.< / b >
2017-11-15 21:18:59 +08:00
Pod的生命周期
2017-09-17 15:39:26 +08:00
< / a >
2017-11-24 22:59:46 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.5" data-path = "../concepts/pod-hook.html" >
2017-11-24 22:59:46 +08:00
< a href = "../concepts/pod-hook.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.5.< / b >
2017-11-24 22:59:46 +08:00
2017-12-27 12:29:33 +08:00
Pod Hook
2017-11-24 22:59:46 +08:00
< / a >
2017-12-11 10:47:19 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.1.6" data-path = "../concepts/pod-preset.html" >
2017-12-11 10:47:19 +08:00
< a href = "../concepts/pod-preset.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.1.6.< / b >
2017-12-11 10:47:19 +08:00
Pod Preset
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.2" data-path = "../concepts/node.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/node.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.2.< / b >
2017-11-15 21:18:59 +08:00
Node
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.3" data-path = "../concepts/namespace.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/namespace.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.3.< / b >
2017-11-15 21:18:59 +08:00
Namespace
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.4" data-path = "../concepts/service.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/service.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.4.< / b >
2017-11-15 21:18:59 +08:00
Service
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.5" data-path = "../concepts/volume.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/volume.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.5.< / b >
2017-11-15 21:18:59 +08:00
Volume和Persistent Volume
2017-09-14 15:57:50 +08:00
< / a >
2018-01-08 17:26:29 +08:00
< ul class = "articles" >
< li class = "chapter " data-level = "3.3.5.1" data-path = "../concepts/persistent-volume.html" >
< a href = "../concepts/persistent-volume.html" >
< b > 3.3.5.1.< / b >
Persistent Volume( 持久化卷)
< / a >
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.6" data-path = "../concepts/deployment.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/deployment.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.6.< / b >
2017-11-15 21:18:59 +08:00
Deployment
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.7" data-path = "../concepts/secret.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/secret.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.7.< / b >
2017-11-15 21:18:59 +08:00
Secret
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.8" data-path = "../concepts/statefulset.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/statefulset.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.8.< / b >
2017-11-15 21:18:59 +08:00
StatefulSet
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.9" data-path = "../concepts/daemonset.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/daemonset.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.9.< / b >
2017-11-15 21:18:59 +08:00
DaemonSet
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.10" data-path = "../concepts/serviceaccount.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/serviceaccount.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.10.< / b >
2017-11-15 21:18:59 +08:00
ServiceAccount
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.11" data-path = "../concepts/replicaset.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/replicaset.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.11.< / b >
2017-11-15 21:18:59 +08:00
ReplicationController和ReplicaSet
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.12" data-path = "../concepts/job.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/job.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.12.< / b >
2017-11-15 21:18:59 +08:00
Job
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.13" data-path = "../concepts/cronjob.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/cronjob.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.13.< / b >
2017-11-15 21:18:59 +08:00
CronJob
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.14" data-path = "../concepts/ingress.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/ingress.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.14.< / b >
2017-11-15 21:18:59 +08:00
Ingress
2017-09-14 15:57:50 +08:00
< / a >
2017-11-30 16:59:17 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.14.1" data-path = "../concepts/traefik-ingress-controller.html" >
2017-11-30 16:59:17 +08:00
< a href = "../concepts/traefik-ingress-controller.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.14.1.< / b >
2017-11-30 16:59:17 +08:00
Traefik Ingress Controller
< / a >
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.15" data-path = "../concepts/configmap.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/configmap.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.15.< / b >
2017-11-15 21:18:59 +08:00
ConfigMap
2017-09-14 15:57:50 +08:00
< / a >
2017-11-08 19:28:16 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.15.1" data-path = "../concepts/configmap-hot-update.html" >
2017-11-08 19:28:16 +08:00
< a href = "../concepts/configmap-hot-update.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.15.1.< / b >
2017-11-15 21:18:59 +08:00
ConfigMap的热更新
2017-11-08 19:28:16 +08:00
< / a >
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.16" data-path = "../concepts/horizontal-pod-autoscaling.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/horizontal-pod-autoscaling.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.16.< / b >
2017-11-15 21:18:59 +08:00
Horizontal Pod Autoscaling
2017-09-14 15:57:50 +08:00
< / a >
2017-11-27 19:36:05 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.16.1" data-path = "../concepts/custom-metrics-hpa.html" >
2017-11-27 19:36:05 +08:00
< a href = "../concepts/custom-metrics-hpa.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.16.1.< / b >
2017-11-27 19:36:05 +08:00
自定义指标HPA
< / a >
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.17" data-path = "../concepts/label.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/label.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.17.< / b >
2017-11-15 21:18:59 +08:00
Label
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.18" data-path = "../concepts/garbage-collection.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/garbage-collection.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.18.< / b >
2017-11-15 21:18:59 +08:00
垃圾收集
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.19" data-path = "../concepts/network-policy.html" >
2017-09-14 15:57:50 +08:00
< a href = "../concepts/network-policy.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.19.< / b >
2017-11-15 21:18:59 +08:00
NetworkPolicy
2017-09-14 15:57:50 +08:00
< / a >
2017-11-09 16:48:38 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.20" data-path = "../concepts/annotation.html" >
2017-11-09 16:48:38 +08:00
< a href = "../concepts/annotation.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.20.< / b >
2017-11-15 21:18:59 +08:00
Annotation
2017-11-09 16:48:38 +08:00
< / a >
2017-11-27 19:36:05 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.21" data-path = "../concepts/aggregated-api-server.html" >
2017-11-27 19:36:05 +08:00
< a href = "../concepts/aggregated-api-server.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.21.< / b >
2017-11-27 19:36:05 +08:00
Aggregated API Server
< / a >
2017-11-28 11:57:57 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.22" data-path = "../concepts/custom-resource.html" >
2017-11-28 11:57:57 +08:00
< a href = "../concepts/custom-resource.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.22.< / b >
2017-11-28 11:57:57 +08:00
2017-12-01 19:12:26 +08:00
使用自定义资源扩展API
2017-11-28 11:57:57 +08:00
< / a >
2017-12-14 19:41:46 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "3.3.23" data-path = "../concepts/apiservice.html" >
2017-12-14 19:41:46 +08:00
< a href = "../concepts/apiservice.html" >
2017-12-20 17:27:16 +08:00
< b > 3.3.23.< / b >
2017-12-14 19:41:46 +08:00
APIService
< / a >
2018-01-10 17:30:31 +08:00
< / li >
< li class = "chapter " data-level = "3.3.24" data-path = "../concepts/taint-and-toleration.html" >
< a href = "../concepts/taint-and-toleration.html" >
< b > 3.3.24.< / b >
Taint和Toleration( 污点和容忍)
< / a >
2018-01-19 17:02:44 +08:00
< / li >
< li class = "chapter " data-level = "3.3.25" data-path = "../concepts/pod-disruption-budget.html" >
< a href = "../concepts/pod-disruption-budget.html" >
< b > 3.3.25.< / b >
Pod中断与PDB( Pod中断预算)
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 用户指南< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.1" data-path = "../guide/" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/" >
2017-12-20 17:27:16 +08:00
< b > 4.1.< / b >
2017-11-15 21:18:59 +08:00
用户指南
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.2" data-path = "../guide/resource-configuration.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/resource-configuration.html" >
2017-12-20 17:27:16 +08:00
< b > 4.2.< / b >
2017-11-15 21:18:59 +08:00
资源对象配置
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.2.1" data-path = "../guide/configure-liveness-readiness-probes.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/configure-liveness-readiness-probes.html" >
2017-12-20 17:27:16 +08:00
< b > 4.2.1.< / b >
2017-11-15 21:18:59 +08:00
配置Pod的liveness和readiness探针
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.2.2" data-path = "../guide/configure-pod-service-account.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/configure-pod-service-account.html" >
2017-12-20 17:27:16 +08:00
< b > 4.2.2.< / b >
2017-11-15 21:18:59 +08:00
配置Pod的Service Account
2017-09-14 15:57:50 +08:00
< / a >
2017-09-28 21:20:49 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.2.3" data-path = "../guide/secret-configuration.html" >
2017-09-28 21:20:49 +08:00
< a href = "../guide/secret-configuration.html" >
2017-12-20 17:27:16 +08:00
< b > 4.2.3.< / b >
2017-11-15 21:18:59 +08:00
Secret配置
2017-09-28 21:20:49 +08:00
< / a >
2017-10-10 14:51:45 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.2.4" data-path = "../guide/resource-quota-management.html" >
2017-10-10 14:51:45 +08:00
< a href = "../guide/resource-quota-management.html" >
2017-12-20 17:27:16 +08:00
< b > 4.2.4.< / b >
2017-11-15 21:18:59 +08:00
管理namespace中的资源配额
2017-10-10 14:51:45 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.3" data-path = "../guide/command-usage.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/command-usage.html" >
2017-12-20 17:27:16 +08:00
< b > 4.3.< / b >
2017-11-15 21:18:59 +08:00
命令使用
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.3.1" data-path = "../guide/docker-cli-to-kubectl.html" >
2017-11-03 17:48:10 +08:00
< a href = "../guide/docker-cli-to-kubectl.html" >
2017-12-20 17:27:16 +08:00
< b > 4.3.1.< / b >
2017-11-15 21:18:59 +08:00
docker用户过度到kubectl命令行指南
2017-11-03 17:48:10 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.3.2" data-path = "../guide/using-kubectl.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/using-kubectl.html" >
2017-12-20 17:27:16 +08:00
< b > 4.3.2.< / b >
2017-11-15 21:18:59 +08:00
kubectl命令概览
2017-09-14 15:57:50 +08:00
< / a >
2017-09-16 20:56:43 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.3.3" data-path = "../guide/kubectl-cheatsheet.html" >
2017-09-16 20:56:43 +08:00
2017-11-03 17:48:10 +08:00
< a href = "../guide/kubectl-cheatsheet.html" >
2017-09-16 20:56:43 +08:00
2017-12-20 17:27:16 +08:00
< b > 4.3.3.< / b >
2017-11-15 21:18:59 +08:00
kubectl命令技巧大全
2017-09-16 20:56:43 +08:00
< / a >
2017-11-23 13:06:23 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.3.4" data-path = "../guide/using-etcdctl-to-access-kubernetes-data.html" >
2017-11-23 13:06:23 +08:00
< a href = "../guide/using-etcdctl-to-access-kubernetes-data.html" >
2017-12-20 17:27:16 +08:00
< b > 4.3.4.< / b >
2017-11-23 13:06:23 +08:00
2017-12-25 18:15:30 +08:00
使用etcdctl访问kubernetes数据
2017-11-23 13:06:23 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4" data-path = "../guide/cluster-security-management.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/cluster-security-management.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.< / b >
2017-11-15 21:18:59 +08:00
集群安全性管理
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.1" data-path = "../guide/managing-tls-in-a-cluster.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/managing-tls-in-a-cluster.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.1.< / b >
2017-11-15 21:18:59 +08:00
管理集群中的TLS
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.2" data-path = "../guide/kubelet-authentication-authorization.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/kubelet-authentication-authorization.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.2.< / b >
2017-11-15 21:18:59 +08:00
kubelet的认证授权
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.3" data-path = "../guide/tls-bootstrapping.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/tls-bootstrapping.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.3.< / b >
2017-11-15 21:18:59 +08:00
TLS bootstrap
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.4" data-path = "../guide/kubectl-user-authentication-authorization.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/kubectl-user-authentication-authorization.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.4.< / b >
2017-11-15 21:18:59 +08:00
创建用户认证授权的kubeconfig文件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.5" data-path = "../guide/rbac.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/rbac.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.5.< / b >
2017-11-15 21:18:59 +08:00
RBAC——基于角色的访问控制
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.6" data-path = "../guide/ip-masq-agent.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/ip-masq-agent.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.6.< / b >
2017-11-15 21:18:59 +08:00
IP伪装代理
2017-09-14 15:57:50 +08:00
< / a >
2017-11-10 23:22:45 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.7" data-path = "../guide/auth-with-kubeconfig-or-token.html" >
2017-11-10 23:22:45 +08:00
< a href = "../guide/auth-with-kubeconfig-or-token.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.7.< / b >
2017-11-15 21:18:59 +08:00
使用kubeconfig或token进行用户身份认证
2017-11-10 23:22:45 +08:00
< / a >
2017-11-14 13:46:53 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.4.8" data-path = "../guide/authentication.html" >
2017-11-14 13:46:53 +08:00
< a href = "../guide/authentication.html" >
2017-12-20 17:27:16 +08:00
< b > 4.4.8.< / b >
2017-11-15 21:18:59 +08:00
2018-01-20 16:56:42 +08:00
Kubernetes中的用户与身份认证授权
2017-11-14 13:46:53 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5" data-path = "../guide/access-kubernetes-cluster.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/access-kubernetes-cluster.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.< / b >
2017-11-15 21:18:59 +08:00
2017-11-21 20:10:10 +08:00
访问Kubernetes集群
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.1" data-path = "../guide/access-cluster.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/access-cluster.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.1.< / b >
2017-11-15 21:18:59 +08:00
访问集群
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.2" data-path = "../guide/authenticate-across-clusters-kubeconfig.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/authenticate-across-clusters-kubeconfig.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.2.< / b >
2017-11-15 21:18:59 +08:00
2017-11-21 20:10:10 +08:00
使用kubeconfig文件配置跨集群认证
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.3" data-path = "../guide/connecting-to-applications-port-forward.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/connecting-to-applications-port-forward.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.3.< / b >
2017-11-15 21:18:59 +08:00
通过端口转发访问集群中的应用程序
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.4" data-path = "../guide/service-access-application-cluster.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/service-access-application-cluster.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.4.< / b >
2017-11-15 21:18:59 +08:00
2017-11-21 20:10:10 +08:00
使用service访问群集中的应用程序
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.5" data-path = "../guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html" >
2017-11-21 20:10:10 +08:00
< a href = "../guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.5.< / b >
2017-11-21 20:10:10 +08:00
从外部访问Kubernetes中的Pod
2017-09-14 15:57:50 +08:00
< / a >
2017-11-22 18:43:03 +08:00
< / li >
2018-01-14 21:13:12 +08:00
< li class = "chapter " data-level = "4.5.6" data-path = "../guide/cabin-mobile-dashboard-for-kubernetes.html" >
2017-11-22 18:43:03 +08:00
2018-01-14 21:13:12 +08:00
< a href = "../guide/cabin-mobile-dashboard-for-kubernetes.html" >
2017-11-22 18:43:03 +08:00
2017-12-20 17:27:16 +08:00
< b > 4.5.6.< / b >
2017-11-22 18:43:03 +08:00
2018-01-14 21:13:12 +08:00
Cabin - Kubernetes手机客户端
2017-11-22 18:43:03 +08:00
< / a >
2017-11-29 15:07:48 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.5.7" data-path = "../guide/kubernetes-desktop-client.html" >
2017-11-29 15:07:48 +08:00
< a href = "../guide/kubernetes-desktop-client.html" >
2017-12-20 17:27:16 +08:00
< b > 4.5.7.< / b >
2017-11-29 15:07:48 +08:00
Kubernetic - Kubernetes桌面客户端
< / a >
2017-12-27 11:58:32 +08:00
< / li >
< li class = "chapter " data-level = "4.5.8" data-path = "../guide/kubernator-kubernetes-ui.html" >
< a href = "../guide/kubernator-kubernetes-ui.html" >
< b > 4.5.8.< / b >
Kubernator - 更底层的Kubernetes UI
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.6" data-path = "../guide/application-development-deployment-flow.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/application-development-deployment-flow.html" >
2017-12-20 17:27:16 +08:00
< b > 4.6.< / b >
2017-11-15 21:18:59 +08:00
2017-12-30 10:37:40 +08:00
在Kubernetes中开发部署应用
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.6.1" data-path = "../guide/deploy-applications-in-kubernetes.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/deploy-applications-in-kubernetes.html" >
2017-12-20 17:27:16 +08:00
< b > 4.6.1.< / b >
2017-11-15 21:18:59 +08:00
适用于kubernetes的应用开发部署流程
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.6.2" data-path = "../guide/migrating-hadoop-yarn-to-kubernetes.html" >
2017-09-14 15:57:50 +08:00
< a href = "../guide/migrating-hadoop-yarn-to-kubernetes.html" >
2017-12-20 17:27:16 +08:00
< b > 4.6.2.< / b >
2017-11-15 21:18:59 +08:00
2017-12-30 10:37:40 +08:00
迁移传统应用到Kubernetes中——以Hadoop YARN为例
2017-09-14 15:57:50 +08:00
< / a >
2017-10-23 13:40:58 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "4.6.3" data-path = "../guide/using-statefulset.html" >
2017-10-23 13:40:58 +08:00
< a href = "../guide/using-statefulset.html" >
2017-12-20 17:27:16 +08:00
< b > 4.6.3.< / b >
2017-11-15 21:18:59 +08:00
使用StatefulSet部署用状态应用
2017-10-23 13:40:58 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 最佳实践< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.1" data-path = "../practice/" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/" >
2017-12-20 17:27:16 +08:00
< b > 5.1.< / b >
2017-11-15 21:18:59 +08:00
最佳实践概览
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2" data-path = "../practice/install-kubernetes-on-centos.html" >
2017-09-14 15:57:50 +08:00
2017-12-19 17:59:00 +08:00
< a href = "../practice/install-kubernetes-on-centos.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.2.< / b >
2017-11-15 21:18:59 +08:00
2017-12-30 10:37:40 +08:00
在CentOS上部署Kubernetes集群
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.1" data-path = "../practice/create-tls-and-secret-key.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/create-tls-and-secret-key.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.1.< / b >
2017-11-15 21:18:59 +08:00
创建TLS证书和秘钥
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.2" data-path = "../practice/create-kubeconfig.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/create-kubeconfig.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.2.< / b >
2017-11-15 21:18:59 +08:00
创建kubeconfig文件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.3" data-path = "../practice/etcd-cluster-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/etcd-cluster-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.3.< / b >
2017-11-15 21:18:59 +08:00
创建高可用etcd集群
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.4" data-path = "../practice/kubectl-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/kubectl-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.4.< / b >
2017-11-15 21:18:59 +08:00
安装kubectl命令行工具
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.5" data-path = "../practice/master-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/master-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.5.< / b >
2017-11-15 21:18:59 +08:00
部署master节点
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.6" data-path = "../practice/flannel-installation.html" >
2017-09-14 15:57:50 +08:00
2017-12-19 17:59:00 +08:00
< a href = "../practice/flannel-installation.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.2.6.< / b >
2017-11-15 21:18:59 +08:00
2017-12-19 17:59:00 +08:00
安装flannel网络插件
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.7" data-path = "../practice/node-installation.html" >
2017-12-19 17:59:00 +08:00
< a href = "../practice/node-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.7.< / b >
2017-12-19 17:59:00 +08:00
2017-11-15 21:18:59 +08:00
部署node节点
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.8" data-path = "../practice/kubedns-addon-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/kubedns-addon-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.8.< / b >
2017-11-15 21:18:59 +08:00
安装kubedns插件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.9" data-path = "../practice/dashboard-addon-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/dashboard-addon-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.9.< / b >
2017-11-15 21:18:59 +08:00
安装dashboard插件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.10" data-path = "../practice/heapster-addon-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/heapster-addon-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.10.< / b >
2017-11-15 21:18:59 +08:00
安装heapster插件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.2.11" data-path = "../practice/efk-addon-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/efk-addon-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.2.11.< / b >
2017-11-15 21:18:59 +08:00
安装EFK插件
2017-09-14 15:57:50 +08:00
< / a >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3" data-path = "../practice/service-discovery-and-loadbalancing.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/service-discovery-and-loadbalancing.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.< / b >
2017-11-15 21:18:59 +08:00
服务发现与负载均衡
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3.1" data-path = "../practice/traefik-ingress-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/traefik-ingress-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.1.< / b >
2017-11-15 21:18:59 +08:00
安装Traefik ingress
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3.2" data-path = "../practice/distributed-load-test.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/distributed-load-test.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.2.< / b >
2017-11-15 21:18:59 +08:00
分布式负载测试
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3.3" data-path = "../practice/network-and-cluster-perfermance-test.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/network-and-cluster-perfermance-test.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.3.< / b >
2017-11-15 21:18:59 +08:00
网络和集群性能测试
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3.4" data-path = "../practice/edge-node-configuration.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/edge-node-configuration.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.4.< / b >
2017-11-15 21:18:59 +08:00
边缘节点配置
2017-09-14 15:57:50 +08:00
< / a >
2017-10-27 19:09:01 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.3.5" data-path = "../practice/nginx-ingress-installation.html" >
2017-10-27 19:09:01 +08:00
< a href = "../practice/nginx-ingress-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.3.5.< / b >
2017-11-15 21:18:59 +08:00
安装Nginx ingress
2017-10-27 19:09:01 +08:00
< / a >
2018-01-03 16:14:36 +08:00
< / li >
< li class = "chapter " data-level = "5.3.6" data-path = "../practice/configuring-dns.html" >
< a href = "../practice/configuring-dns.html" >
< b > 5.3.6.< / b >
2018-01-03 16:26:15 +08:00
配置内置DNS( kube-dns)
2018-01-03 16:14:36 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4" data-path = "../practice/operation.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/operation.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.< / b >
2017-11-15 21:18:59 +08:00
运维管理
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.1" data-path = "../practice/service-rolling-update.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/service-rolling-update.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.1.< / b >
2017-11-15 21:18:59 +08:00
服务滚动升级
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.2" data-path = "../practice/app-log-collection.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/app-log-collection.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.2.< / b >
2017-11-15 21:18:59 +08:00
应用日志收集
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.3" data-path = "../practice/configuration-best-practice.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/configuration-best-practice.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.3.< / b >
2017-11-15 21:18:59 +08:00
配置最佳实践
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.4" data-path = "../practice/monitor.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/monitor.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.4.< / b >
2017-11-15 21:18:59 +08:00
集群及应用监控
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.5" data-path = "../practice/data-persistence-problem.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/data-persistence-problem.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.5.< / b >
2017-11-15 21:18:59 +08:00
数据持久化问题
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.4.6" data-path = "../practice/manage-compute-resources-container.html" >
2017-09-14 15:57:50 +08:00
< a href = "../practice/manage-compute-resources-container.html" >
2017-12-20 17:27:16 +08:00
< b > 5.4.6.< / b >
2017-11-15 21:18:59 +08:00
管理容器的计算资源
2017-09-14 15:57:50 +08:00
< / a >
2017-09-25 21:41:08 +08:00
< / li >
2017-11-09 10:55:38 +08:00
< / ul >
2017-09-25 21:41:08 +08:00
2017-11-09 10:55:38 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5" data-path = "../practice/storage.html" >
2017-11-09 10:55:38 +08:00
< a href = "../practice/storage.html" >
2017-09-25 21:41:08 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.5.< / b >
2017-11-15 21:18:59 +08:00
存储管理
2017-11-09 10:55:38 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5.1" data-path = "../practice/glusterfs.html" >
2017-11-09 10:55:38 +08:00
< a href = "../practice/glusterfs.html" >
2017-12-20 17:27:16 +08:00
< b > 5.5.1.< / b >
2017-11-15 21:18:59 +08:00
GlusterFS
2017-11-09 10:55:38 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5.1.1" data-path = "../practice/using-glusterfs-for-persistent-storage.html" >
2017-11-09 10:55:38 +08:00
< a href = "../practice/using-glusterfs-for-persistent-storage.html" >
2017-12-20 17:27:16 +08:00
< b > 5.5.1.1.< / b >
2017-11-15 21:18:59 +08:00
使用GlusterFS做持久化存储
2017-09-25 21:41:08 +08:00
< / a >
2017-10-16 17:36:01 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5.1.2" data-path = "../practice/storage-for-containers-using-glusterfs-with-openshift.html" >
2017-10-16 17:36:01 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/storage-for-containers-using-glusterfs-with-openshift.html" >
2017-10-16 17:36:01 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.5.1.2.< / b >
2017-11-15 21:18:59 +08:00
在OpenShift中使用GlusterFS做持久化存储
2017-10-16 17:36:01 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5.2" data-path = "../practice/cephfs.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/cephfs.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.5.2.< / b >
2017-11-15 21:18:59 +08:00
CephFS
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.5.2.1" data-path = "../practice/using-ceph-for-persistent-storage.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/using-ceph-for-persistent-storage.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.5.2.1.< / b >
2017-11-15 21:18:59 +08:00
使用Ceph做持久化存储
2017-11-09 10:55:38 +08:00
< / a >
2018-01-05 16:34:39 +08:00
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "5.5.3" data-path = "../practice/openebs.html" >
< a href = "../practice/openebs.html" >
< b > 5.5.3.< / b >
OpenEBS
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "5.5.3.1" data-path = "../practice/using-openebs-for-persistent-storage.html" >
< a href = "../practice/using-openebs-for-persistent-storage.html" >
< b > 5.5.3.1.< / b >
使用OpenEBS做持久化存储
< / a >
2017-11-09 10:55:38 +08:00
< / li >
< / ul >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.6" data-path = "../practice/monitoring.html" >
2017-11-09 10:55:38 +08:00
< a href = "../practice/monitoring.html" >
2017-12-20 17:27:16 +08:00
< b > 5.6.< / b >
2017-11-15 21:18:59 +08:00
集群与应用监控
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.6.1" data-path = "../practice/heapster.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/heapster.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.6.1.< / b >
2017-11-15 21:18:59 +08:00
Heapster
2017-09-14 15:57:50 +08:00
< / a >
2017-11-09 10:55:38 +08:00
< ul class = "articles" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.6.1.1" data-path = "../practice/using-heapster-to-get-object-metrics.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/using-heapster-to-get-object-metrics.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.6.1.1.< / b >
2017-11-15 21:18:59 +08:00
使用Heapster获取集群和对象的metric数据
2017-09-14 15:57:50 +08:00
< / a >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.6.2" data-path = "../practice/prometheus.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/prometheus.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.6.2.< / b >
2017-11-15 21:18:59 +08:00
Prometheus
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.6.2.1" data-path = "../practice/using-prometheus-to-monitor-kuberentes-cluster.html" >
2017-09-14 15:57:50 +08:00
2017-11-09 10:55:38 +08:00
< a href = "../practice/using-prometheus-to-monitor-kuberentes-cluster.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 5.6.2.1.< / b >
2017-11-15 21:18:59 +08:00
使用Prometheus监控kubernetes集群
2017-09-14 15:57:50 +08:00
< / a >
< / li >
< / ul >
< / li >
< / ul >
2017-10-19 15:31:08 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.7" data-path = "../practice/services-management-tool.html" >
2017-10-19 15:31:08 +08:00
< a href = "../practice/services-management-tool.html" >
2017-12-20 17:27:16 +08:00
< b > 5.7.< / b >
2017-11-15 21:18:59 +08:00
服务编排管理
2017-10-19 15:31:08 +08:00
< / a >
2017-10-20 16:22:43 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.7.1" data-path = "../practice/helm.html" >
2017-10-20 16:22:43 +08:00
< a href = "../practice/helm.html" >
2017-12-20 17:27:16 +08:00
< b > 5.7.1.< / b >
2017-11-15 21:18:59 +08:00
使用Helm管理kubernetes应用
2017-10-20 16:22:43 +08:00
< / a >
2017-10-27 11:59:37 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.7.2" data-path = "../practice/create-private-charts-repo.html" >
2017-10-27 11:59:37 +08:00
< a href = "../practice/create-private-charts-repo.html" >
2017-12-20 17:27:16 +08:00
< b > 5.7.2.< / b >
2017-11-15 21:18:59 +08:00
构建私有Chart仓库
2017-10-27 11:59:37 +08:00
< / a >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.8" data-path = "../practice/ci-cd.html" >
2017-10-27 11:59:37 +08:00
< a href = "../practice/ci-cd.html" >
2017-12-20 17:27:16 +08:00
< b > 5.8.< / b >
2017-11-15 21:18:59 +08:00
持续集成与发布
2017-10-27 11:59:37 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.8.1" data-path = "../practice/jenkins-ci-cd.html" >
2017-10-27 11:59:37 +08:00
< a href = "../practice/jenkins-ci-cd.html" >
2017-12-20 17:27:16 +08:00
< b > 5.8.1.< / b >
2017-11-15 21:18:59 +08:00
使用Jenkins进行持续集成与发布
2017-10-27 11:59:37 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.8.2" data-path = "../practice/drone-ci-cd.html" >
2017-10-27 11:59:37 +08:00
< a href = "../practice/drone-ci-cd.html" >
2017-12-20 17:27:16 +08:00
< b > 5.8.2.< / b >
2017-11-15 21:18:59 +08:00
使用Drone进行持续集成与发布
2017-10-27 11:59:37 +08:00
< / a >
2017-11-02 16:33:01 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.9" data-path = "../practice/update-and-upgrade.html" >
2017-11-02 16:33:01 +08:00
< a href = "../practice/update-and-upgrade.html" >
2017-12-20 17:27:16 +08:00
< b > 5.9.< / b >
2017-11-15 21:18:59 +08:00
更新与升级
2017-11-02 16:33:01 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.9.1" data-path = "../practice/manually-upgrade.html" >
2017-11-02 16:33:01 +08:00
< a href = "../practice/manually-upgrade.html" >
2017-12-20 17:27:16 +08:00
< b > 5.9.1.< / b >
2017-11-15 21:18:59 +08:00
2017-12-30 10:37:40 +08:00
手动升级Kubernetes集群
2017-11-02 16:33:01 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "5.9.2" data-path = "../practice/dashboard-upgrade.html" >
2017-11-02 16:33:01 +08:00
< a href = "../practice/dashboard-upgrade.html" >
2017-12-20 17:27:16 +08:00
< b > 5.9.2.< / b >
2017-11-15 21:18:59 +08:00
升级dashboard
2017-11-02 16:33:01 +08:00
< / a >
2017-10-20 16:22:43 +08:00
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 领域应用< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.1" data-path = "./" >
2017-09-14 15:57:50 +08:00
< a href = "./" >
2017-12-20 17:27:16 +08:00
< b > 6.1.< / b >
2017-11-15 21:18:59 +08:00
领域应用概览
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.2" data-path = "microservices.html" >
2017-09-14 15:57:50 +08:00
< a href = "microservices.html" >
2017-12-20 17:27:16 +08:00
< b > 6.2.< / b >
2017-11-15 21:18:59 +08:00
微服务架构
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.2.1" data-path = "service-discovery-in-microservices.html" >
2017-09-20 21:55:19 +08:00
< a href = "service-discovery-in-microservices.html" >
2017-12-20 17:27:16 +08:00
< b > 6.2.1.< / b >
2017-11-15 21:18:59 +08:00
微服务中的服务发现
2017-09-20 21:55:19 +08:00
< / a >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3" data-path = "service-mesh.html" >
2017-09-20 21:55:19 +08:00
< a href = "service-mesh.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.< / b >
2017-11-15 21:18:59 +08:00
Service Mesh 服务网格
2017-09-20 21:55:19 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.1" data-path = "istio.html" >
2017-09-14 15:57:50 +08:00
< a href = "istio.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.1.< / b >
2017-11-15 21:18:59 +08:00
Istio
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.1.1" data-path = "istio-installation.html" >
2017-09-14 15:57:50 +08:00
< a href = "istio-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.1.1.< / b >
2017-11-15 21:18:59 +08:00
安装并试用Istio service mesh
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.1.2" data-path = "configuring-request-routing.html" >
2017-09-14 15:57:50 +08:00
< a href = "configuring-request-routing.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.1.2.< / b >
2017-11-15 21:18:59 +08:00
配置请求的路由规则
2017-09-14 15:57:50 +08:00
< / a >
2017-11-07 23:57:26 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.1.3" data-path = "install-and-expand-istio-mesh.html" >
2017-11-07 23:57:26 +08:00
< a href = "install-and-expand-istio-mesh.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.1.3.< / b >
2017-11-15 21:18:59 +08:00
安装和拓展Istio service mesh
2017-11-07 23:57:26 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.1.4" data-path = "integrating-vms.html" >
2017-11-07 23:57:26 +08:00
< a href = "integrating-vms.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.1.4.< / b >
2017-11-15 21:18:59 +08:00
集成虚拟机
2017-11-07 23:57:26 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.2" data-path = "linkerd.html" >
2017-09-14 15:57:50 +08:00
< a href = "linkerd.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.2.< / b >
2017-11-15 21:18:59 +08:00
Linkerd
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.2.1" data-path = "linkerd-user-guide.html" >
2017-09-14 15:57:50 +08:00
< a href = "linkerd-user-guide.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.2.1.< / b >
2017-11-15 21:18:59 +08:00
Linkerd 使用指南
2017-09-14 15:57:50 +08:00
< / a >
< / li >
< / ul >
2017-12-10 21:51:18 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.3" data-path = "conduit.html" >
2017-12-10 21:51:18 +08:00
< a href = "conduit.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.3.< / b >
2017-12-10 21:51:18 +08:00
Conduit
< / a >
2017-12-11 14:21:24 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.3.1" data-path = "conduit-overview.html" >
2017-12-11 14:21:24 +08:00
< a href = "conduit-overview.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.3.1.< / b >
2017-12-11 14:21:24 +08:00
Condiut概览
< / a >
2017-12-12 23:30:36 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.3.3.2" data-path = "conduit-installation.html" >
2017-12-12 23:30:36 +08:00
< a href = "conduit-installation.html" >
2017-12-20 17:27:16 +08:00
< b > 6.3.3.2.< / b >
2017-12-12 23:30:36 +08:00
安装Conduit
< / a >
2017-12-11 14:21:24 +08:00
< / li >
< / ul >
2017-09-14 15:57:50 +08:00
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.4" data-path = "big-data.html" >
2017-09-14 15:57:50 +08:00
< a href = "big-data.html" >
2017-12-20 17:27:16 +08:00
< b > 6.4.< / b >
2017-11-15 21:18:59 +08:00
大数据
2017-09-14 15:57:50 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.4.1" data-path = "spark-standalone-on-kubernetes.html" >
2017-09-14 15:57:50 +08:00
< a href = "spark-standalone-on-kubernetes.html" >
2017-12-20 17:27:16 +08:00
< b > 6.4.1.< / b >
2017-11-15 21:18:59 +08:00
Spark standalone on Kubernetes
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter active" data-level = "6.4.2" data-path = "running-spark-with-kubernetes-native-scheduler.html" >
2017-09-14 15:57:50 +08:00
< a href = "running-spark-with-kubernetes-native-scheduler.html" >
2017-12-20 17:27:16 +08:00
< b > 6.4.2.< / b >
2017-11-15 21:18:59 +08:00
2017-12-30 10:37:40 +08:00
运行支持Kubernetes原生调度的Spark程序
2017-09-14 15:57:50 +08:00
< / a >
< / li >
< / ul >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.5" data-path = "serverless.html" >
2017-09-14 15:57:50 +08:00
< a href = "serverless.html" >
2017-12-20 17:27:16 +08:00
< b > 6.5.< / b >
2017-11-15 21:18:59 +08:00
Serverless架构
2017-09-14 15:57:50 +08:00
< / a >
2017-11-23 11:03:04 +08:00
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.5.1" data-path = "understanding-serverless.html" >
2017-11-23 11:03:04 +08:00
< a href = "understanding-serverless.html" >
2017-12-20 17:27:16 +08:00
< b > 6.5.1.< / b >
2017-11-23 11:03:04 +08:00
理解Serverless
< / a >
2017-12-19 22:39:23 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.5.2" data-path = "faas.html" >
2017-12-19 22:39:23 +08:00
< a href = "faas.html" >
2017-12-20 17:27:16 +08:00
< b > 6.5.2.< / b >
2017-12-19 22:39:23 +08:00
FaaS-函数即服务
< / a >
< ul class = "articles" >
2017-12-26 21:24:28 +08:00
< li class = "chapter " data-level = "6.5.2.1" data-path = "openfaas-quick-start.html" >
2017-12-19 22:39:23 +08:00
2017-12-26 21:24:28 +08:00
< a href = "openfaas-quick-start.html" >
2017-12-19 22:39:23 +08:00
2017-12-20 17:27:16 +08:00
< b > 6.5.2.1.< / b >
2017-12-19 22:39:23 +08:00
2017-12-26 21:24:28 +08:00
OpenFaaS快速入门指南
2017-12-19 22:39:23 +08:00
< / a >
< / li >
< / ul >
2017-11-23 11:03:04 +08:00
< / li >
< / ul >
2017-10-27 19:09:01 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "6.6" data-path = "edge-computing.html" >
2017-10-27 19:09:01 +08:00
< a href = "edge-computing.html" >
2017-12-20 17:27:16 +08:00
< b > 6.6.< / b >
2017-11-15 21:18:59 +08:00
边缘计算
2017-10-27 19:09:01 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 开发指南< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "7.1" data-path = "../develop/" >
2017-09-14 15:57:50 +08:00
< a href = "../develop/" >
2017-12-20 17:27:16 +08:00
< b > 7.1.< / b >
2017-11-15 21:18:59 +08:00
开发指南概览
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "7.2" data-path = "../develop/sigs-and-working-group.html" >
2017-09-14 15:57:50 +08:00
2017-12-03 13:13:09 +08:00
< a href = "../develop/sigs-and-working-group.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 7.2.< / b >
2017-11-15 21:18:59 +08:00
2017-12-03 13:13:09 +08:00
SIG和工作组
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "7.3" data-path = "../develop/developing-environment.html" >
2017-12-03 13:13:09 +08:00
< a href = "../develop/developing-environment.html" >
2017-12-20 17:27:16 +08:00
< b > 7.3.< / b >
2017-12-03 13:13:09 +08:00
2017-11-15 21:18:59 +08:00
开发环境搭建
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "7.4" data-path = "../develop/testing.html" >
2017-09-14 15:57:50 +08:00
< a href = "../develop/testing.html" >
2017-12-20 17:27:16 +08:00
< b > 7.4.< / b >
2017-11-15 21:18:59 +08:00
单元测试和集成测试
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "7.5" data-path = "../develop/client-go-sample.html" >
2017-09-14 15:57:50 +08:00
< a href = "../develop/client-go-sample.html" >
2017-12-20 17:27:16 +08:00
< b > 7.5.< / b >
2017-11-15 21:18:59 +08:00
client-go示例
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2018-01-09 19:14:30 +08:00
< li class = "chapter " data-level = "7.6" data-path = "../develop/operator.html" >
2017-09-14 15:57:50 +08:00
2018-01-09 19:14:30 +08:00
< a href = "../develop/operator.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 7.6.< / b >
2017-11-15 21:18:59 +08:00
2018-01-09 19:14:30 +08:00
Operator
< / a >
< / li >
< li class = "chapter " data-level = "7.7" data-path = "../develop/contribute.html" >
< a href = "../develop/contribute.html" >
< b > 7.7.< / b >
2017-11-15 21:18:59 +08:00
社区贡献
2017-09-14 15:57:50 +08:00
< / a >
2017-10-23 19:09:41 +08:00
< / li >
2018-01-09 19:14:30 +08:00
< li class = "chapter " data-level = "7.8" data-path = "../develop/minikube.html" >
2017-10-23 19:09:41 +08:00
< a href = "../develop/minikube.html" >
2018-01-09 19:14:30 +08:00
< b > 7.8.< / b >
2017-11-15 21:18:59 +08:00
Minikube
2017-10-23 19:09:41 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
2017-11-15 21:18:59 +08:00
< li class = "header" > 附录< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.1" data-path = "../appendix/" >
2017-09-14 15:57:50 +08:00
< a href = "../appendix/" >
2017-12-20 17:27:16 +08:00
< b > 8.1.< / b >
2017-11-15 21:18:59 +08:00
附录说明
2017-09-14 15:57:50 +08:00
< / a >
2017-11-15 21:18:59 +08:00
< / li >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.2" data-path = "../appendix/debug-kubernetes-services.html" >
2017-09-14 15:57:50 +08:00
2017-11-15 21:18:59 +08:00
< a href = "../appendix/debug-kubernetes-services.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 8.2.< / b >
2017-11-15 21:18:59 +08:00
Kubernetes中的应用故障排查
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.3" data-path = "../appendix/material-share.html" >
2017-09-14 15:57:50 +08:00
2017-11-15 21:18:59 +08:00
< a href = "../appendix/material-share.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 8.3.< / b >
2017-11-15 21:18:59 +08:00
Kubernetes相关资讯和情报链接
2017-09-14 15:57:50 +08:00
< / a >
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.4" data-path = "../appendix/docker-best-practice.html" >
2017-09-14 15:57:50 +08:00
2017-11-15 21:18:59 +08:00
< a href = "../appendix/docker-best-practice.html" >
2017-09-14 15:57:50 +08:00
2017-12-20 17:27:16 +08:00
< b > 8.4.< / b >
2017-11-15 21:18:59 +08:00
Docker最佳实践
2017-09-14 15:57:50 +08:00
< / a >
2017-09-21 15:00:54 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.5" data-path = "../appendix/tricks.html" >
2017-09-21 15:00:54 +08:00
2017-11-15 21:18:59 +08:00
< a href = "../appendix/tricks.html" >
2017-09-21 15:00:54 +08:00
2017-12-20 17:27:16 +08:00
< b > 8.5.< / b >
2017-11-15 21:18:59 +08:00
使用技巧
2017-09-21 15:00:54 +08:00
< / a >
2017-10-18 14:16:55 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.6" data-path = "../appendix/issues.html" >
2017-10-18 14:16:55 +08:00
2017-11-15 21:18:59 +08:00
< a href = "../appendix/issues.html" >
2017-10-18 14:16:55 +08:00
2017-12-20 17:27:16 +08:00
< b > 8.6.< / b >
2017-11-15 21:18:59 +08:00
问题记录
2017-10-18 14:16:55 +08:00
< / a >
2017-09-14 15:57:50 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.7" data-path = "../appendix/kubernetes-changelog.html" >
2017-12-11 18:32:18 +08:00
< a href = "../appendix/kubernetes-changelog.html" >
2017-12-20 17:27:16 +08:00
< b > 8.7.< / b >
2017-12-11 18:32:18 +08:00
2017-12-30 10:37:40 +08:00
Kubernetes版本更新日志
2017-12-11 18:32:18 +08:00
< / a >
< ul class = "articles" >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.7.1" data-path = "../appendix/kubernetes-1.7-changelog.html" >
2017-12-11 18:32:18 +08:00
< a href = "../appendix/kubernetes-1.7-changelog.html" >
2017-12-20 17:27:16 +08:00
< b > 8.7.1.< / b >
2017-12-11 18:32:18 +08:00
Kubernetes1.7更新日志
< / a >
2017-12-12 13:52:55 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.7.2" data-path = "../appendix/kubernetes-1.8-changelog.html" >
2017-12-12 13:52:55 +08:00
< a href = "../appendix/kubernetes-1.8-changelog.html" >
2017-12-20 17:27:16 +08:00
< b > 8.7.2.< / b >
2017-12-12 13:52:55 +08:00
Kubernetes1.8更新日志
< / a >
2017-12-16 10:50:25 +08:00
< / li >
2017-12-20 17:27:16 +08:00
< li class = "chapter " data-level = "8.7.3" data-path = "../appendix/kubernetes-1.9-changelog.html" >
2017-12-16 10:50:25 +08:00
< a href = "../appendix/kubernetes-1.9-changelog.html" >
2017-12-20 17:27:16 +08:00
< b > 8.7.3.< / b >
2017-12-16 10:50:25 +08:00
Kubernetes1.9更新日志
< / a >
2017-12-11 18:32:18 +08:00
< / li >
< / ul >
< / li >
2017-12-27 12:29:33 +08:00
< li class = "chapter " data-level = "8.8" data-path = "../appendix/summary-and-outlook.html" >
< a href = "../appendix/summary-and-outlook.html" >
< b > 8.8.< / b >
Kubernetes及云原生年度总结及展望
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "8.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 > 8.8.1.< / b >
Kubernetes与云原生2017年年终总结及2018年展望
< / a >
< / li >
< / ul >
< / li >
2017-09-14 15:57:50 +08:00
< li class = "divider" > < / li >
< li >
< a href = "https://www.gitbook.com" target = "blank" class = "gitbook-link" >
2017-09-19 22:01:07 +08:00
本书使用 GitBook 发布
2017-09-14 15:57:50 +08:00
< / 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 >
2017-12-30 10:37:40 +08:00
< a href = ".." > 运行支持Kubernetes原生调度的Spark程序< / a >
2017-09-14 15:57:50 +08:00
< / 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 = "运行支持kubernetes原生调度的spark程序" > 运 行 支 持 kubernetes原 生 调 度 的 Spark程 序 < / h1 >
2017-09-22 20:25:47 +08:00
< p > TL;DR 这 个 主 题 比 较 大 , 该 开 源 项 目 也 还 在 不 断 进 行 中 , 我 单 独 做 了 一 个 web 用 来 记 录 spark on kubernetes 的 研 究 和 最 新 进 展 见 : < a href = "https://jimmysong.io/spark-on-k8s" target = "_blank" > https://jimmysong.io/spark-on-k8s< / a > < / p >
2017-09-14 15:57:50 +08:00
< p > 我 们 之 前 就 在 kubernetes 中 运 行 过 standalone 方 式 的 spark 集 群 , 见 < a href = "spark-standalone-on-kubernetes.html" > Spark standalone on kubernetes< / a > 。 < / p >
2017-09-14 16:06:45 +08:00
< p > 目 前 运 行 支 持 kubernetes 原 生 调 度 的 spark 程 序 由 Google 主 导 , 目 前 运 行 支 持 kubernetes 原 生 调 度 的 spark 程 序 由 Google 主 导 , fork 自 spark 的 官 方 代 码 库 , 见 < a href = "https://github.com/apache-spark-on-k8s/spark/" target = "_blank" > https://github.com/apache-spark-on-k8s/spark/< / a > , 属 于 Big Data SIG。 < / p >
< p > 参 与 到 该 项 目 的 公 司 有 : < / p >
< ul >
< li > Bloomberg< / li >
< li > Google< / li >
< li > Haiwen< / li >
< li > Hyperpilot< / li >
< li > Intel< / li >
< li > Palantir< / li >
< li > Pepperdata< / li >
< li > Red Hat< / li >
< / ul >
2017-09-27 21:04:05 +08:00
< h2 id = "为何使用-spark-on-kubernetes" > 为 何 使 用 spark on kubernetes< / h2 >
< p > 使 用 kubernetes原 生 调 度 的 spark on kubernetes是 对 现 有 的 spark on yarn/mesos的 资 源 使 用 方 式 的 革 命 性 的 改 进 , 主 要 表 现 在 以 下 几 点 : < / p >
< ol >
< li > Kubernetes原 生 调 度 : 不 再 需 要 二 层 调 度 , 直 接 使 用 kubernetes的 资 源 调 度 功 能 , 跟 其 他 应 用 共 用 整 个 kubernetes管 理 的 资 源 池 ; < / li >
< li > 资 源 隔 离 , 粒 度 更 细 : 原 先 yarn中 的 queue在 spark on kubernetes中 已 不 存 在 , 取 而 代 之 的 是 kubernetes中 原 生 的 namespace, 可 以 为 每 个 用 户 分 别 指 定 一 个 namespace, 限 制 用 户 的 资 源 quota; < / li >
< li > 细 粒 度 的 资 源 分 配 : 可 以 给 每 个 spark任 务 指 定 资 源 限 制 , 实 际 指 定 多 少 资 源 就 使 用 多 少 资 源 , 因 为 没 有 了 像 yarn那 样 的 二 层 调 度 ( 圈 地 式 的 ) , 所 以 可 以 更 高 效 和 细 粒 度 的 使 用 资 源 ; < / li >
< li > 监 控 的 变 革 : 因 为 做 到 了 细 粒 度 的 资 源 分 配 , 所 以 可 以 对 用 户 提 交 的 每 一 个 任 务 做 到 资 源 使 用 的 监 控 , 从 而 判 断 用 户 的 资 源 使 用 情 况 , 所 有 的 metric都 记 录 在 数 据 库 中 , 甚 至 可 以 为 每 个 用 户 的 每 次 任 务 提 交 计 量 ; < / li >
< li > 日 志 的 变 革 : 用 户 不 再 通 过 yarn的 web页 面 来 查 看 任 务 状 态 , 而 是 通 过 pod的 log来 查 看 , 可 将 所 有 的 kuberentes中 的 应 用 的 日 志 等 同 看 待 收 集 起 来 , 然 后 可 以 根 据 标 签 查 看 对 应 应 用 的 日 志 ; < / li >
< / ol >
< p > 所 有 这 些 变 革 都 可 以 让 我 们 更 高 效 的 获 取 资 源 、 更 有 效 率 的 获 取 资 源 ! < / p >
2017-09-14 15:57:50 +08:00
< h2 id = "spark-概念说明" > Spark 概 念 说 明 < / h2 >
< p > < a href = "http://spark.apache.org" target = "_blank" > Apache Spark< / a > 是 一 个 围 绕 速 度 、 易 用 性 和 复 杂 分 析 构 建 的 大 数 据 处 理 框 架 。 最 初 在 2009年 由 加 州 大 学 伯 克 利 分 校 的 AMPLab开 发 , 并 于 2010年 成 为 Apache的 开 源 项 目 之 一 。 < / p >
< p > 在 Spark 中 包 括 如 下 组 件 或 概 念 : < / p >
< ul >
< li > < strong > Application< / strong > : Spark Application 的 概 念 和 Hadoop 中 的 MapReduce 类 似 , 指 的 是 用 户 编 写 的 Spark 应 用 程 序 , 包 含 了 一 个 Driver 功 能 的 代 码 和 分 布 在 集 群 中 多 个 节 点 上 运 行 的 Executor 代 码 ; < / li >
< li > < strong > Driver< / strong > : Spark 中 的 Driver 即 运 行 上 述 Application 的 main() 函 数 并 且 创 建 SparkContext, 其 中 创 建 SparkContext 的 目 的 是 为 了 准 备 Spark应 用 程 序 的 运 行 环 境 。 在 Spark 中 由 SparkContext 负 责 和 ClusterManager 通 信 , 进 行 资 源 的 申 请 、 任 务 的 分 配 和 监 控 等 ; 当 Executor 部 分 运 行 完 毕 后 , Driver负 责 将 SparkContext 关 闭 。 通 常 用 SparkContext 代 表 Driver; < / li >
< li > < strong > Executor< / strong > : Application运 行 在 Worker 节 点 上 的 一 个 进 程 , 该 进 程 负 责 运 行 Task, 并 且 负 责 将 数 据 存 在 内 存 或 者 磁 盘 上 , 每 个 Application都 有 各 自 独 立 的 一 批 Executor。 在 Spark on Yarn模 式 下 , 其 进 程 名 称 为 < code > CoarseGrainedExecutorBackend< / code > , 类 似 于 Hadoop MapReduce 中 的 YarnChild。 一 个 < code > CoarseGrainedExecutorBackend< / code > 进 程 有 且 仅 有 一 个 executor 对 象 , 它 负 责 将 Task 包 装 成 taskRunner, 并 从 线 程 池 中 抽 取 出 一 个 空 闲 线 程 运 行 Task。 每 个 < code > CoarseGrainedExecutorBackend< / code > 能 并 行 运 行 Task 的 数 量 就 取 决 于 分 配 给 它 的 CPU 的 个 数 了 ; < / li >
< li > < strong > Cluster Manager< / strong > : 指 的 是 在 集 群 上 获 取 资 源 的 外 部 服 务 , 目 前 有 : < ul >
< li > Standalone: Spark原 生 的 资 源 管 理 , 由 Master负 责 资 源 的 分 配 ; < / li >
< li > Hadoop Yarn: 由 YARN中 的 ResourceManager负 责 资 源 的 分 配 ; < / li >
< / ul >
< / li >
< li > < strong > Worker< / strong > : 集 群 中 任 何 可 以 运 行 Application代 码 的 节 点 , 类 似 于 YARN中 的 NodeManager节 点 。 在 Standalone模 式 中 指 的 就 是 通 过 Slave文 件 配 置 的 Worker节 点 , 在 Spark on Yarn模 式 中 指 的 就 是 NodeManager节 点 ; < / li >
< li > < strong > 作 业 ( Job) < / strong > : 包 含 多 个 Task组 成 的 并 行 计 算 , 往 往 由 Spark Action催 生 , 一 个 JOB包 含 多 个 RDD及 作 用 于 相 应 RDD上 的 各 种 Operation; < / li >
< li > < strong > 阶 段 ( Stage) < / strong > : 每 个 Job会 被 拆 分 很 多 组 Task, 每 组 任 务 被 称 为 Stage, 也 可 称 TaskSet, 一 个 作 业 分 为 多 个 阶 段 , 每 一 个 stage的 分 割 点 是 action。 比 如 一 个 job是 : ( transformation1 -> transformation1 -> action1 -> transformation3 -> action2) , 这 个 job就 会 被 分 为 两 个 stage, 分 割 点 是 action1和 action2。 < / li >
< li > < p > < strong > 任 务 ( Task) < / strong > : 被 送 到 某 个 Executor上 的 工 作 任 务 ; < / p >
< / li >
< li > < p > < strong > Context< / strong > : 启 动 spark application的 时 候 创 建 , 作 为 Spark 运 行 时 环 境 。 < / p >
< / li >
< li > < strong > Dynamic Allocation( 动 态 资 源 分 配 ) < / strong > : 一 个 配 置 选 项 , 可 以 将 其 打 开 。 从 Spark1.2之 后 , 对 于 On Yarn模 式 , 已 经 支 持 动 态 资 源 分 配 ( Dynamic Resource Allocation) , 这 样 , 就 可 以 根 据 Application的 负 载 ( Task情 况 ) , 动 态 的 增 加 和 减 少 executors, 这 种 策 略 非 常 适 合 在 YARN上 使 用 spark-sql做 数 据 开 发 和 分 析 , 以 及 将 spark-sql作 为 长 服 务 来 使 用 的 场 景 。 Executor 的 动 态 分 配 需 要 在 cluster mode 下 启 用 " external shuffle service" 。 < / li >
< li > < strong > 动 态 资 源 分 配 策 略 < / strong > : 开 启 动 态 分 配 策 略 后 , application会 在 task因 没 有 足 够 资 源 被 挂 起 的 时 候 去 动 态 申 请 资 源 , 这 意 味 着 该 application现 有 的 executor无 法 满 足 所 有 task并 行 运 行 。 spark一 轮 一 轮 的 申 请 资 源 , 当 有 task挂 起 或 等 待 < code > spark.dynamicAllocation.schedulerBacklogTimeout< / code > (默 认 1s)时 间 的 时 候 , 会 开 始 动 态 资 源 分 配 ; 之 后 会 每 隔 < code > spark.dynamicAllocation.sustainedSchedulerBacklogTimeout< / code > (默 认 1s)时 间 申 请 一 次 , 直 到 申 请 到 足 够 的 资 源 。 每 次 申 请 的 资 源 量 是 指 数 增 长 的 , 即 1,2,4,8等 。 之 所 以 采 用 指 数 增 长 , 出 于 两 方 面 考 虑 : 其 一 , 开 始 申 请 的 少 是 考 虑 到 可 能 application会 马 上 得 到 满 足 ; 其 次 要 成 倍 增 加 , 是 为 了 防 止 application需 要 很 多 资 源 , 而 该 方 式 可 以 在 很 少 次 数 的 申 请 之 后 得 到 满 足 。 < / li >
< / ul >
< h2 id = "架构设计" > 架 构 设 计 < / h2 >
< p > 关 于 spark standalone 的 局 限 性 与 kubernetes native spark 架 构 之 间 的 区 别 请 参 考 Anirudh Ramanathan 在 2016年 10月 8日 提 交 的 issue < a href = "https://github.com/kubernetes/kubernetes/issues/34377" target = "_blank" > Support Spark natively in Kubernetes #34377< / a > 。 < / p >
< p > 简 而 言 之 , spark standalone on kubernetes 有 如 下 几 个 缺 点 : < / p >
< ul >
< li > 无 法 对 于 多 租 户 做 隔 离 , 每 个 用 户 都 想 给 pod 申 请 node 节 点 可 用 的 最 大 的 资 源 。 < / li >
< li > Spark 的 master/ worker 本 来 不 是 设 计 成 使 用 kubernetes 的 资 源 调 度 , 这 样 会 存 在 两 层 的 资 源 调 度 问 题 , 不 利 于 与 kuberentes 集 成 。 < / li >
< / ul >
< p > 而 kubernetes native spark 集 群 中 , spark 可 以 调 用 kubernetes API 获 取 集 群 资 源 和 调 度 。 要 实 现 kubernetes native spark 需 要 为 spark 提 供 一 个 集 群 外 部 的 manager 可 以 用 来 跟 kubernetes API 交 互 。 < / p >
2017-09-19 19:26:13 +08:00
< h3 id = "调度器后台" > 调 度 器 后 台 < / h3 >
< p > 使 用 kubernetes 原 生 调 度 的 spark 的 基 本 设 计 思 路 是 将 spark 的 driver 和 executor 都 放 在 kubernetes 的 pod 中 运 行 , 另 外 还 有 两 个 附 加 的 组 件 : < code > ResourceStagingServer< / code > 和 < code > KubernetesExternalShuffleService< / code > 。 < / p >
< p > Spark driver 其 实 可 以 运 行 在 kubernetes 集 群 内 部 ( cluster mode) 可 以 运 行 在 外 部 ( client mode) , executor 只 能 运 行 在 集 群 内 部 , 当 有 spark 作 业 提 交 到 kubernetes 集 群 上 时 , 调 度 器 后 台 将 会 为 executor pod 设 置 如 下 属 性 : < / p >
< ul >
< li > 使 用 我 们 预 先 编 译 好 的 包 含 kubernetes 支 持 的 spark 镜 像 , 然 后 调 用 < code > CoarseGrainedExecutorBackend< / code > main class 启 动 JVM。 < / li >
< li > 调 度 器 后 台 为 executor pod 的 运 行 时 注 入 环 境 变 量 , 例 如 各 种 JVM 参 数 , 包 括 用 户 在 < code > spark-submit< / code > 时 指 定 的 那 些 参 数 。 < / li >
< li > Executor 的 CPU、 内 存 限 制 根 据 这 些 注 入 的 环 境 变 量 保 存 到 应 用 程 序 的 < code > SparkConf< / code > 中 。 < / li >
< li > 可 以 在 配 置 中 指 定 spark 运 行 在 指 定 的 namespace 中 。 < / li >
< / ul >
< p > 参 考 : < a href = "https://github.com/apache-spark-on-k8s/spark/blob/branch-2.2-kubernetes/resource-managers/kubernetes/architecture-docs/scheduler-backend.md" target = "_blank" > Scheduler backend 文 档 < / a > < / p >
2017-09-14 15:57:50 +08:00
< h2 id = "安装指南" > 安 装 指 南 < / h2 >
< p > 我 们 可 以 直 接 使 用 官 方 已 编 译 好 的 docker 镜 像 来 部 署 , 下 面 是 官 方 发 布 的 镜 像 : < / p >
< table >
< thead >
< tr >
< th > 组 件 < / th >
< th > 镜 像 < / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > Spark Driver Image< / td >
< td > < code > kubespark/spark-driver:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< tr >
< td > Spark Executor Image< / td >
< td > < code > kubespark/spark-executor:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< tr >
< td > Spark Initialization Image< / td >
< td > < code > kubespark/spark-init:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< tr >
< td > Spark Staging Server Image< / td >
< td > < code > kubespark/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< tr >
< td > PySpark Driver Image< / td >
< td > < code > kubespark/driver-py:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< tr >
< td > PySpark Executor Image< / td >
< td > < code > kubespark/executor-py:v2.1.0-kubernetes-0.3.1< / code > < / td >
< / tr >
< / tbody >
< / table >
< p > 我 将 这 些 镜 像 放 到 了 我 的 私 有 镜 像 仓 库 中 了 。 < / p >
< p > 还 需 要 安 装 支 持 kubernetes 的 spark 客 户 端 , 在 这 里 下 载 : < a href = "https://github.com/apache-spark-on-k8s/spark/releases" target = "_blank" > https://github.com/apache-spark-on-k8s/spark/releases< / a > < / p >
< p > 根 据 使 用 的 镜 像 版 本 , 我 下 载 的 是 < a href = "https://github.com/apache-spark-on-k8s/spark/releases/tag/v2.1.0-kubernetes-0.3.1" target = "_blank" > v2.1.0-kubernetes-0.3.1< / a > < / p >
< p > < strong > 运 行 SparkPi 测 试 < / strong > < / p >
2017-09-15 19:36:28 +08:00
< p > 我 们 将 任 务 运 行 在 < code > spark-cluster< / code > 的 namespace 中 , 启 动 5 个 executor 实 例 。 < / p >
2017-09-14 15:57:50 +08:00
< pre > < code class = "lang-bash" > ./bin/spark-submit \
--deploy-mode cluster \
--class org.apache.spark.examples.SparkPi \
--master k8s://https://172.20.0.113:6443 \
--kubernetes-namespace spark-cluster \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-driver:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-executor:v2.1.0-kubernetes-0.3.1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/kubespark-spark-init:v2.1.0-kubernetes-0.3.1 \
< span class = "hljs-built_in" > local< / span > :///opt/spark/examples/jars/spark-examples_2.11-2.1.0-k8s-0.3.1-SNAPSHOT.jar
< / code > < / pre >
< p > 关 于 该 命 令 参 数 的 介 绍 请 参 考 : < a href = "https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html" target = "_blank" > https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html< / a > < / p >
< p > < strong > 注 意 : < / strong > 该 jar 包 实 际 上 是 < code > spark.kubernetes.executor.docker.image< / code > 镜 像 中 的 。 < / p >
< p > 这 时 候 提 交 任 务 运 行 还 是 失 败 , 报 错 信 息 中 可 以 看 到 两 个 问 题 : < / p >
< ul >
< li > Executor 无 法 找 到 driver pod< / li >
< li > 用 户 < code > system:serviceaccount:spark-cluster:defaul< / code > 没 有 权 限 获 取 < code > spark-cluster< / code > 中 的 pod 信 息 。 < / li >
< / ul >
< p > 提 了 个 issue < a href = "https://github.com/apache-spark-on-k8s/spark/issues/478" target = "_blank" > Failed to run the sample spark-pi test using spark-submit on the doc #478< / a > < / p >
< p > 需 要 为 spark 集 群 创 建 一 个 < code > serviceaccount< / code > 和 < code > clusterrolebinding< / code > : < / p >
< pre > < code class = "lang-bash" > kubectl create serviceaccount spark --namespace spark-cluster
kubectl create rolebinding spark-edit --clusterrole=edit --serviceaccount=spark-cluster:spark --namespace=spark-cluster
< / code > < / pre >
< p > 该 Bug 将 在 新 版 本 中 修 复 。 < / p >
2017-09-19 19:26:13 +08:00
< h2 id = "用户指南" > 用 户 指 南 < / h2 >
2017-09-14 15:57:50 +08:00
< h3 id = "编译" > 编 译 < / h3 >
< p > Fork 并 克 隆 项 目 到 本 地 : < / p >
< pre > < code class = "lang-bash" > git < span class = "hljs-built_in" > clone< / span > https://github.com/rootsongjc/spark.git
< / code > < / pre >
< p > 编 译 前 请 确 保 你 的 环 境 中 已 经 安 装 Java8 和 Maven3。 < / p >
< pre > < code class = "lang-bash" > < span class = "hljs-comment" > ## 第 一 次 编 译 前 需 要 安 装 依 赖 < / span >
build/mvn install -Pkubernetes -pl resource-managers/kubernetes/core -am -DskipTests
< span class = "hljs-comment" > ## 编 译 spark on kubernetes< / span >
build/mvn compile -Pkubernetes -pl resource-managers/kubernetes/core -am -DskipTests
< span class = "hljs-comment" > ## 发 布 < / span >
dev/make-distribution.sh --tgz -Phadoop-2.7 -Pkubernetes
< / code > < / pre >
< p > 第 一 次 编 译 和 发 布 的 过 程 耗 时 可 能 会 比 较 长 , 请 耐 心 等 待 , 如 果 有 依 赖 下 载 不 下 来 , 请 自 备 梯 子 。 < / p >
< p > 详 细 的 开 发 指 南 请 见 : < a href = "https://github.com/apache-spark-on-k8s/spark/blob/branch-2.2-kubernetes/resource-managers/kubernetes/README.md" target = "_blank" > https://github.com/apache-spark-on-k8s/spark/blob/branch-2.2-kubernetes/resource-managers/kubernetes/README.md< / a > < / p >
< h3 id = "构建镜像" > 构 建 镜 像 < / h3 >
< p > 使 用 该 脚 本 来 自 动 构 建 容 器 镜 像 : < a href = "https://github.com/apache-spark-on-k8s/spark/pull/488" target = "_blank" > https://github.com/apache-spark-on-k8s/spark/pull/488< / a > < / p >
< p > 将 该 脚 本 放 在 < code > dist< / code > 目 录 下 , 执 行 : < / p >
< pre > < code class = "lang-bash" > ./build-push-docker-images.sh -r sz-pg-oam-docker-hub-001.tendcloud.com/library -t v2.1.0-kubernetes-0.3.1-1 build
./build-push-docker-images.sh -r sz-pg-oam-docker-hub-001.tendcloud.com/library -t v2.1.0-kubernetes-0.3.1-1 push
< / code > < / pre >
< p > < strong > 注 意 : < / strong > 如 果 你 使 用 的 MacOS, bash 的 版 本 可 能 太 低 , 执 行 改 脚 本 将 出 错 , 请 检 查 你 的 bash 版 本 : < / p >
< pre > < code class = "lang-bash" > bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
< / code > < / pre >
< p > 上 面 我 在 升 级 bash 之 前 获 取 的 版 本 信 息 , 使 用 下 面 的 命 令 升 级 bash: < / p >
< pre > < code class = "lang-bash" > brew install bash
< / code > < / pre >
< p > 升 级 后 的 bash 版 本 为 < code > 4.4.12(1)-release (x86_64-apple-darwin16.3.0)< / code > 。 < / p >
< p > 编 译 并 上 传 镜 像 到 我 的 私 有 镜 像 仓 库 , 将 会 构 建 出 如 下 几 个 镜 像 : < / p >
< pre > < code class = "lang-bash" > sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-resource-staging-server:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-shuffle:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor-py:v2.1.0-kubernetes-0.3.1-1
sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver-py:v2.1.0-kubernetes-0.3.1-1
< / code > < / pre >
< h2 id = "运行测试" > 运 行 测 试 < / h2 >
< p > 在 < code > dist/bin< / code > 目 录 下 执 行 spark-pi 测 试 : < / p >
< pre > < code class = "lang-bash" > ./spark-submit \
--deploy-mode cluster \
--class org.apache.spark.examples.SparkPi \
--master k8s://https://172.20.0.113:6443 \
--kubernetes-namespace spark-cluster \
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
< span class = "hljs-built_in" > local< / span > :///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar
< / code > < / pre >
< p > 详 细 的 参 数 说 明 见 : < a href = "https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html" target = "_blank" > https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html< / a > < / p >
< p > < strong > 注 意 : < / strong > < code > local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar< / code > 文 件 是 在 < code > spark-driver< / code > 和 < code > spark-executor< / code > 镜 像 里 的 , 在 上 一 步 构 建 镜 像 时 已 经 构 建 并 上 传 到 了 镜 像 仓 库 中 。 < / p >
< p > 执 行 日 志 显 示 : < / p >
< pre > < code class = "lang-bash" > 2017-09-14 14:59:01 INFO Client:54 - Waiting < span class = "hljs-keyword" > for< / span > application spark-pi to finish...
2017-09-14 14:59:01 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
labels: spark-app-selector -> spark< span class = "hljs-_" > -f< / span > 4d3a5d3ad964a05a51feb6191d50357, spark-role -> driver
pod uid: 304cf440-991a-11e7-970c< span class = "hljs-_" > -f< / span > 4e9d49f8ed0
creation time: 2017-09-14T06:59:01Z
service account name: spark
volumes: spark-token-zr8wv
node name: N/A
start time: N/A
container images: N/A
phase: Pending
status: []
2017-09-14 14:59:01 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
labels: spark-app-selector -> spark< span class = "hljs-_" > -f< / span > 4d3a5d3ad964a05a51feb6191d50357, spark-role -> driver
pod uid: 304cf440-991a-11e7-970c< span class = "hljs-_" > -f< / span > 4e9d49f8ed0
creation time: 2017-09-14T06:59:01Z
service account name: spark
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: N/A
container images: N/A
phase: Pending
status: []
2017-09-14 14:59:01 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
labels: spark-app-selector -> spark< span class = "hljs-_" > -f< / span > 4d3a5d3ad964a05a51feb6191d50357, spark-role -> driver
pod uid: 304cf440-991a-11e7-970c< span class = "hljs-_" > -f< / span > 4e9d49f8ed0
creation time: 2017-09-14T06:59:01Z
service account name: spark
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Pending
status: [ContainerStatus(containerID=null, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=< span class = "hljs-literal" > false< / span > , restartCount=0, state=ContainerState(running=null, terminated=null, waiting=ContainerStateWaiting(message=null, reason=ContainerCreating, additionalProperties={}), additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:03 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
labels: spark-app-selector -> spark< span class = "hljs-_" > -f< / span > 4d3a5d3ad964a05a51feb6191d50357, spark-role -> driver
pod uid: 304cf440-991a-11e7-970c< span class = "hljs-_" > -f< / span > 4e9d49f8ed0
creation time: 2017-09-14T06:59:01Z
service account name: spark
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Running
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6< span class = "hljs-built_in" > cd< / span > 4c62, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=< span class = "hljs-literal" > true< / span > , restartCount=0, state=ContainerState(running=ContainerStateRunning(startedAt=2017-09-14T06:59:02Z, additionalProperties={}), terminated=null, waiting=null, additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:12 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1505372339796-driver
namespace: spark-cluster
labels: spark-app-selector -> spark< span class = "hljs-_" > -f< / span > 4d3a5d3ad964a05a51feb6191d50357, spark-role -> driver
pod uid: 304cf440-991a-11e7-970c< span class = "hljs-_" > -f< / span > 4e9d49f8ed0
creation time: 2017-09-14T06:59:01Z
service account name: spark
volumes: spark-token-zr8wv
node name: 172.20.0.114
start time: 2017-09-14T06:59:01Z
container images: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
phase: Succeeded
status: [ContainerStatus(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6< span class = "hljs-built_in" > cd< / span > 4c62, image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1, imageID=docker-pullable://sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver@sha256:beb92a3e3f178e286d9e5baebdead88b5ba76d651f347ad2864bb6f8eda26f94, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=< span class = "hljs-literal" > false< / span > , restartCount=0, state=ContainerState(running=null, terminated=ContainerStateTerminated(containerID=docker://5c5c821c482a1e35552adccb567020532b79244392374f25754f0050e6< span class = "hljs-built_in" > cd< / span > 4c62, < span class = "hljs-built_in" > exit< / span > Code=0, finishedAt=2017-09-14T06:59:11Z, message=null, reason=Completed, signal=null, startedAt=null, additionalProperties={}), waiting=null, additionalProperties={}), additionalProperties={})]
2017-09-14 14:59:12 INFO LoggingPodStatusWatcherImpl:54 - Container final statuses:
Container name: spark-kubernetes-driver
Container image: sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1
Container state: Terminated
Exit code: 0
2017-09-14 14:59:12 INFO Client:54 - Application spark-pi finished.
< / code > < / pre >
< p > 从 日 志 中 可 以 看 到 任 务 运 行 的 状 态 信 息 。 < / p >
< p > 使 用 下 面 的 命 令 可 以 看 到 kubernetes 启 动 的 Pod 信 息 : < / p >
< pre > < code class = "lang-bash" > kubectl --namespace spark-cluster get pods -w
< / code > < / pre >
< p > 将 会 看 到 < code > spark-driver< / code > 和 < code > spark-exec< / code > 的 Pod 信 息 。 < / p >
2017-09-15 19:36:28 +08:00
< h2 id = "依赖管理" > 依 赖 管 理 < / h2 >
< p > 上 文 中 我 们 在 运 行 测 试 程 序 时 , 命 令 行 中 指 定 的 jar 文 件 已 包 含 在 docker 镜 像 中 , 是 不 是 说 我 们 每 次 提 交 任 务 都 需 要 重 新 创 建 一 个 镜 像 呢 ? 非 也 ! 如 果 真 是 这 样 也 太 麻 烦 了 。 < / p >
< h4 id = "创建-resource-staging-server" > 创 建 resource staging server< / h4 >
< p > 为 了 方 便 用 户 提 交 任 务 , 不 需 要 每 次 提 交 任 务 的 时 候 都 创 建 一 个 镜 像 , 我 们 使 用 了 < strong > resource staging server< / strong > 。 < / p >
< pre > < code > kubectl create -f conf/kubernetes-resource-staging-server.yaml
< / code > < / pre > < p > 我 们 同 样 将 其 部 署 在 < code > spark-cluster< / code > namespace 下 , 该 yaml 文 件 见 < a href = "https://github.com/rootsongjc/kubernetes-handbook" target = "_blank" > kubernetes-handbook< / a > 的 < code > manifests/spark-with-kubernetes-native-scheduler< / code > 目 录 。 < / p >
< h4 id = "优化" > 优 化 < / h4 >
< p > 其 中 有 一 点 需 要 优 化 , 在 使 用 下 面 的 命 令 提 交 任 务 时 , 使 用 < code > --conf spark.kubernetes.resourceStagingServer.uri< / code > 参 数 指 定 < em > resource staging server< / em > 地 址 , 用 户 不 应 该 关 注 < em > resource staging server< / em > 究 竟 运 行 在 哪 台 宿 主 机 上 , 可 以 使 用 下 面 两 种 方 式 实 现 : < / p >
< ul >
< li > 使 用 < code > nodeSelector< / code > 将 < em > resource staging server< / em > 固 定 调 度 到 某 一 台 机 器 上 , 该 地 址 依 然 使 用 宿 主 机 的 IP 地 址 < / li >
< li > 改 变 < code > spark-resource-staging-service< / code > service 的 type 为 < strong > ClusterIP< / strong > , 然 后 使 用 < strong > Ingress< / strong > 将 其 暴 露 到 集 群 外 部 , 然 后 加 入 的 内 网 DNS 里 , 用 户 使 用 DNS 名 称 指 定 < em > resource staging server< / em > 的 地 址 。 < / li >
< / ul >
< p > 然 后 可 以 执 行 下 面 的 命 令 来 提 交 本 地 的 jar 到 kubernetes 上 运 行 。 < / p >
< pre > < code class = "lang-bash" > ./spark-submit \
--deploy-mode cluster \
--class org.apache.spark.examples.SparkPi \
--master k8s://https://172.20.0.113:6443 \
--kubernetes-namespace spark-cluster \
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
../examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar
< / code > < / pre >
< p > 该 命 令 将 提 交 本 地 的 < code > ../examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar< / code > 文 件 到 < em > resource staging server< / em > , executor 将 从 该 server 上 获 取 jar 包 并 运 行 , 这 样 用 户 就 不 需 要 每 次 提 交 任 务 都 编 译 一 个 镜 像 了 。 < / p >
< p > 详 见 : < a href = "https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html#dependency-management" target = "_blank" > https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html#dependency-management< / a > < / p >
2017-09-19 19:26:13 +08:00
< h4 id = "设置-hdfs-用户" > 设 置 HDFS 用 户 < / h4 >
< p > 如 果 Hadoop 集 群 没 有 设 置 kerbros 安 全 认 证 的 话 , 在 指 定 < code > spark-submit< / code > 的 时 候 可 以 通 过 指 定 如 下 四 个 环 境 变 量 , 设 置 Spark 与 HDFS 通 信 使 用 的 用 户 : < / p >
< pre > < code class = "lang-bash" > --conf spark.kubernetes.driverEnv.SPARK_USER=hadoop
--conf spark.kubernetes.driverEnv.HADOOP_USER_NAME=hadoop
--conf spark.executorEnv.HADOOP_USER_NAME=hadoop
--conf spark.executorEnv.SPARK_USER=hadoop
< / code > < / pre >
2017-09-19 19:34:05 +08:00
< p > 使 用 hadoop 用 户 提 交 本 地 jar 包 的 命 令 示 例 : < / p >
< pre > < code class = "lang-bash" > ./spark-submit \
--deploy-mode cluster \
--class com.talkingdata.alluxio.hadooptest \
--master k8s://https://172.20.0.113:6443 \
--kubernetes-namespace spark-cluster \
--conf spark.kubernetes.driverEnv.SPARK_USER=hadoop \
--conf spark.kubernetes.driverEnv.HADOOP_USER_NAME=hadoop \
--conf spark.executorEnv.HADOOP_USER_NAME=hadoop \
--conf spark.executorEnv.SPARK_USER=hadoop \
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.resourceStagingServer.uri=http://172.20.0.114:31000 \
~/Downloads/tendcloud_2.10-1.0.jar
< / code > < / pre >
2017-09-19 19:26:13 +08:00
< p > 详 见 : < a href = "https://github.com/apache-spark-on-k8s/spark/issues/408" target = "_blank" > https://github.com/apache-spark-on-k8s/spark/issues/408< / a > < / p >
2017-09-22 20:25:47 +08:00
< h4 id = "限制-driver-和-executor-的资源使用" > 限 制 Driver 和 Executor 的 资 源 使 用 < / h4 >
< p > 在 执 行 < code > spark-submit< / code > 时 使 用 如 下 参 数 设 置 内 存 和 CPU 资 源 限 制 : < / p >
< pre > < code class = "lang-bash" > --conf spark.driver.memory=3G
--conf spark.executor.memory=3G
--conf spark.driver.cores=2
--conf spark.executor.cores=10
< / code > < / pre >
< p > 这 几 个 参 数 中 值 如 何 传 递 到 Pod 的 资 源 设 置 中 的 呢 ? < / p >
< p > 比 如 我 们 设 置 在 执 行 < code > spark-submit< / code > 的 时 候 传 递 了 这 样 的 两 个 参 数 : < code > --conf spark.driver.cores=2< / code > 和 < code > --conf spark.driver.memory=100G< / code > 那 么 查 看 driver pod 的 yaml 输 出 结 果 将 会 看 到 这 样 的 资 源 设 置 : < / p >
< pre > < code class = "lang-yaml" > < span class = "hljs-attr" > resources:< / span >
< span class = "hljs-attr" > limits:< / span >
< span class = "hljs-attr" > memory:< / span > < span class = "hljs-number" > 110< / span > Gi
< span class = "hljs-attr" > requests:< / span >
< span class = "hljs-attr" > cpu:< / span > < span class = "hljs-string" > " 2" < / span >
< span class = "hljs-attr" > memory:< / span > < span class = "hljs-number" > 100< / span > Gi
< / code > < / pre >
< p > 以 上 参 数 是 对 < code > request< / code > 值 的 设 置 , 那 么 < code > limit< / code > 的 资 源 设 置 的 值 又 是 从 何 而 来 ? < / p >
< p > 可 以 使 用 < code > spark.kubernetes.driver.limit.cores< / code > 和 < code > spark.kubernetes.executor.limit.cores< / code > 来 设 置 CPU的 hard limit。 < / p >
2017-09-27 19:33:55 +08:00
< p > memory limit 的 值 是 根 据 memory request 的 值 加 上 < code > spark.kubernetes.executor.memoryOverhead< / code > 的 值 计 算 而 来 的 , 该 配 置 项 用 于 设 置 分 配 给 每 个 executor 的 超 过 heap 内 存 的 值 ( 可 以 使 用 k、 m、 g单 位 ) 。 该 值 用 于 虚 拟 机 的 开 销 、 其 他 本 地 服 务 开 销 。 根 据 executor 的 大 小 设 置 ( 通 常 是 6%到 10%) 。 < / p >
< p > 我 们 可 以 这 样 来 提 交 一 个 任 务 , 同 时 设 置 driver 和 executor 的 CPU、 内 存 的 资 源 request 和 limit 值 ( driver 的 内 存 limit 值 为 request 值 的 110%) 。 < / p >
< pre > < code class = "lang-bash" > ./spark-submit \
--deploy-mode cluster \
--class org.apache.spark.examples.SparkPi \
--master k8s://https://172.20.0.113:6443 \
--kubernetes-namespace spark-cluster \
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.driver.memory=100G \
--conf spark.executor.memory=10G \
--conf spark.driver.cores=30 \
--conf spark.executor.cores=2 \
--conf spark.driver.maxResultSize=10240m \
--conf spark.kubernetes.driver.limit.cores=32 \
--conf spark.kubernetes.executor.limit.cores=3 \
--conf spark.kubernetes.executor.memoryOverhead=2g \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-driver:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.executor.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-executor:v2.1.0-kubernetes-0.3.1-1 \
--conf spark.kubernetes.initcontainer.docker.image=sz-pg-oam-docker-hub-001.tendcloud.com/library/spark-init:v2.1.0-kubernetes-0.3.1-1 \
< span class = "hljs-built_in" > local< / span > :///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.4.0-SNAPSHOT.jar 10000000
< / code > < / pre >
< p > 这 将 启 动 一 个 包 含 一 千 万 个 task 的 计 算 pi 的 spark 任 务 , 任 务 运 行 过 程 中 , drvier 的 CPU 实 际 消 耗 大 约 为 3 核 , 内 存 40G, 每 个 executor 的 CPU 实 际 消 耗 大 约 不 到 1 核 , 内 存 不 到 4G, 我 们 可 以 根 据 实 际 资 源 消 耗 不 断 优 化 资 源 的 request 值 。 < / p >
2017-09-22 20:25:47 +08:00
< p > < code > SPARK_DRIVER_MEMORY< / code > 和 < code > SPARK_EXECUTOR_MEMORY< / code > 和 分 别 作 为 Driver 容 器 和 Executor 容 器 启 动 的 环 境 变 量 , 比 如 下 面 这 个 Driver 启 动 的 CMD 中 : < / p >
< pre > < code class = "lang-bash" > CMD SPARK_CLASSPATH=< span class = "hljs-string" > " < span class = "hljs-variable" > ${SPARK_HOME}< / span > /jars/*" < / span > & & \
env | grep SPARK_JAVA_OPT_ | sed < span class = "hljs-string" > ' s/[^=]*=\(.*\)/\1/g' < / span > > /tmp/java_opts.txt & & \
< span class = "hljs-built_in" > readarray< / span > -t SPARK_DRIVER_JAVA_OPTS < /tmp/java_opts.txt & & \
< span class = "hljs-keyword" > if< / span > ! [ -z < span class = "hljs-variable" > ${SPARK_MOUNTED_CLASSPATH+x}< / span > ]; < span class = "hljs-keyword" > then< / span > SPARK_CLASSPATH=< span class = "hljs-string" > " < span class = "hljs-variable" > $SPARK_MOUNTED_CLASSPATH< / span > :< span class = "hljs-variable" > $SPARK_CLASSPATH< / span > " < / span > ; < span class = "hljs-keyword" > fi< / span > & & \
< span class = "hljs-keyword" > if< / span > ! [ -z < span class = "hljs-variable" > ${SPARK_SUBMIT_EXTRA_CLASSPATH+x}< / span > ]; < span class = "hljs-keyword" > then< / span > SPARK_CLASSPATH=< span class = "hljs-string" > " < span class = "hljs-variable" > $SPARK_SUBMIT_EXTRA_CLASSPATH< / span > :< span class = "hljs-variable" > $SPARK_CLASSPATH< / span > " < / span > ; < span class = "hljs-keyword" > fi< / span > & & \
< span class = "hljs-keyword" > if< / span > ! [ -z < span class = "hljs-variable" > ${SPARK_EXTRA_CLASSPATH+x}< / span > ]; < span class = "hljs-keyword" > then< / span > SPARK_CLASSPATH=< span class = "hljs-string" > " < span class = "hljs-variable" > $SPARK_EXTRA_CLASSPATH< / span > :< span class = "hljs-variable" > $SPARK_CLASSPATH< / span > " < / span > ; < span class = "hljs-keyword" > fi< / span > & & \
< span class = "hljs-keyword" > if< / span > ! [ -z < span class = "hljs-variable" > ${SPARK_MOUNTED_FILES_DIR+x}< / span > ]; < span class = "hljs-keyword" > then< / span > cp -R < span class = "hljs-string" > " < span class = "hljs-variable" > $SPARK_MOUNTED_FILES_DIR< / span > /." < / span > .; < span class = "hljs-keyword" > fi< / span > & & \
< span class = "hljs-keyword" > if< / span > ! [ -z < span class = "hljs-variable" > ${SPARK_MOUNTED_FILES_FROM_SECRET_DIR}< / span > ]; < span class = "hljs-keyword" > then< / span > cp -R < span class = "hljs-string" > " < span class = "hljs-variable" > $SPARK_MOUNTED_FILES_FROM_SECRET_DIR< / span > /." < / span > .; < span class = "hljs-keyword" > fi< / span > & & \
< span class = "hljs-variable" > ${JAVA_HOME}< / span > /bin/java < span class = "hljs-string" > " < span class = "hljs-variable" > ${SPARK_DRIVER_JAVA_OPTS[@]}< / span > " < / span > -cp < span class = "hljs-variable" > $SPARK_CLASSPATH< / span > -Xms< span class = "hljs-variable" > $SPARK_DRIVER_MEMORY< / span > -Xmx< span class = "hljs-variable" > $SPARK_DRIVER_MEMORY< / span > < span class = "hljs-variable" > $SPARK_DRIVER_CLASS< / span > < span class = "hljs-variable" > $SPARK_DRIVER_ARGS< / span >
< / code > < / pre >
< p > 我 们 可 以 看 到 对 < code > SPARK_DRIVER_MEMORY< / code > 环 境 变 量 的 引 用 。 Executor 的 设 置 与 driver 类 似 。 < / p >
< p > 而 我 们 可 以 使 用 这 样 的 参 数 来 传 递 环 境 变 量 的 值 < code > spark.executorEnv.[EnvironmentVariableName]< / code > , 只 要 将 < code > EnvironmentVariableName< / code > 替 换 为 环 境 变 量 名 称 即 可 。 < / p >
2017-09-14 15:57:50 +08:00
< h2 id = "参考" > 参 考 < / h2 >
2018-01-12 19:24:14 +08:00
< ul >
< li > < a href = "http://lxw1234.com/archives/2015/12/593.htm" target = "_blank" > Spark动 态 资 源 分 配 -Dynamic Resource Allocation< / a > < / li >
< li > < a href = "https://apache-spark-on-k8s.github.io/userdocs/running-on-kubernetes.html" target = "_blank" > Running Spark on Kubernetes< / a > < / li >
< li > < a href = "https://issues.apache.org/jira/browse/SPARK-18278" target = "_blank" > Apache Spark Jira Issue - 18278 - SPIP: Support native submission of spark jobs to a kubernetes cluster< / a > < / li >
< li > < a href = "https://github.com/kubernetes/kubernetes/issues/34377" target = "_blank" > Kubernetes Github Issue - 34377 Support Spark natively in Kubernetes< / a > < / li >
< li > < a href = "https://github.com/kubernetes/kubernetes/tree/master/examples/spark" target = "_blank" > Kubernetes example spark< / a > < / li >
< li > < a href = "https://github.com/rootsongjc/spark-on-kubernetes" target = "_blank" > https://github.com/rootsongjc/spark-on-kubernetes< / a > < / li >
< li > < a href = "https://github.com/apache-spark-on-k8s/spark/blob/branch-2.2-kubernetes/resource-managers/kubernetes/architecture-docs/scheduler-backend.md" target = "_blank" > Scheduler backend< / a > < / li >
< li > < a href = "https://banzaicloud.github.io/blog/spark-k8s/" target = "_blank" > Introduction to Spark on Kubernetes - banzaicloud.com< / a > < / li >
< li > < a href = "https://banzaicloud.com/blog/scaling-spark-k8s/" target = "_blank" > Scaling Spark made simple on Kubernetes - banzaicloud.com< / a > < / li >
< li > < a href = "https://banzaicloud.com/blog/spark-k8s-internals/" target = "_blank" > The anatomy of Spark applications on Kubernetes - banzaicloud.com< / a > < / li >
< li > < a href = "https://banzaicloud.com/blog/spark-monitoring/" target = "_blank" > Monitoring Apache Spark with Prometheus - banzaicloud.com< / a > < / li >
< li > < a href = "https://banzaicloud.com/blog/zeppelin-spark-k8/" target = "_blank" > Running Zeppelin Spark notebooks on Kubernetes - banzaicloud.com< / a > < / li >
< li > < a href = "https://banzaicloud.com/blog/pipeline-howto/" target = "_blank" > Apache Spark CI/CD workflow howto - banzaicloud.com< / a > < / li >
< / ul >
2017-10-09 15:28:05 +08:00
< footer class = "page-footer" > < span class = "copyright" > Copyright © jimmysong.io 2017 all right reserved, powered by Gitbook< / span > < span class = "footer-modification" > Updated:
2018-01-12 19:24:14 +08:00
2018-01-12 19:19:58
2017-10-09 15:28:05 +08:00
< / span > < / footer >
2017-09-14 15:57:50 +08:00
< / 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 >
2017-11-15 21:18:59 +08:00
< a href = "spark-standalone-on-kubernetes.html" class = "navigation navigation-prev " aria-label = "Previous page: Spark standalone on Kubernetes" >
2017-09-14 15:57:50 +08:00
< i class = "fa fa-angle-left" > < / i >
< / a >
2017-11-15 21:18:59 +08:00
< a href = "serverless.html" class = "navigation navigation-next " aria-label = "Next page: Serverless架构" >
2017-09-14 15:57:50 +08:00
< i class = "fa fa-angle-right" > < / i >
< / a >
< / div >
< script >
var gitbook = gitbook || [];
gitbook.push(function() {
2018-01-21 20:30:36 +08:00
gitbook.page.hasChanged({"page":{"title":"运行支持Kubernetes原生调度的Spark程序","level":"6.4.2","depth":2,"next":{"title":"Serverless架构","level":"6.5","depth":1,"path":"usecases/serverless.md","ref":"usecases/serverless.md","articles":[{"title":"理解Serverless","level":"6.5.1","depth":2,"path":"usecases/understanding-serverless.md","ref":"usecases/understanding-serverless.md","articles":[]},{"title":"FaaS-函数即服务","level":"6.5.2","depth":2,"path":"usecases/faas.md","ref":"usecases/faas.md","articles":[{"title":"OpenFaaS快速入门指南","level":"6.5.2.1","depth":3,"path":"usecases/openfaas-quick-start.md","ref":"usecases/openfaas-quick-start.md","articles":[]}]}]},"previous":{"title":"Spark standalone on Kubernetes","level":"6.4.1","depth":2,"path":"usecases/spark-standalone-on-kubernetes.md","ref":"usecases/spark-standalone-on-kubernetes.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"],"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":"Copyright © jimmysong.io 2017","modify_label":"Updated:","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://github.com/rootsongjc/kubernetes-handbook"},"editlink":{"label":"编辑本页","multilingual":false,"base":"https://github.com/rootsongjc/kubernetes-handbook/blob/master/"},"splitter":{},"codesnippet":{},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"favicon":{"shortcut":"favicon.ico","bookmark":"favicon.ico"},"page-toc-button":{},"back-to-top-button":{},"github-buttons":{"repo":"rootsongjc/kubernetes-handbook","types":["star"],"size":"small"},"3-ba":{"configuration":"auto","token":"11f7d254cfa4e0ca44b175c66d379ecc"},"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":"图片 - _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":"cloud-native/play-with-kubernetes.html#fig2.1.1","level":"2.1","list_caption":"Figure: Play with Kubernetes网页截图","alt":"Play with Kubernetes网页截图","nro":1,"url":"../images/play-with-kubernetes.jpg","index":1,"caption_template":"图片 - _CAPTION_","label":"Play with Kubernetes网页截图","attributes":{},"skip":false,"key":"2.1.1"},{"backlink":"cloud-native/kubernetes-and-cloud-native-app-overview.html#fig2.2.1","level":"2.2","list_caption":"Figure: 云计算演进历程","alt":"云计算演进历程","nro":2,"url":"../images/cloud-computing-evolution-road.jpg","index":1,"caption_template":"图片 - _CAPTION_","label":"云计算演进历程","attributes":{},"skip":false,"key":"2.2.1"},{"backlink":"cloud-native/kubernetes-and-cloud-native-app-overview.html#fig2.2.2","level":"2.2","list_caption":"Figure: 来自Twitter @MarcWilczek","alt":"来自Twitter @MarcWilczek","nro":3,"url":"../images/cloud-native-comes-of-age.jpg","index":2,"caption_template":"图片 - _CAPTION_","label":"来自Twitter @MarcWilczek","attributes":{},"skip":false,"key":"2.2.2"},{"backlink":"cloud-native/kubernetes-and-cloud-native-app-overview.html#fig2.2.3","level":"2.2","list_caption":"Figure: Cloud native<76> <65>
2017-09-14 15:57:50 +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 >
2017-09-19 21:38:03 +08:00
< script src = "../gitbook/gitbook-plugin-back-to-top-button/plugin.js" > < / script >
2017-09-14 15:57:50 +08:00
< script src = "../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js" > < / script >
< script src = "../gitbook/gitbook-plugin-search-plus/search.js" > < / script >
2017-10-09 15:28:05 +08:00
< script src = "../gitbook/gitbook-plugin-github-buttons/plugin.js" > < / script >
2017-10-11 18:13:13 +08:00
< script src = "../gitbook/gitbook-plugin-3-ba/plugin.js" > < / script >
2017-09-14 15:57:50 +08:00
< script src = "../gitbook/gitbook-plugin-sharing/buttons.js" > < / script >
< script src = "../gitbook/gitbook-plugin-fontsettings/fontsettings.js" > < / script >
< / body >
< / html >