This commit is contained in:
huanqing.shao
2019-10-31 19:26:22 +08:00
parent e2b5ddc583
commit 005a047d3c
26 changed files with 622 additions and 71 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div :style="$isDev ? 'background-color: #grey;' : ''"> <div :style="$isDev ? 'background-color: #grey;' : ''">
<div class="ads" v-if="!$frontmatter.lessAds && $themeConfig.showAds && !isSharing"> <div class="ads" v-if="!$frontmatter.lessAds && $themeConfig.showAds && isNotSharing">
<div> <div>
<a @click="clickAds" :href="random.url" target="_blank" rel="nofollow" style="text-decoration: none;"> <a @click="clickAds" :href="random.url" target="_blank" rel="nofollow" style="text-decoration: none;">
<span class="name"> <span class="name">
@ -40,13 +40,16 @@ export default {
data () { data () {
return { return {
ads: require('./ad-list'), ads: require('./ad-list'),
isSharing: false isNotSharing: false
} }
}, },
mounted () { mounted () {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) { if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
this.isSharing = true // 如果带参数 sharing则设置 isSharing = true
this.$set(this, 'isNotSharing', false)
} else {
this.$set(this, 'isNotSharing', true)
} }
} }
}, },

View File

@ -0,0 +1,132 @@
<template>
<div>
<link rel="stylesheet" href="/landing/css/googlefont.css">
<link rel="stylesheet" href="/landing/css/font-awesome.min.css">
<link rel="stylesheet" href="/landing/css/style.css">
<link rel="stylesheet" href="/landing/css/components.css">
<div class="py-80" id="features" style="padding-top: 1rem;">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="text-center" style="margin-bottom: 1rem;">
<div class="text-primary-title">网上那么多 Kubernetes 安装文档为什么这篇文档更有参考价值</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4" >
<!-- InfoBox Center <Start> -->
<div class="cs-infobox-left mt-4 feature">
<div class="feature-title">
<img src="/landing/images/icn3.svg" alt="" class="img-fluid">
<div class="text-primary-title">广泛验证</div>
</div>
<div class="feature-description">
<li>每天有超过 300 人参考此文档完成 Kubernetes 集群的安装</li>
<li>不断有网友对安装文档提出改进意见</li>
</div>
</div>
<!-- InfoBox Center </End> -->
</div>
<div class="col-md-4 bg-gray">
<!-- InfoBox Center <Start> -->
<div class="cs-infobox-left mt-4 feature" data-aos="fade-up" data-aos-anchor-placement="top-bottom" data-aos-duration="1600">
<div class="feature-title">
<img src="/landing/images/icn4.svg" alt="" class="img-fluid">
<div class="text-primary-title">持续更新</div>
</div>
<div class="feature-description">
<li>始终有最新的 Kubernetes 稳定版安装文档</li>
<li>当前版本 Kubernetes {{version}}</li>
<li>已完成了 <span style="font-weight: 500; color: red;">{{updateCount}} 次更新</span>每次更新都帮您排除一个或更多可能踩的坑
<a href="https://github.com/eip-work/kuboard-press/commits/master/install/install-k8s.md" target="_blank">
查看更新历史
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg>
</a>
</li>
</div>
</div>
<!-- InfoBox Center </End> -->
</div>
<div class="col-md-4">
<!-- InfoBox Left <Start> -->
<div class="cs-infobox-left mt-4 feature" data-aos="fade-up" data-aos-anchor-placement="top-bottom" data-aos-duration="1000">
<div class="feature-title">
<img src="/landing/images/icn5.svg" alt="" class="img-fluid">
<div class="text-primary-title">适应面广</div>
</div>
<div class="feature-description">
<li>大部分的 K8S 安装文档都是个人爱好者的一份笔记而已他当时的特定条件并不一定适用于你</li>
<li>此文档经众多网友验证在公有云私有云自建虚拟机等多种条件下均适用</li>
</div>
</div>
<!-- InfoBox Left </End> -->
</div>
<div class="col-md-4 bg-gray">
<!-- InfoBox Center <Start> -->
<div class="cs-infobox-left mt-4 feature" data-aos="fade-up" data-aos-anchor-placement="top-bottom" data-aos-duration="1800">
<div class="feature-title">
<img src="/landing/images/icn1.svg" alt="" class="img-fluid">
<div class="text-primary-title">在线答疑</div>
</div>
<div class="feature-description">
<Qq></Qq> 808894550
<p>
<img src="/images/kuboard_qq.png" alt="Kubernetes安装QQ群在线答疑" style="width: 120px;"/>
<br/>如需远程协助请扫描本文页尾的微信二维码
</p>
</div>
</div>
<!-- InfoBox Center </End> -->
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
version: { type: String, required: true },
updateCount: { type: String, required: true }
},
data () {
return {
show: false
}
},
mounted () {
this.show = true
}
}
</script>
<style scoped>
.text-primary-title {
font-size: 1rem;
font-weight: 500;
margin-top: 0.7rem;
}
.feature {
text-align: left;
padding: 1rem;
margin-bottom: 0;
border-top: solid 1px #f7f7f7;
}
.feature-title {
display: inline-block;
text-align: center;
}
.feature-description {
display: inline-block;
max-width: calc(100% - 64px - 2rem);
padding: 0 0 0 1rem;
vertical-align: top;
text-align: left;
}
</style>

View File

@ -7,18 +7,19 @@
<div> <div>
<p style="color: red">必须选中下面的个勾选框才能继续</p> <p style="color: red">必须选中下面的 {{envCount}} 个勾选框才能继续</p>
<p>选中后显示 安装 docker/kubelet 的文档</p> <p>选中后显示 安装 docker/kubelet 的文档</p>
<div style="display: inline-block; width: 480px; max-width: calc(100vw - 100px); overflow: hidden; line-height: 40px; background-color: rgba(255,229,100,0.3); padding: 20px 0 0 20px; margin-bottom: 20px; border: 1px solid #d7dae2;"> <div style="display: inline-block; width: 520px; max-width: calc(100vw - 100px); overflow: hidden; line-height: 40px; background-color: rgba(255,229,100,0.3); padding: 20px 0 0 20px; margin-bottom: 20px; border: 1px solid #d7dae2;">
<el-form :model="form" ref="envForm" :rules="rules" style="text-align: left;"> <el-form :model="form" ref="envForm" :rules="rules" style="text-align: left;">
<el-form-item prop="checked" class="env-form-item"> <el-form-item prop="checked" class="env-form-item">
<el-checkbox-group v-model="form.checked"> <el-checkbox-group v-model="form.checked">
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="centos">我的任意节点 centos 版本在兼容列表中</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="centos">我的任意节点 centos 版本在兼容列表中</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="cpu">我的任意节点 CPU 内核数量大于等于 2</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="cpu">我的任意节点 CPU 内核数量大于等于 2</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="hostname">我的任意节点 hostname 不是 localhost且不包含下划线和小数点</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="hostname">我的任意节点 hostname 不是 localhost且不包含下划线小数点大写字母</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="ipaddress">我的任意节点都有固定的内网 IP 地址</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="ipaddress">我的任意节点都有固定的内网 IP 地址</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="networkcard">我的任意节点只有一块网卡可以在完成K8S安装后再添加网卡</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="networkcard">我的任意节点只有一块网卡可以在完成K8S安装后再添加网卡</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="nat">如果我直接使用vmware等创建虚拟机我使用NAT网络而不是桥接网络</el-checkbox> </li>
<li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="docker">我的任意节点不会直接使用 docker run docker-compose 运行容器</el-checkbox> </li> <li style="height: 40px;"> <el-checkbox style="width: 300px; max-width: calc(100vw - 100px); text-align: left;" label="docker">我的任意节点不会直接使用 docker run docker-compose 运行容器</el-checkbox> </li>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
@ -44,7 +45,7 @@
</template> </template>
<script> <script>
const ENV_COUNT = 6 const ENV_COUNT = 7
export default { export default {
props: { props: {
@ -62,6 +63,7 @@ export default {
form: { form: {
checked: [] checked: []
}, },
envCount: ENV_COUNT,
rules: { rules: {
checked: [{validator: validateEnv, trigger: 'change'}] checked: [{validator: validateEnv, trigger: 'change'}]
} }
@ -85,7 +87,7 @@ export default {
}, },
envOk () { envOk () {
if (this.envOk) { if (this.envOk) {
this.$message.success('如果您符合刚才个条件,请继续安装') this.$message.success(`如果您符合刚才 ${ENV_COUNT} 个条件,请继续安装`)
this.$sendGaEvent('install-' + this.type, 'envOk-' + this.type, '已确认环境符合条件-' + this.type) this.$sendGaEvent('install-' + this.type, 'envOk-' + this.type, '已确认环境符合条件-' + this.type)
} }
} }

View File

@ -203,6 +203,7 @@ module.exports = {
'k8s-intermediate/workload/wl-job/', 'k8s-intermediate/workload/wl-job/',
'k8s-intermediate/workload/wl-job/spec', 'k8s-intermediate/workload/wl-job/spec',
'k8s-intermediate/workload/wl-job/failure', 'k8s-intermediate/workload/wl-job/failure',
'k8s-intermediate/workload/wl-job/cleanup',
] ]
} }
] ]

View File

@ -0,0 +1,302 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Namespace
metadata:
name: kubernetes-dashboard
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
---
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
ports:
- port: 443
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
---
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-certs
namespace: kubernetes-dashboard
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-csrf
namespace: kubernetes-dashboard
type: Opaque
data:
csrf: ""
---
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-key-holder
namespace: kubernetes-dashboard
type: Opaque
---
kind: ConfigMap
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-settings
namespace: kubernetes-dashboard
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
rules:
# Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]
resources: ["secrets"]
resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs", "kubernetes-dashboard-csrf"]
verbs: ["get", "update", "delete"]
# Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["kubernetes-dashboard-settings"]
verbs: ["get", "update"]
# Allow Dashboard to get metrics.
- apiGroups: [""]
resources: ["services"]
resourceNames: ["heapster", "dashboard-metrics-scraper"]
verbs: ["proxy"]
- apiGroups: [""]
resources: ["services/proxy"]
resourceNames: ["heapster", "http:heapster:", "https:heapster:", "dashboard-metrics-scraper", "http:dashboard-metrics-scraper"]
verbs: ["get"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
rules:
# Allow Metrics Scraper to get metrics from the Metrics server
- apiGroups: ["metrics.k8s.io"]
resources: ["pods", "nodes"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kubernetes-dashboard
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubernetes-dashboard
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kubernetes-dashboard
---
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-dashboard
template:
metadata:
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- name: kubernetes-dashboard
image: kubernetesui/dashboard:v2.0.0-beta5
imagePullPolicy: Always
ports:
- containerPort: 8443
protocol: TCP
args:
- --auto-generate-certificates
- --namespace=kubernetes-dashboard
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
# Create on-disk volume to store exec logs
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
scheme: HTTPS
path: /
port: 8443
initialDelaySeconds: 30
timeoutSeconds: 30
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsUser: 1001
runAsGroup: 2001
volumes:
- name: kubernetes-dashboard-certs
secret:
secretName: kubernetes-dashboard-certs
- name: tmp-volume
emptyDir: {}
serviceAccountName: kubernetes-dashboard
nodeSelector:
"beta.kubernetes.io/os": linux
# Comment the following tolerations if Dashboard must not be deployed on master
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
---
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: dashboard-metrics-scraper
name: dashboard-metrics-scraper
namespace: kubernetes-dashboard
spec:
ports:
- port: 8000
targetPort: 8000
selector:
k8s-app: dashboard-metrics-scraper
---
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
k8s-app: dashboard-metrics-scraper
name: dashboard-metrics-scraper
namespace: kubernetes-dashboard
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: dashboard-metrics-scraper
template:
metadata:
labels:
k8s-app: dashboard-metrics-scraper
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
spec:
containers:
- name: dashboard-metrics-scraper
image: kubernetesui/metrics-scraper:v1.0.1
ports:
- containerPort: 8000
protocol: TCP
livenessProbe:
httpGet:
scheme: HTTP
path: /
port: 8000
initialDelaySeconds: 30
timeoutSeconds: 30
volumeMounts:
- mountPath: /tmp
name: tmp-volume
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsUser: 1001
runAsGroup: 2001
serviceAccountName: kubernetes-dashboard
nodeSelector:
"beta.kubernetes.io/os": linux
# Comment the following tolerations if Dashboard must not be deployed on master
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
volumes:
- name: tmp-volume
emptyDir: {}

View File

@ -345,7 +345,7 @@
<div class="slider-item"> <div class="slider-item">
<div class="testimonial-default"> <div class="testimonial-default">
<!-- <div class="testimonial-default-img"><img src="landing/images/female-75.jpg" alt="" class="center-block img-fluid"></div> --> <!-- <div class="testimonial-default-img"><img src="landing/images/female-75.jpg" alt="" class="center-block img-fluid"></div> -->
<h4>2019年8月3日推出 Kuboard</h4> <h4>2019年8月3日首次发布 Kuboard</h4>
<h5>获得种子用户,解决一些兼容性问题</h5> <h5>获得种子用户,解决一些兼容性问题</h5>
</div> </div>
</div> </div>
@ -359,8 +359,8 @@
<div class="slider-item"> <div class="slider-item">
<div class="testimonial-default"> <div class="testimonial-default">
<!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> --> <!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> -->
<h4>2019年10月20日</h4> <h4>2019年10月30日</h4>
<h5>获得第 629 颗 Github Star</h5> <h5>获得第 855 颗 Github Star</h5>
</div> </div>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -345,7 +345,7 @@
<div class="slider-item"> <div class="slider-item">
<div class="testimonial-default"> <div class="testimonial-default">
<!-- <div class="testimonial-default-img"><img src="landing/images/female-75.jpg" alt="" class="center-block img-fluid"></div> --> <!-- <div class="testimonial-default-img"><img src="landing/images/female-75.jpg" alt="" class="center-block img-fluid"></div> -->
<h4>2019年8月3日推出 Kuboard</h4> <h4>2019年8月3日首次发布 Kuboard</h4>
<h5>获得种子用户,解决一些兼容性问题</h5> <h5>获得种子用户,解决一些兼容性问题</h5>
</div> </div>
</div> </div>
@ -359,8 +359,8 @@
<div class="slider-item"> <div class="slider-item">
<div class="testimonial-default"> <div class="testimonial-default">
<!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> --> <!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> -->
<h4>2019年10月20日</h4> <h4>2019年10月30日</h4>
<h5>获得第 629 颗 Github Star</h5> <h5>获得第 855 颗 Github Star</h5>
</div> </div>
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
<h4>微信群</h4> <h4>微信群</h4>
<div> <div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<span>微信扫码发送加群</span> <span>微信扫码</span>
<p style="margin-top: 10px; margin-bottom: 0; text-align: center;"> <p style="margin-top: 10px; margin-bottom: 0; text-align: center;">
<!-- <img src="/images/dz.png" style="width: 150px;"></img> --> <!-- <img src="/images/dz.png" style="width: 150px;"></img> -->
<img src="/images/dz2.jpeg" style="width: 150px;"></img> <img src="/images/dz2.jpeg" style="width: 150px;"></img>

View File

@ -3,7 +3,7 @@
<div class="page-nav" style="max-width: 1000px; margin-top: 56px;"> <div class="page-nav" style="max-width: 1000px; margin-top: 56px;">
<AdSensePageTop></AdSensePageTop> <AdSensePageTop></AdSensePageTop>
</div> </div>
<div v-if="!$frontmatter.isSharing" class="page-nav" style="max-width: 1000px; margin: auto;"> <div v-if="isNotSharing" class="page-nav" style="max-width: 1000px; margin: auto;">
<div class="tip custom-block" style=" padding: 1rem; margin-top: 0;"> <div class="tip custom-block" style=" padding: 1rem; margin-top: 0;">
<div style="display: inline-block; vertical-align: top; line-height: 1.6rem;"> <div style="display: inline-block; vertical-align: top; line-height: 1.6rem;">
<li> <li>
@ -58,13 +58,20 @@ import JoinCommunity from './JoinCommunity'
export default { export default {
components: { PageEdit, PageNav, JoinCommunity }, components: { PageEdit, PageNav, JoinCommunity },
props: ['sidebarItems'], props: ['sidebarItems'],
data () {
return {
isNotSharing: false
}
},
mounted () { mounted () {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) { if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
// 如果带参数 sharing则设置 $frontmatter.isSharing = true // 如果带参数 sharing则设置 $frontmatter.isSharing = true
this.$set(this.$frontmatter, 'isSharing', true) this.$set(this, 'isNotSharing', false)
document.title = this.$frontmatter.sharingTitle || this.$page.title document.title = this.$frontmatter.sharingTitle || this.$page.title
this.$frontmatter.title = this.$frontmatter.sharingTitle this.$frontmatter.title = this.$frontmatter.sharingTitle
} else {
this.$set(this, 'isNotSharing', true)
} }
} }
} }

View File

@ -7,12 +7,14 @@ description: 熟悉Kuboard_on_Kubernetes_的最佳途径。
<AdSenseTitle/> <AdSenseTitle/>
**Kuboard 的设计目标** ## Kuboard 的设计目标
* 降低 Kubernetes 学习门槛,让初学者先把 Kubernetes 用起来,再逐步理解 Kubernetes 中的各种概念 * 降低 Kubernetes 学习门槛,让初学者先把 Kubernetes 用起来,再逐步理解 Kubernetes 中的各种概念
* 提高 Kubernetes 运维的便捷性,让资深 Kubernetes 运维人员脱离 kubectl 命令行,直接在 Kuboard 界面中完成日常运维工作 * 提高 Kubernetes 运维的便捷性,让资深 Kubernetes 运维人员脱离 kubectl 命令行,直接在 Kuboard 界面中完成日常运维工作
**熟悉 Kuboard 的最佳途径** ## 熟悉 Kuboard 的最佳途径
在您开始这一部分内容之前,请您确保您已经完成了 [Kubernetes入门教程](/learning/#kubernetes-入门) <Badge type="error">非常重要</Badge>
* 创建一个最简单的工作负载 * 创建一个最简单的工作负载

View File

@ -169,7 +169,7 @@ kubectl -n kube-system create secret generic etcd-certs --from-file=/etc/kuberne
* 点击 ***展现层 / web-example*** * 点击 ***展现层 / web-example***
如果您在下图中没有看到 ***Nginx 监控*** ***容器组监控*** 等,请刷新您的页面,因为监控套件初始化之后需要刷新页面才能加载并显示。 如果您在下图中没有看到 ***Nginx 监控*** ***容器组监控*** 等,请刷新您的页面,因为监控套件初始化之后需要刷新页面才能加载并显示。<Badge type="error">刷新很重要</Badge>
![Kubernetes教程在Kuboard中监控-查看Nginx监控、容器组监控入口](./monitor.assets/image-20190723152124196.png) ![Kubernetes教程在Kuboard中监控-查看Nginx监控、容器组监控入口](./monitor.assets/image-20190723152124196.png)

View File

@ -35,9 +35,16 @@ Kubernetes Dashboard 是 Kubernetes 的官方 Web UI。使用 Kubernetes Dashboa
执行如下命令,以安装 Kubernetes Dashboard 执行如下命令,以安装 Kubernetes Dashboard
``` sh ``` sh
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta5/aio/deploy/recommended.yaml
``` ```
如果访问不了该 yaml 文件,请使用下面的命令,效果是等价的
``` sh
kubectl apply -f https://kuboard.cn/install-script/k8s-dashboard/v2.0.0-beta5.yaml
```
## 访问 ## 访问
Kubernetes Dashboard 当前,只支持使用 Bearer Token登录。 Kubernetes Dashboard 当前,只支持使用 Bearer Token登录。

View File

@ -1,6 +1,7 @@
--- ---
vssueId: 15 vssueId: 15
# layout: StepLayout # layout: StepLayout
sharingTitle: 参考这个文档能快速完成K8S安装装不好还有人免费远程协助
description: Kubernete安装文档_Kubernetes最新稳定版v1.16.2的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务 description: Kubernete安装文档_Kubernetes最新稳定版v1.16.2的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务
meta: meta:
- name: keywords - name: keywords
@ -36,40 +37,7 @@ meta:
## 文档特点 ## 文档特点
<InstallBanner version="v1.16.2" updateCount="64"/>
<grid :rwd="{compact: 'stack'}">
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
<div>
**网上那么多 Kubernetes 安装文档,为什么这篇文档更有参考价值?**
* **众多网友验证**
* 每天有超过 300 人参照此文档完成 Kubernetes 安装
* 不断有网友对安装文档提出改进意见
* **持续更新和完善**
* 始终有最新的 Kubernetes 稳定版安装文档,当前版本 v1.16.2
* 当前已更新了 <font color="red"> 64 次 </font> [查看更新历史](https://github.com/eip-work/kuboard-press/commits/master/install/install-k8s.md)
* **适应面广**
* 网上大部分的 Kubernetes 安装文档,都是某位爱好者自己成功安装之后的一份笔记,他的特定条件,并不一定适用于你
* 此文档有众多网友验证,在公有云、私有云、自建虚拟机多种条件下均适用
* **在线答疑**
<Qq></Qq> QQ群号为808894550也可以扫描二维码加群
<p>
<img src="/images/kuboard_qq.png" alt="Kubernetes安装QQ群在线答疑"/>
</p>
</div>
</grid-item>
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '0/1'}" style="padding: 2rem 1rem 1rem 1rem;">
<AdSenseVertical/>
</grid-item>
</grid>
<!-- </div> <!-- </div>
<div slot="overview" style="min-height: 800px;"> --> <div slot="overview" style="min-height: 800px;"> -->
@ -78,7 +46,7 @@ meta:
对于 Kubernetes 初学者,推荐在阿里云或腾讯云采购如下配置:(您也可以使用自己的虚拟机、私有云等您最容易获得的 Linux 环境) 对于 Kubernetes 初学者,推荐在阿里云或腾讯云采购如下配置:(您也可以使用自己的虚拟机、私有云等您最容易获得的 Linux 环境)
* 3**2核4G**ECS突发性能实例 t5 ecs.t5-c1m2.large或同等配置单台约 0.4元/小时,停机时不收费) * 至少2**2核4G**服务器
* **Cent OS 7.6** * **Cent OS 7.6**
<grid :rwd="{compact: 'stack'}"> <grid :rwd="{compact: 'stack'}">
@ -86,9 +54,9 @@ meta:
<div> <div>
<!-- [领取腾讯云最高2860元代金券](https://cloud.tencent.com/act/cps/redirect?redirect=1040&cps_key=2ee6baa049659f4713ddc55a51314372&from=console) [领取腾讯云最高2860元代金券](https://cloud.tencent.com/act/cps/redirect?redirect=1040&cps_key=2ee6baa049659f4713ddc55a51314372&from=console)
[腾讯云限时1折秒杀](https://cloud.tencent.com/act/cps/redirect?redirect=1044&cps_key=2ee6baa049659f4713ddc55a51314372&from=console) --> [腾讯云限时1折秒杀](https://cloud.tencent.com/act/cps/redirect?redirect=1044&cps_key=2ee6baa049659f4713ddc55a51314372&from=console)
[领取阿里云最高2000元红包](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=obezo3pg) [领取阿里云最高2000元红包](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=obezo3pg)

View File

@ -156,7 +156,7 @@ curl -sSL https://kuboard.cn/install-script/v1.16.2/install_kubelet.sh | sh
监听端口6443 / TCP 监听端口6443 / TCP
后端资源组:包含 demo-master-a-1, demo-master-b-1, demo-master-b-2 后端资源组:包含 demo-master-a-1, demo-master-a-2, demo-master-a-3
后端端口6443 后端端口6443
@ -164,7 +164,11 @@ curl -sSL https://kuboard.cn/install-script/v1.16.2/install_kubelet.sh | sh
假设完成创建以后Load Balancer的 ip 地址为 x.x.x.x 假设完成创建以后Load Balancer的 ip 地址为 x.x.x.x
> 根据每个人实际的情况不同,实现 LoadBalancer 的方式不一样,本文不详细阐述如何搭建 LoadBalancer请读者自行解决 > 根据每个人实际的情况不同,实现 LoadBalancer 的方式不一样,本文不详细阐述如何搭建 LoadBalancer请读者自行解决,可以考虑的选择有:
> * nginx
> * haproxy
> * keepalived
> * 云供应商提供的负载均衡产品
### 初始化第一个master节点 ### 初始化第一个master节点
@ -351,6 +355,34 @@ kubeadm join apiserver.demo:6443 --token ejwx62.vqwog6il5p83uk7y \
--control-plane --certificate-key 70eb87e62f052d2d5de759969d5b42f372d0ad798f98df38f7fe73efdf63a13c --control-plane --certificate-key 70eb87e62f052d2d5de759969d5b42f372d0ad798f98df38f7fe73efdf63a13c
``` ```
::: tip 常见问题
如果一直停留在 pre-flight 状态,请在第二、三个节点上执行命令检查:
``` sh
curl -ik https://apiserver.demo:6443/version
```
输出结果应该如下所示
```
HTTP/1.1 200 OK
Cache-Control: no-cache, private
Content-Type: application/json
Date: Wed, 30 Oct 2019 08:13:39 GMT
Content-Length: 263
{
"major": "1",
"minor": "16",
"gitVersion": "v1.16.2",
"gitCommit": "2bd9643cee5b3b3a5ecbd3af49d09018f0773c77",
"gitTreeState": "clean",
"buildDate": "2019-09-18T14:27:17Z",
"goVersion": "go1.12.9",
"compiler": "gc",
"platform": "linux/amd64"
}
```
否则,请您检查一下您的 Loadbalancer 是否设置正确
:::
**检查 master 初始化结果** **检查 master 初始化结果**
``` sh ``` sh

View File

@ -1,7 +1,7 @@
--- ---
vssueId: 9 vssueId: 9
layout: LearningLayout layout: LearningLayout
sharingTitle: 这里有一份免费在线答疑的 K8S 教程 sharingTitle: 这里有一份最新的 K8S 教程,还可以免费在线答疑
sidebarDepth: 0 sidebarDepth: 0
description: 本教程的主要依据是Kubernetes官网文档以及使用Kubernetes落地SpringCloud微服务并投产的实战经验在线答疑。适用人群_ Kubernetes 初学者_学习过 Kubernetes但在投产过程中仍有诸多疑虑和困惑的技术爱好者 description: 本教程的主要依据是Kubernetes官网文档以及使用Kubernetes落地SpringCloud微服务并投产的实战经验在线答疑。适用人群_ Kubernetes 初学者_学习过 Kubernetes但在投产过程中仍有诸多疑虑和困惑的技术爱好者
meta: meta:

View File

@ -22,7 +22,7 @@ metadata:
name: "my-first-k8s-node" name: "my-first-k8s-node"
``` ```
Kubernetes 在 APIServer 上创建一个节点 API 对象(节点的描述),并且基于 `metadata.name` 字段对节点进行健康检查。如果节点有效([节点组件](/learning/k8s-bg/component.html#node-组件)正在运行),则可以向该节点调度 Pod否则该节点 API 对象将被忽略,知道节点变为有效状态。 Kubernetes 在 APIServer 上创建一个节点 API 对象(节点的描述),并且基于 `metadata.name` 字段对节点进行健康检查。如果节点有效([节点组件](/learning/k8s-bg/component.html#node-组件)正在运行),则可以向该节点调度 Pod否则该节点 API 对象将被忽略,直到节点变为有效状态。
::: tip ::: tip
Kubernetes 将保留无效的节点 API 对象,并不断地检查该节点是否有效。除非您使用 `kubectl delete node my-first-k8s-node` 命令删除该节点。 Kubernetes 将保留无效的节点 API 对象,并不断地检查该节点是否有效。除非您使用 `kubectl delete node my-first-k8s-node` 命令删除该节点。

View File

@ -124,8 +124,8 @@ Events: <none>
依据你集群部署的方式在哪个云供应商部署或是在物理机上部署Addesses 字段可能有所不同。 依据你集群部署的方式在哪个云供应商部署或是在物理机上部署Addesses 字段可能有所不同。
* HostName 在节点命令行界面上执行 `hostname` 命令所获得的值。启动 kubelet 时,可以通过参数 `--hostname-override` 覆盖 * HostName 在节点命令行界面上执行 `hostname` 命令所获得的值。启动 kubelet 时,可以通过参数 `--hostname-override` 覆盖
* ExternalIP通常是节点的外部IP可以从集群外访问的IP地址,内网地址 * ExternalIP通常是节点的外部IP可以从集群外访问的内网IP地址;上面的例子中,此字段为空
* InternalIP通常是从节点内部可以访问的 IP 地址(上面的例子中,此字段为空) * InternalIP通常是从节点内部可以访问的 IP 地址
### Conditions ### Conditions

View File

@ -52,4 +52,4 @@ spec:
UID 是由 Kubernetes 系统生成的,唯一标识某个 Kubernetes 对象的字符串。 UID 是由 Kubernetes 系统生成的,唯一标识某个 Kubernetes 对象的字符串。
Kubernetes集群中创建一个对象,都有一个唯一的 UID。用于区分多次创建的同名对象如前所述按照名字删除对象后重新再创建同名对象时两次创建的对象 name 相同,但是 UID 不同。) Kubernetes集群中创建一个对象,都有一个唯一的 UID。用于区分多次创建的同名对象如前所述按照名字删除对象后重新再创建同名对象时两次创建的对象 name 相同,但是 UID 不同。)

View File

@ -37,7 +37,7 @@ spec:
上述 YAML 文件可用来创建一个 Service 上述 YAML 文件可用来创建一个 Service
* 名字为 `my-service` * 名字为 `my-service`
* 目标端口 TCP 9376 * 目标端口 TCP 9376
* 选取所有包含标签 app=MyApp 的 Pod * 选取所有包含标签 app=MyApp 的 Pod
关于 Service您还需要了解 关于 Service您还需要了解

View File

@ -0,0 +1,56 @@
---
vssueId: 151
layout: LearningLayout
description: Kubernetes中的Job对象将创建一个或多个Pod_并确保指定数量的Pod可以成功执行到进程正常结束_本文描述Job如何终止和清理
meta:
- name: keywords
content: Kubernetes培训,K8S教程,K8S培训,Kubernetes Job
---
# Job的终止和清理
<AdSenseTitle>
</AdSenseTitle>
当 Job 完成后:
* 将不会创建新的 Pod
* 已经创建的 Pod 也不会被清理掉。此时,您仍然可以继续查看已结束 Pod 的日志,以检查 errors/warnings 或者其他诊断用的日志输出
* Job 对象也仍然保留着,以便您可以查看该 Job 的状态
* 由用户决定是否删除已完成的 Job 及其 Pod
* 可通过 `kubectl` 命令删除 Job例如 `kubectl delete jobs/pi` 或者 `kubectl delete -f ./job.yaml`
* 删除 Job 对象时,由该 Job 创建的 Pod 也将一并被删除
Job 通常会顺利的执行下去,但是在如下情况可能会非正常终止:
* 某一个 Pod 执行失败(且 `restartPolicy=Never`
* 或者某个容器执行出错(且 `restartPolicy=OnFailure`
* 此时Job 按照 [处理Pod和容器的失败](./failure.html) 中 `.spec.bakcoffLimit` 描述的方式进行处理
* 一旦重试次数达到了 `.spec.backoffLimit` 中的值Job 将被标记为失败,且尤其创建的所有 Pod 将被终止
* Job 中设置了 `.spec.activeDeadlineSeconds`。该字段限定了 Job 对象在集群中的存活时长,一旦达到 `.spec.activeDeadlineSeconds` 指定的时长,该 Job 创建的所有的 Pod 都将被终止Job 的 Status 将变为 `type:Failed``reason: DeadlineExceeded`
::: tip
Job 中 `.spec.activeDeadlineSeconds` 字段的优先级高于 `.spec.backoffLimit`。因此,正在重试失败 Pod 的 Job在达到 `.spec.activeDeadlineSecondes` 时,将立刻停止重试,即使 `.spec.backoffLimit` 还未达到。
:::
例如:
``` yaml
apiVersion: batch/v1
kind: Job
metadata:
name: pi-with-timeout
spec:
backoffLimit: 5
activeDeadlineSeconds: 100
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
```
::: tip 注意
Job 中有两个 activeDeadlineSeconds `.spec.activeDeadlineSeconds` 和 `.spec.template.spec.activeDeadlineSeconds`(参考 [Pod](/learning/k8s-intermediate/workload/init-container.html#初始化容器的行为))。请不要混淆了
:::

View File

@ -0,0 +1,23 @@
---
vssueId: 151
layout: LearningLayout
description: Kubernetes中的Job对象将创建一个或多个Pod_并确保指定数量的Pod可以成功执行到进程正常结束_本文描述Job相关的设计模式
meta:
- name: keywords
content: Kubernetes培训,K8S教程,K8S培训,Kubernetes Job
---
# Job设计模式
<AdSenseTitle>
</AdSenseTitle>
Kubernetes Job 对象可以用来支持 Pod 的并发执行,但是:
* Job 对象并非设计为支持需要紧密相互通信的Pod的并发执行例如科学计算
* Job 对象不支持并发处理一系列相互独立但是又相互关联的工作任务,例如:
* 发送邮件
* 渲染页面
* 转码文件
* 扫描 NoSQL 数据库中的主键
*

View File

@ -1,11 +1,9 @@
Kuboard v1.0.x 的更新说明 Kuboard v1.0.x 的更新说明
* NFS 使用优化
* 下载日志文件 * EndPoint
* 配置 nfs 时,提示需要能够在节点上 mount并给出 mount 语句
* 导入工作负载时,如果存储类没有 annotations不应该报错 * 导入工作负载时,如果存储类没有 annotations不应该报错
* 表单校验:数据卷名不能带小数点 * 表单校验:数据卷名不能带小数点
* Kubernetes 体验的安装文档需要优化
* Prometheus 监控 * Prometheus 监控
* 工作负载编辑器 --> 容器组 --> 容忍 -- 正在开发 * 工作负载编辑器 --> 容器组 --> 容忍 -- 正在开发
* HostAliases * HostAliases

View File

@ -9,6 +9,24 @@ description: 本文描述了Kuboard_v1.0.x的版本变更说明
Kuboard v1.0.x 的更新说明 Kuboard v1.0.x 的更新说明
## v1.0.4-beta.6
**发布日期**
2019年10月27日
**新特性**
* 可下载日志文件到本地
**优化**
* 创建 NFS 存储类 --> 增加合适的提示
**BUG 修复**
* 日志/终端在少数情况下不能正确加载的情况
## v1.0.4-beta.5 ## v1.0.4-beta.5
**发布日期** **发布日期**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -61,7 +61,7 @@ export default {
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}"> <grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}">
<el-card style="height: calc(100% - 2rem); color: #2c3e50; line-height: 1.7; margin-top: 1rem;" shadow="none"> <el-card style="height: calc(100% - 2rem); color: #2c3e50; line-height: 1.7; margin-top: 1rem;" shadow="none">
<li>Kuboard 诞生于大型微服务项目的落地实施,在其发布之前,就已经在许多个实际项目中经受住了考验</li> <li>Kuboard 诞生于大型微服务项目的落地实施,在其发布之前,就已经在许多个实际项目中经受住了考验</li>
<li>Kuboard 于2019年8月初公开发布个月时间就已经获得了 559 Github Star如图所示当前 <StarCount></StarCount></li> <li>Kuboard 于2019年8月初公开发布不到三个月时间就已经获得了 855 Github Star如图所示当前 <StarCount></StarCount></li>
<li>Kuboard 社群中,已有许多的用户将 Kuboard 用于自己的生产环境</li> <li>Kuboard 社群中,已有许多的用户将 Kuboard 用于自己的生产环境</li>
</el-card> </el-card>
</grid-item> </grid-item>