fixing
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
<a @click="clickAds" :href="random.url" target="_blank" rel="nofollow" style="text-decoration: none;">
|
||||
<span class="name">
|
||||
@ -40,13 +40,16 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
ads: require('./ad-list'),
|
||||
isSharing: false
|
||||
isNotSharing: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (typeof window !== 'undefined') {
|
||||
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)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
132
.vuepress/components/InstallBanner.vue
Normal file
132
.vuepress/components/InstallBanner.vue
Normal 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>
|
||||
@ -7,18 +7,19 @@
|
||||
|
||||
<div>
|
||||
|
||||
<p style="color: red">必须选中下面的六个勾选框才能继续</p>
|
||||
<p style="color: red">必须选中下面的 {{envCount}} 个勾选框才能继续</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-item prop="checked" class="env-form-item">
|
||||
<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="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="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>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
@ -44,7 +45,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const ENV_COUNT = 6
|
||||
const ENV_COUNT = 7
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -62,6 +63,7 @@ export default {
|
||||
form: {
|
||||
checked: []
|
||||
},
|
||||
envCount: ENV_COUNT,
|
||||
rules: {
|
||||
checked: [{validator: validateEnv, trigger: 'change'}]
|
||||
}
|
||||
@ -85,7 +87,7 @@ export default {
|
||||
},
|
||||
envOk () {
|
||||
if (this.envOk) {
|
||||
this.$message.success('如果您符合刚才六个条件,请继续安装')
|
||||
this.$message.success(`如果您符合刚才 ${ENV_COUNT} 个条件,请继续安装`)
|
||||
this.$sendGaEvent('install-' + this.type, 'envOk-' + this.type, '已确认环境符合条件-' + this.type)
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,6 +203,7 @@ module.exports = {
|
||||
'k8s-intermediate/workload/wl-job/',
|
||||
'k8s-intermediate/workload/wl-job/spec',
|
||||
'k8s-intermediate/workload/wl-job/failure',
|
||||
'k8s-intermediate/workload/wl-job/cleanup',
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
302
.vuepress/public/install-script/k8s-dashboard/v2.0.0-beta5.yaml
Normal file
302
.vuepress/public/install-script/k8s-dashboard/v2.0.0-beta5.yaml
Normal 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: {}
|
||||
@ -345,7 +345,7 @@
|
||||
<div class="slider-item">
|
||||
<div class="testimonial-default">
|
||||
<!-- <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>
|
||||
</div>
|
||||
</div>
|
||||
@ -359,8 +359,8 @@
|
||||
<div class="slider-item">
|
||||
<div class="testimonial-default">
|
||||
<!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> -->
|
||||
<h4>2019年10月20日</h4>
|
||||
<h5>获得第 629 颗 Github Star</h5>
|
||||
<h4>2019年10月30日</h4>
|
||||
<h5>获得第 855 颗 Github Star</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 128 KiB |
@ -345,7 +345,7 @@
|
||||
<div class="slider-item">
|
||||
<div class="testimonial-default">
|
||||
<!-- <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>
|
||||
</div>
|
||||
</div>
|
||||
@ -359,8 +359,8 @@
|
||||
<div class="slider-item">
|
||||
<div class="testimonial-default">
|
||||
<!-- <div class="testimonial-default-img"><img src="landing/images/29.jpg" alt="" class="center-block img-fluid"></div> -->
|
||||
<h4>2019年10月20日</h4>
|
||||
<h5>获得第 629 颗 Github Star</h5>
|
||||
<h4>2019年10月30日</h4>
|
||||
<h5>获得第 855 颗 Github Star</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<h4>微信群</h4>
|
||||
<div>
|
||||
<div style="margin-top: 10px;">
|
||||
<span>微信扫码后,发送“加群”</span>
|
||||
<span>微信扫码</span>
|
||||
<p style="margin-top: 10px; margin-bottom: 0; text-align: center;">
|
||||
<!-- <img src="/images/dz.png" style="width: 150px;"></img> -->
|
||||
<img src="/images/dz2.jpeg" style="width: 150px;"></img>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="page-nav" style="max-width: 1000px; margin-top: 56px;">
|
||||
<AdSensePageTop></AdSensePageTop>
|
||||
</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 style="display: inline-block; vertical-align: top; line-height: 1.6rem;">
|
||||
<li>
|
||||
@ -58,13 +58,20 @@ import JoinCommunity from './JoinCommunity'
|
||||
export default {
|
||||
components: { PageEdit, PageNav, JoinCommunity },
|
||||
props: ['sidebarItems'],
|
||||
data () {
|
||||
return {
|
||||
isNotSharing: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (typeof window !== 'undefined') {
|
||||
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
|
||||
// 如果带参数 sharing,则设置 $frontmatter.isSharing = true
|
||||
this.$set(this.$frontmatter, 'isSharing', true)
|
||||
this.$set(this, 'isNotSharing', false)
|
||||
document.title = this.$frontmatter.sharingTitle || this.$page.title
|
||||
this.$frontmatter.title = this.$frontmatter.sharingTitle
|
||||
} else {
|
||||
this.$set(this, 'isNotSharing', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,12 +7,14 @@ description: 熟悉Kuboard_on_Kubernetes_的最佳途径。
|
||||
|
||||
<AdSenseTitle/>
|
||||
|
||||
**Kuboard 的设计目标**
|
||||
## Kuboard 的设计目标
|
||||
|
||||
* 降低 Kubernetes 学习门槛,让初学者先把 Kubernetes 用起来,再逐步理解 Kubernetes 中的各种概念
|
||||
* 提高 Kubernetes 运维的便捷性,让资深 Kubernetes 运维人员脱离 kubectl 命令行,直接在 Kuboard 界面中完成日常运维工作
|
||||
|
||||
**熟悉 Kuboard 的最佳途径**
|
||||
## 熟悉 Kuboard 的最佳途径
|
||||
|
||||
在您开始这一部分内容之前,请您确保您已经完成了 [Kubernetes入门教程](/learning/#kubernetes-入门) <Badge type="error">非常重要</Badge>
|
||||
|
||||
* 创建一个最简单的工作负载
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ kubectl -n kube-system create secret generic etcd-certs --from-file=/etc/kuberne
|
||||
|
||||
* 点击 ***展现层 / web-example***
|
||||
|
||||
如果您在下图中没有看到 ***Nginx 监控***, ***容器组监控*** 等,请刷新您的页面,因为监控套件初始化之后需要刷新页面才能加载并显示。
|
||||
如果您在下图中没有看到 ***Nginx 监控***, ***容器组监控*** 等,请刷新您的页面,因为监控套件初始化之后需要刷新页面才能加载并显示。<Badge type="error">刷新很重要</Badge>
|
||||
|
||||

|
||||
|
||||
|
||||
@ -35,9 +35,16 @@ Kubernetes Dashboard 是 Kubernetes 的官方 Web UI。使用 Kubernetes Dashboa
|
||||
执行如下命令,以安装 Kubernetes Dashboard
|
||||
|
||||
``` 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登录。
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
---
|
||||
vssueId: 15
|
||||
# layout: StepLayout
|
||||
sharingTitle: 参考这个文档能快速完成K8S安装,装不好还有人免费远程协助
|
||||
description: Kubernete安装文档_Kubernetes最新稳定版v1.16.2的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务
|
||||
meta:
|
||||
- name: keywords
|
||||
@ -36,40 +37,7 @@ meta:
|
||||
|
||||
## 文档特点
|
||||
|
||||
|
||||
<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>
|
||||
<InstallBanner version="v1.16.2" updateCount="64"/>
|
||||
|
||||
<!-- </div>
|
||||
<div slot="overview" style="min-height: 800px;"> -->
|
||||
@ -78,7 +46,7 @@ meta:
|
||||
|
||||
对于 Kubernetes 初学者,推荐在阿里云或腾讯云采购如下配置:(您也可以使用自己的虚拟机、私有云等您最容易获得的 Linux 环境)
|
||||
|
||||
* 3台 **2核4G** 的ECS(突发性能实例 t5 ecs.t5-c1m2.large或同等配置,单台约 0.4元/小时,停机时不收费)
|
||||
* 至少2台 **2核4G** 的服务器
|
||||
* **Cent OS 7.6**
|
||||
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
@ -86,9 +54,9 @@ meta:
|
||||
|
||||
<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)
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ curl -sSL https://kuboard.cn/install-script/v1.16.2/install_kubelet.sh | sh
|
||||
|
||||
监听端口: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
|
||||
|
||||
@ -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
|
||||
|
||||
> 根据每个人实际的情况不同,实现 LoadBalancer 的方式不一样,本文不详细阐述如何搭建 LoadBalancer,请读者自行解决
|
||||
> 根据每个人实际的情况不同,实现 LoadBalancer 的方式不一样,本文不详细阐述如何搭建 LoadBalancer,请读者自行解决,可以考虑的选择有:
|
||||
> * nginx
|
||||
> * haproxy
|
||||
> * keepalived
|
||||
> * 云供应商提供的负载均衡产品
|
||||
|
||||
### 初始化第一个master节点
|
||||
|
||||
@ -351,6 +355,34 @@ kubeadm join apiserver.demo:6443 --token ejwx62.vqwog6il5p83uk7y \
|
||||
--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 初始化结果**
|
||||
|
||||
``` sh
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
vssueId: 9
|
||||
layout: LearningLayout
|
||||
sharingTitle: 这里有一份免费在线答疑的 K8S 教程
|
||||
sharingTitle: 这里有一份最新的 K8S 教程,还可以免费在线答疑
|
||||
sidebarDepth: 0
|
||||
description: 本教程的主要依据是:Kubernetes官网文档,以及使用Kubernetes落地SpringCloud微服务并投产的实战经验,在线答疑。适用人群_ Kubernetes 初学者_学习过 Kubernetes,但在投产过程中仍有诸多疑虑和困惑的技术爱好者
|
||||
meta:
|
||||
|
||||
@ -22,7 +22,7 @@ metadata:
|
||||
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
|
||||
Kubernetes 将保留无效的节点 API 对象,并不断地检查该节点是否有效。除非您使用 `kubectl delete node my-first-k8s-node` 命令删除该节点。
|
||||
|
||||
@ -124,8 +124,8 @@ Events: <none>
|
||||
|
||||
依据你集群部署的方式(在哪个云供应商部署,或是在物理机上部署),Addesses 字段可能有所不同。
|
||||
* HostName: 在节点命令行界面上执行 `hostname` 命令所获得的值。启动 kubelet 时,可以通过参数 `--hostname-override` 覆盖
|
||||
* ExternalIP:通常是节点的外部IP(可以从集群外访问的IP地址,内网地址)
|
||||
* InternalIP:通常是从节点内部可以访问的 IP 地址(上面的例子中,此字段为空)
|
||||
* ExternalIP:通常是节点的外部IP(可以从集群外访问的内网IP地址;上面的例子中,此字段为空)
|
||||
* InternalIP:通常是从节点内部可以访问的 IP 地址
|
||||
|
||||
### Conditions
|
||||
|
||||
|
||||
@ -52,4 +52,4 @@ spec:
|
||||
|
||||
UID 是由 Kubernetes 系统生成的,唯一标识某个 Kubernetes 对象的字符串。
|
||||
|
||||
Kubernetes集群中,没创建一个对象,都有一个唯一的 UID。用于区分多次创建的同名对象(如前所述,按照名字删除对象后,重新再创建同名对象时,两次创建的对象 name 相同,但是 UID 不同。)
|
||||
Kubernetes集群中,每创建一个对象,都有一个唯一的 UID。用于区分多次创建的同名对象(如前所述,按照名字删除对象后,重新再创建同名对象时,两次创建的对象 name 相同,但是 UID 不同。)
|
||||
|
||||
@ -37,7 +37,7 @@ spec:
|
||||
|
||||
上述 YAML 文件可用来创建一个 Service:
|
||||
* 名字为 `my-service`
|
||||
* 目标端口未 TCP 9376
|
||||
* 目标端口为 TCP 9376
|
||||
* 选取所有包含标签 app=MyApp 的 Pod
|
||||
|
||||
关于 Service,您还需要了解:
|
||||
|
||||
56
learning/k8s-intermediate/workload/wl-job/cleanup.md
Normal file
56
learning/k8s-intermediate/workload/wl-job/cleanup.md
Normal 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#初始化容器的行为))。请不要混淆了
|
||||
:::
|
||||
23
learning/k8s-intermediate/workload/wl-job/pattern.md
Normal file
23
learning/k8s-intermediate/workload/wl-job/pattern.md
Normal 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 数据库中的主键
|
||||
* 等
|
||||
@ -1,11 +1,9 @@
|
||||
Kuboard v1.0.x 的更新说明
|
||||
|
||||
* NFS 使用优化
|
||||
* 下载日志文件
|
||||
* 配置 nfs 时,提示需要能够在节点上 mount,并给出 mount 语句
|
||||
|
||||
* EndPoint
|
||||
* 导入工作负载时,如果存储类没有 annotations,不应该报错
|
||||
* 表单校验:数据卷名不能带小数点
|
||||
* Kubernetes 体验的安装文档需要优化
|
||||
* Prometheus 监控
|
||||
* 工作负载编辑器 --> 容器组 --> 容忍 -- 正在开发
|
||||
* HostAliases
|
||||
|
||||
@ -9,6 +9,24 @@ description: 本文描述了Kuboard_v1.0.x的版本变更说明
|
||||
|
||||
Kuboard v1.0.x 的更新说明
|
||||
|
||||
## v1.0.4-beta.6
|
||||
|
||||
**发布日期**
|
||||
|
||||
2019年10月27日
|
||||
|
||||
**新特性**
|
||||
|
||||
* 可下载日志文件到本地
|
||||
|
||||
**优化**
|
||||
|
||||
* 创建 NFS 存储类 --> 增加合适的提示
|
||||
|
||||
**BUG 修复**
|
||||
|
||||
* 日志/终端在少数情况下不能正确加载的情况
|
||||
|
||||
## v1.0.4-beta.5
|
||||
|
||||
**发布日期**
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 128 KiB |
@ -61,7 +61,7 @@ export default {
|
||||
<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">
|
||||
<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>
|
||||
</el-card>
|
||||
</grid-item>
|
||||
|
||||
Reference in New Issue
Block a user