发布 kuboard-spray
This commit is contained in:
@ -4,6 +4,7 @@ let components = [
|
||||
{ name: 'CurrentVersion', component: () => import(`./CurrentVersion.vue`) },
|
||||
{ name: 'CurrentVersionV3', component: () => import(`./CurrentVersionV3.vue`) },
|
||||
{ name: 'KuboardDemo', component: () => import(`./KuboardDemo.vue`) },
|
||||
{ name: 'KuboardSprayResources', component: () => import(`./kuboard-spray/Resources.vue`)},
|
||||
]
|
||||
|
||||
export default function (Vue) {
|
||||
|
||||
50
.vuepress/comp/kuboard-spray/PackageContentField.vue
Normal file
50
.vuepress/comp/kuboard-spray/PackageContentField.vue
Normal file
@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<el-form-item
|
||||
v-if="dependon === undefined || holder[dependon]"
|
||||
:label="label || fieldName">
|
||||
<div v-if="holder">
|
||||
<template v-if="isBoolean">
|
||||
<el-switch disabled v-model="value"></el-switch>
|
||||
</template>
|
||||
<span v-else class="app_text_mono" style="font-size: 13px;">
|
||||
{{holder[fieldName]}}
|
||||
</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { FormItem, Switch } from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
holder: { type: Object, required: false, default: () => {} },
|
||||
fieldName: { type: String, required: true },
|
||||
dependon: { type: String, required: false, default: undefined },
|
||||
isBoolean: { type: Boolean, required: false, default: false },
|
||||
label: { type: String, required: false, default: undefined },
|
||||
},
|
||||
computed: {
|
||||
value: {
|
||||
get () {
|
||||
if (this.holder) {
|
||||
return this.holder[this.fieldName]
|
||||
}
|
||||
return undefined
|
||||
},
|
||||
set (v) {
|
||||
console.log(v)
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'el-form-item': FormItem,
|
||||
'el-switch': Switch,
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
154
.vuepress/comp/kuboard-spray/ResourceDetails.vue
Normal file
154
.vuepress/comp/kuboard-spray/ResourceDetails.vue
Normal file
@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<el-form class="app_form_mini" label-position="left" label-width="200px" size="mini">
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item name="1">
|
||||
<template #title>
|
||||
<span class="package_title">kuboardspray</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<PackageContentField :holder="resourcePackage.metadata" fieldName="version" label="资源包版本"></PackageContentField>
|
||||
<PackageContentField :holder="resourcePackage.metadata" fieldName="issue_date" label="发布时间"></PackageContentField>
|
||||
<PackageContentField :holder="resourcePackage.metadata" fieldName="kubespray_version"></PackageContentField>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item name="2">
|
||||
<template #title>
|
||||
<span class="package_title">kubernetes</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<el-form-item label="操作系统">
|
||||
<div v-for="(item, key) in resourcePackage.supported_os" :key="'os' + key">
|
||||
<el-tag effect="dark" size="mini">{{item.distribution}}</el-tag>
|
||||
<el-tag style="margin-left: 10px;" size="mini" v-for="(version, i) in item.versions" :key="'v' + key + '' + i">{{version}}</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<PackageContentField :holder="resourcePackage.kubernetes" fieldName="image_arch"></PackageContentField>
|
||||
<PackageContentField :holder="resourcePackage.kubernetes" fieldName="gcr_image_repo"></PackageContentField>
|
||||
<PackageContentField :holder="resourcePackage.kubernetes" fieldName="kube_image_repo"></PackageContentField>
|
||||
<PackageContentField :holder="resourcePackage.kubernetes" fieldName="kube_version"></PackageContentField>
|
||||
<el-form-item label="容器引擎">
|
||||
<div v-for="(engine, index) in resourcePackage.container_engine" :key="'ce' + index">
|
||||
<el-tag size="mini">
|
||||
<span class="app_text_mono">{{engine.container_manager}}_{{engine.params.containerd_version || engine.params.docker_version}}</span>
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item name="3">
|
||||
<template #title>
|
||||
<span class="package_title">etcd</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<PackageContentField :holder="resourcePackage.etcd" fieldName="etcd_version"></PackageContentField>
|
||||
<el-form-item label="etcd_deployment_type">
|
||||
<div v-for="(item, key) in resourcePackage.etcd.etcd_deployment_type" :key="'k' + key">
|
||||
<el-tag size="mini">{{item}}</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item name="4">
|
||||
<template #title>
|
||||
<span class="package_title">cni</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<div v-for="(item, index) in resourcePackage.cni" :key="index + 'cni'">
|
||||
<el-form-item :label="item.target">
|
||||
<div class="app_text_mono" style="font-size: 13px">
|
||||
{{item.version}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item name="5">
|
||||
<template #title>
|
||||
<span class="package_title">依赖组件</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<div v-for="(item, index) in resourcePackage.dependency" :key="index + 'dependency'">
|
||||
<el-form-item :label="item.target">
|
||||
<div class="app_text_mono" style="font-size: 13px">
|
||||
{{item.version}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item name="6">
|
||||
<template #title>
|
||||
<span class="package_title">可选组件</span>
|
||||
</template>
|
||||
<div class="package_info">
|
||||
<div v-for="(item, index) in resourcePackage.addons" :key="index + 'addons'">
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<div style="font-weight: bolder;">{{item.name}}</div>
|
||||
</template>
|
||||
<div class="app_text_mono">
|
||||
<el-tag type="success" size="mini" v-if="item.included">已包含</el-tag>
|
||||
<el-tag type="info" size="mini" v-else>未包含</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<div class="package_info">
|
||||
<template v-for="(value, key) in item.params">
|
||||
<el-form-item :label="key" label-width="280px" v-if="value.indexOf('{{') < 0" :key="key + 'addons' + index">
|
||||
<template #label>
|
||||
<div style="font-size: 12px">{{key}}</div>
|
||||
</template>
|
||||
<div class="app_text_mono" style="font-size: 12px">
|
||||
{{value}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PackageContentField from './PackageContentField.vue'
|
||||
import {Form, FormItem, Collapse, CollapseItem, Tag} from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
resourcePackage: { type: Object, required: true },
|
||||
expandAll: { type: Boolean, required: false, default: false },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeNames: this.expandAll ? ['1','2','3','4','5','6'] : ['2'],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
components: {
|
||||
PackageContentField,
|
||||
'el-form': Form,
|
||||
'el-form-item': FormItem,
|
||||
'el-collapse': Collapse,
|
||||
'el-collapse-item': CollapseItem,
|
||||
'el-tag': Tag,
|
||||
},
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="css">
|
||||
.package_title {
|
||||
font-weight: bolder;
|
||||
font-family: Consolas,Menlo,Bitstream Vera Sans Mono,Monaco,"微软雅黑",monospace;
|
||||
}
|
||||
.package_info {
|
||||
margin-left: 20px;
|
||||
font-family: Consolas,Menlo,Bitstream Vera Sans Mono,Monaco,"微软雅黑",monospace;
|
||||
}
|
||||
</style>
|
||||
182
.vuepress/comp/kuboard-spray/ResourceOffline.vue
Normal file
182
.vuepress/comp/kuboard-spray/ResourceOffline.vue
Normal file
@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form label-position="left" label-width="120px" @click.prevent.stop>
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<b-badge variant="primary">步骤一</b-badge>
|
||||
选择镜像
|
||||
</template>
|
||||
<div style="line-height: 28px; padding: 10px 20px 0px 20px; background-color: #eee;">
|
||||
<el-radio-group v-model="downloadFrom">
|
||||
<div v-for="(item, index) in resourcePackage.metadata.available_at" :key="'aa' + index">
|
||||
<el-radio :label="item"></el-radio>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<b-badge variant="primary">步骤二</b-badge>
|
||||
下载镜像
|
||||
</template>
|
||||
<codemirror :value="loadShell" :options="cmShellOptions" class="create_resource_offline_shell_codemirror"></codemirror>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<b-badge variant="primary">步骤三</b-badge>
|
||||
导入到 Kuboard-Spray
|
||||
</template>
|
||||
<div style="margin-bottom: 10px">
|
||||
<li>复制下面的 YAML 内容到粘贴板; <el-button icon="el-icon-thumb" type="primary" plain @click="selectAll">全 选</el-button> 然后在代码上点鼠标右键 --> 选择复制</li>
|
||||
<li>在 Kuboard-Spray 界面中导航到 “系统设置” --> “资源包管理” 菜单,点击 “离线加载资源包”,按界面提示操作,即可完成资源包的离线导入。</li>
|
||||
</div>
|
||||
<codemirror ref="cm" :value="loadYaml" :options="cmYamlOptions" class="app_codemirror_auto_height"></codemirror>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Form, FormItem, RadioGroup, Radio, Button } from 'element-ui'
|
||||
import { codemirror } from 'vue-codemirror'
|
||||
import 'codemirror/lib/codemirror.css'
|
||||
import "codemirror/theme/darcula.css"
|
||||
import "codemirror/mode/yaml/yaml.js"
|
||||
import "codemirror/mode/shell/shell.js"
|
||||
import yaml from 'js-yaml'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
resourcePackage: { type: Object, required: true }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
downloadFrom: undefined,
|
||||
showCm: false,
|
||||
showPopover: false,
|
||||
cmShellOptions: {
|
||||
mode: "shell", // Language mode
|
||||
theme: "darcula", // Theme
|
||||
lineNumbers: true, // Show line number
|
||||
lineWrapping: true,
|
||||
smartIndent: true, // Smart indent
|
||||
indentUnit: 2, // The smart indent unit is 2 spaces in length
|
||||
foldGutter: true, // Code folding
|
||||
styleActiveLine: true, // Display the style of the selected row
|
||||
},
|
||||
cmYamlOptions: {
|
||||
mode: "yaml", // Language mode
|
||||
theme: "darcula", // Theme
|
||||
lineNumbers: true, // Show line number
|
||||
lineWrapping: true,
|
||||
smartIndent: true, // Smart indent
|
||||
indentUnit: 2, // The smart indent unit is 2 spaces in length
|
||||
foldGutter: true, // Code folding
|
||||
styleActiveLine: true, // Display the style of the selected row
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
loadShell: {
|
||||
get () {
|
||||
return `# 1. 在一台可以联网的机器上执行
|
||||
docker pull ${this.downloadFrom}:${this.resourcePackage.metadata.version}
|
||||
docker save ${this.downloadFrom}:${this.resourcePackage.metadata.version} > kuboard-spray-resource.tar
|
||||
|
||||
# 2. 将 kuboard-spray-resource.tar 复制到 kuboard-spray 所在的服务器(例如:10.99.0.11 的 /root/kuboard-spray-resource.tar)
|
||||
scp ./kuboard-spray-resource.tar root@10.99.0.11:/root/kuboard-spray-resource.tar
|
||||
|
||||
# 3. 在 kuboard-spray 所在的服务器上执行,(例如:10.99.0.11)
|
||||
docker load < /root/kuboard-spray-resource.tar
|
||||
`
|
||||
},
|
||||
set () {}
|
||||
},
|
||||
loadYaml: {
|
||||
get () {
|
||||
return yaml.dump({
|
||||
downloadFrom: this.downloadFrom,
|
||||
package: this.resourcePackage,
|
||||
})
|
||||
},
|
||||
set () {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'el-form': Form,
|
||||
'el-form-item': FormItem,
|
||||
'el-radio-group': RadioGroup,
|
||||
'el-radio': Radio,
|
||||
'el-button': Button,
|
||||
codemirror,
|
||||
},
|
||||
watch: {
|
||||
resourcePackage (newValue) {
|
||||
console.log(newValue.metadata.available_at[0])
|
||||
this.downloadFrom = newValue.metadata.available_at[0]
|
||||
setTimeout(_ => {
|
||||
this.showCm = true
|
||||
}, 300)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.downloadFrom = this.resourcePackage.metadata.available_at[0]
|
||||
},
|
||||
methods: {
|
||||
copySuccess () {
|
||||
this.$bvToast.toast(`已复制到粘贴板`, {
|
||||
title: '已复制',
|
||||
autoHideDelay: 5000,
|
||||
appendToast: true,
|
||||
variant: "success",
|
||||
})
|
||||
},
|
||||
copyError () {
|
||||
console.log('error')
|
||||
},
|
||||
selectAll () {
|
||||
this.$refs.cm.codemirror.execCommand('selectAll')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.create_resource_offline_shell_codemirror .CodeMirror {
|
||||
height: 210px !important;
|
||||
line-height: 18px;
|
||||
font-size: 13px;
|
||||
font-family: Consolas,Menlo,Bitstream Vera Sans Mono,Monaco,"微软雅黑",monospace !important;
|
||||
}
|
||||
|
||||
.create_resource_offline_shell_codemirror .CodeMirror-wrap pre.CodeMirror-line, .CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.create_resource_offline_shell_codemirror .CodeMirror-scroll {
|
||||
height: 210px !important;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
|
||||
.app_codemirror_auto_height .CodeMirror {
|
||||
height: auto;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
font-family: Consolas,Menlo,Bitstream Vera Sans Mono,Monaco,"微软雅黑",monospace !important;
|
||||
}
|
||||
|
||||
.app_codemirror_auto_height .CodeMirror-wrap pre.CodeMirror-line, .CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.app_codemirror_auto_height .CodeMirror-scroll {
|
||||
height: auto;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
169
.vuepress/comp/kuboard-spray/Resources.vue
Normal file
169
.vuepress/comp/kuboard-spray/Resources.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-alert title="资源包列表" type="default" :closable="false" show>
|
||||
<div class="description">
|
||||
<li>Kuboard 提供一组经过预先测试验证的资源包列表,可以帮助您快速完成集群安装</li>
|
||||
<li>您也可以参考项目 https://github.com/eip-work/kuboard-spray-resource 自己创建资源包</li>
|
||||
</div>
|
||||
</b-alert>
|
||||
<div class="contentList">
|
||||
<b-table striped hover v-if="mergedPackageList" :items="mergedPackageList" :fields="fields" head-variant="dark" table-variant="light">
|
||||
<template #cell(version)="data">
|
||||
<span class="app_text_mono">{{data.item.version}}</span>
|
||||
</template>
|
||||
<template #cell(container_engine)="data">
|
||||
<div v-if="data.item.package">
|
||||
<div v-for="(engine, key) in data.item.package.container_engine" :key="`c${data.index}_${key}`">
|
||||
<b-badge>{{ engine.container_manager }}_{{ engine.params[engine.container_manager + '_version'] }}</b-badge>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #cell(supported_os)="data">
|
||||
<div v-if="data.item.package">
|
||||
<div v-for="(os, key) in data.item.package.supported_os" :key="`os${data.index}_${key}`">
|
||||
<b-badge>
|
||||
{{ os.distribution }}<span
|
||||
v-for="(v, i) in os.versions" :key="key + 'v' + i">_{{v}}</span>
|
||||
</b-badge>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #cell(action)="data">
|
||||
<b-button variant="primary" @click="showVersion(data.item)">离线导入</b-button>
|
||||
</template>
|
||||
</b-table>
|
||||
</div>
|
||||
|
||||
<b-modal id="version-modal" centered scrollable size="xl" class="app_form_mini">
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane name="details" label="资源包内容">
|
||||
<div class="resource_tab_pane">
|
||||
<ResourceDetails v-if="currentVersion" ref="details" expandAll :resourcePackage="currentVersion"></ResourceDetails>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="offline" label="离线导入">
|
||||
<div class="resource_tab_pane" v-if="activeName == 'offline'">
|
||||
<ResourceOffline v-if="currentVersion" :resourcePackage="currentVersion"></ResourceOffline>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template #modal-title>
|
||||
离线导入资源包
|
||||
</template>
|
||||
<template #modal-footer>
|
||||
<b-button @click="$bvModal.hide('version-modal')">关闭对话框</b-button>
|
||||
<b-button variant="primary" @click="activeName = 'offline'">离线导入</b-button>
|
||||
</template>
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import yaml from 'js-yaml'
|
||||
import ResourceDetails from './ResourceDetails.vue'
|
||||
import ResourceOffline from './ResourceOffline.vue'
|
||||
import { Tabs, TabPane } from 'element-ui'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
availablePackageList: undefined,
|
||||
packageMap: {},
|
||||
importedPackageMap: {},
|
||||
fields: [
|
||||
{ key: 'version', label: '版 本' },
|
||||
{ key: 'package.metadata.kubespray_version', label: 'Kubespray' },
|
||||
{ key: 'package.kubernetes.kube_version', label: 'Kubernetes' },
|
||||
{ key: 'container_engine', label: '容器引擎'},
|
||||
{ key: 'supported_os', label: '操作系统'},
|
||||
{ key: 'action', label: '操 作'},
|
||||
],
|
||||
currentVersion: undefined,
|
||||
activeName: 'details',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
mergedPackageList () {
|
||||
let result = []
|
||||
for (let i in this.availablePackageList) {
|
||||
result.push(this.availablePackageList[i])
|
||||
}
|
||||
return result
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ResourceDetails,
|
||||
ResourceOffline,
|
||||
'el-tabs': Tabs,
|
||||
'el-tab-pane': TabPane,
|
||||
},
|
||||
mounted () {
|
||||
this.refresh()
|
||||
},
|
||||
methods: {
|
||||
|
||||
async refresh () {
|
||||
this.importedPackageMap = {}
|
||||
this.packageMap = {}
|
||||
this.availablePackageList = undefined
|
||||
await axios.get('https://addons.kuboard.cn/v-kuboard-spray-resources/package-list.yaml?nocache=' + new Date().getTime()).then(resp => {
|
||||
this.availablePackageList = yaml.load(resp.data).items
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
this.$message.error('离线环境')
|
||||
})
|
||||
|
||||
for (let i in this.mergedPackageList) {
|
||||
let packageVersion = this.mergedPackageList[i]
|
||||
this.loadPackageFromRepository(packageVersion)
|
||||
}
|
||||
},
|
||||
loadPackageFromRepository (packageVersion) {
|
||||
axios.get(`https://addons.kuboard.cn/v-kuboard-spray-resources/${packageVersion.version}/package.yaml?nocache=${new Date().getTime()}`).then(resp => {
|
||||
setTimeout(() => {
|
||||
this.$set(packageVersion, 'package', yaml.load(resp.data))
|
||||
this.$set(packageVersion, 'loaded', true)
|
||||
// this.packageMap[packageVersion.version].loaded = true
|
||||
}, 500)
|
||||
}).catch(e => {
|
||||
this.$message.error(e + '')
|
||||
this.packageMap[packageVersion.version].loaded = false
|
||||
})
|
||||
},
|
||||
showVersion (version) {
|
||||
this.currentVersion = version.package
|
||||
this.$bvModal.show('version-modal')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app_form_mini .el-form-item {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.app_form_mini .el-form-item__label {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped lang="css">
|
||||
.description {
|
||||
line-height: 28px;
|
||||
}
|
||||
.contentList {
|
||||
width: 100%;
|
||||
}
|
||||
.app_text_mono {
|
||||
font-family: Consolas,Menlo,Bitstream Vera Sans Mono,Monaco,"微软雅黑",monospace !important;
|
||||
}
|
||||
.resource_tab_pane {
|
||||
height: calc(100vh - 300px);
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -34,9 +34,8 @@ let sidebar = {
|
||||
collapsable: false,
|
||||
children: [
|
||||
// 'install-docker-desktop',
|
||||
['install-k8s', '安装Kubernetes单Master节点'],
|
||||
'install-kubernetes',
|
||||
'sealos/',
|
||||
['install-k8s', '安装高可用的 Kubernetes 集群'],
|
||||
// 'install-kubernetes',
|
||||
'install-node-port-range',
|
||||
'docker-mirror',
|
||||
'k8s-restart',
|
||||
@ -769,6 +768,7 @@ let sidebar = {
|
||||
collapsable: false,
|
||||
children: [
|
||||
'',
|
||||
'kuboard-spray/'
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@ -3,7 +3,6 @@ import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
|
||||
import 'vue2-animate/dist/vue2-animate.min.css';
|
||||
|
||||
|
||||
import AOS from 'aos';
|
||||
import 'aos/dist/aos.css';
|
||||
|
||||
@ -27,13 +26,13 @@ const VueFractionGrid = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default ({
|
||||
Vue, // VuePress 正在使用的 Vue 构造函数
|
||||
options, // 附加到根实例的一些选项
|
||||
router, // 当前应用的路由实例
|
||||
siteData // 站点元数据
|
||||
}) => {
|
||||
Vue.prototype.$ELEMENT = { size: 'mini', zIndex: 3000 }
|
||||
Vue.use(VueClipboard)
|
||||
Vue.use(BootstrapVue)
|
||||
Vue.use(BootstrapVueIcons)
|
||||
|
||||
@ -12,7 +12,7 @@ description: 通过Kuboard将一个预先定义好的SpringCloud微服务样例
|
||||
必须具备如下条件:
|
||||
|
||||
* Kubernetes 集群,版本不低于 v1.13.0
|
||||
* 如果您还没有 Kubernetes 集群,请参考 [安装Kubernetes单Master节点集群](/install/install-k8s.html)
|
||||
* 如果您还没有 Kubernetes 集群,请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* Kuboard 微服务管理界面,版本不低于 v2.0.0-beta.3
|
||||
* 请参考 [安装 Kuboard](/install/v3/install.html)
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ Kuboard Proxy 提供了 Auth Proxy 的功能,本文以 Grafana 为例,介绍
|
||||
|
||||
## 前提
|
||||
|
||||
* 您已经安装了 Kubernetes 集群(不低于 v1.13),如果没有,请参考 [安装 Kubernetes 单 Master 节点](/install/install-k8s.html);
|
||||
* 您已经安装了 Kubernetes 集群(不低于 v1.13),如果没有,请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html);
|
||||
* 您已经安装了 Kuboard (不低于 v1.0.7.1),如果没有,请参考 [安装 Kuboard](/install/v3/install.html)
|
||||
|
||||
## 安装 Grafana
|
||||
|
||||
@ -66,4 +66,4 @@ sysctl -p
|
||||
## 解决办法
|
||||
|
||||
* 在每一个节点上(包括Master、Worker)补充执行上述步骤,然后重新启动节点机器。
|
||||
* 或者按照 [安装 Kubernetes 单Master节点](/install/install-k8s.html) 的描述重新安装集群
|
||||
* 或者按照 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 的描述重新安装集群
|
||||
|
||||
578
install/history-k8s/install-k8s-1.22.x.md
Normal file
578
install/history-k8s/install-k8s-1.22.x.md
Normal file
@ -0,0 +1,578 @@
|
||||
---
|
||||
vssueId: 15
|
||||
# layout: StepLayout
|
||||
sharingTitle: K8S入门第一步---安装,装不好还有人免费远程协助,更有K8S免费教程提供,你还在等什么?
|
||||
description: Kubernete安装文档_Kubernetes最新稳定版v1.22.x的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务
|
||||
meta:
|
||||
- name: keywords
|
||||
content: Kubernetes安装,K8S安装,kubeadm,Kubernetes 安装,K8S 安装,k8s搭建
|
||||
---
|
||||
|
||||
# 使用kubeadm安装kubernetes_v1.22.x
|
||||
|
||||
<AdSenseTitle/>
|
||||
|
||||
## 文档特点
|
||||
|
||||
<div style="min-height: 612px;">
|
||||
<InstallBanner version="v1.22.x" updateCount="98"/>
|
||||
</div>
|
||||
|
||||
参考此免费文档,98%以上的概率,您能够顺利完成 K8S 安装,极个别的问题可以到QQ群里免费答疑。
|
||||
|
||||
<Course courseId="477593" />
|
||||
|
||||
|
||||
## 配置要求
|
||||
|
||||
对于 Kubernetes 初学者,在搭建K8S集群时,推荐在阿里云或腾讯云采购如下配置:(您也可以使用自己的虚拟机、私有云等您最容易获得的 Linux 环境)
|
||||
|
||||
* 至少2台 **2核4G** 的服务器
|
||||
* 本文档中,CPU 必须为 x86 架构,暂时未适配 arm 架构的 CPU
|
||||
* **CentOS 7.8** 或 **CentOS Stream 8**
|
||||
|
||||
<!-- <grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
|
||||
|
||||
<div> -->
|
||||
|
||||
[【云上优选 特惠来袭】华为云回馈用户,产品低至2折](https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=36cf686d-2650-4107-baa4-f0dc3c860df4&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905)
|
||||
|
||||
[【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元](https://cloud.tencent.com/act/cps/redirect?redirect=1062&cps_key=2ee6baa049659f4713ddc55a51314372&from=console)
|
||||
|
||||
|
||||
<!-- [阿里云,双十二主会场,低至一折](https://www.aliyun.com/1212/2019/home?userCode=obezo3pg) -->
|
||||
|
||||
**安装后的软件版本为**
|
||||
|
||||
* Kubernetes v1.22.x
|
||||
* calico 3.17.1
|
||||
* nginx-ingress 1.9.1
|
||||
* Containerd.io 1.4.3
|
||||
|
||||
> 如果要安装 Kubernetes 历史版本,请参考:
|
||||
> * [安装 Kubernetes v1.21.x 单Master节点](/install/history-k8s/install-k8s-1.21.x.html)
|
||||
> * [安装 Kubernetes v1.20.x 单Master节点](/install/history-k8s/install-k8s-1.20.x.html)
|
||||
> * [安装 Kubernetes v1.19.x 单Master节点](/install/history-k8s/install-k8s-1.19.x.html)
|
||||
> * [安装 Kubernetes v1.18.x 单Master节点](/install/history-k8s/install-k8s-1.18.x.html)
|
||||
> * [安装 Kubernetes v1.17.x 单Master节点](/install/history-k8s/install-k8s-1.17.x.html)
|
||||
> * [安装 Kubernetes v1.16.3 单Master节点](/install/history-k8s/install-k8s-1.16.3.html)
|
||||
> * [安装 Kubernetes v1.15.4 单Master节点](/install/history-k8s/install-k8s-1.15.4.html)
|
||||
|
||||
<!-- </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> -->
|
||||
|
||||
安装后的拓扑图如下:<span v-on:click="$sendGaEvent('下载拓扑图-kubernetes', '下载拓扑图-kubernetes', 'Download-install-kubernetes.html')"><a :href="$withBase('/kuboard.rp')" download="www.kuboard.cn.rp">下载拓扑图源文件</a></span> <font color="#999">使用Axure RP 9.0可打开该文件</font>
|
||||
|
||||
强烈建议初学者先按照此文档完成安装,在对 K8S 有更多理解后,再参考文档 [安装Kubernetes高可用](./install-kubernetes.html)
|
||||
|
||||
<p style="max-width: 720px;">
|
||||
<img src="/images/topology/k8s.png" style="max-width: 100%;" alt="Kubernetes安装:Kubernetes安装拓扑图">
|
||||
</p>
|
||||
|
||||
::: tip Container Runtime
|
||||
|
||||
* Kubernetes v1.22 开始,默认移除 docker 的依赖,如果宿主机上安装了 docker 和 containerd,将优先使用 docker 作为容器运行引擎,如果宿主机上未安装 docker 只安装了 containerd,将使用 containerd 作为容器运行引擎;
|
||||
* 本文使用 containerd 作为容器运行引擎;
|
||||
|
||||
:::
|
||||
|
||||
|
||||
::: tip 关于二进制安装
|
||||
|
||||
* kubeadm 是 Kubernetes 官方支持的安装方式,“二进制” 不是。本文档采用 kubernetes.io 官方推荐的 kubeadm 工具安装 kubernetes 集群。
|
||||
|
||||
:::
|
||||
|
||||
|
||||
<!-- </div>
|
||||
<div slot="step1"> -->
|
||||
|
||||
## 检查 centos / hostname
|
||||
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
cat /etc/redhat-release
|
||||
|
||||
# 此处 hostname 的输出将会是该机器在 Kubernetes 集群中的节点名字
|
||||
# 不能使用 localhost 作为节点的名字
|
||||
hostname
|
||||
|
||||
# 请使用 lscpu 命令,核对 CPU 信息
|
||||
# Architecture: x86_64 本安装文档不支持 arm 架构
|
||||
# CPU(s): 2 CPU 内核数量不能低于 2
|
||||
lscpu
|
||||
```
|
||||
|
||||
**操作系统兼容性**
|
||||
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
|
||||
|
||||
<div>
|
||||
|
||||
| CentOS 版本 | 本文档是否兼容 | 备注 |
|
||||
| ----------- | --------------------------------------- | ----------------------------------- |
|
||||
| CentOS Stream 8 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
| CentOS 7.8 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
| CentOS 7.7 | <span style="font-size: 24px;">😞</span> | 未验证 |
|
||||
| CentOS 7.6 | <span style="font-size: 24px;">😞</span> | 未验证 |
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
::: tip 修改 hostname
|
||||
如果您需要修改 hostname,可执行如下指令:
|
||||
``` sh
|
||||
# 修改 hostname
|
||||
hostnamectl set-hostname your-new-host-name
|
||||
# 查看修改结果
|
||||
hostnamectl status
|
||||
# 设置 hostname 解析
|
||||
echo "127.0.0.1 $(hostname)" >> /etc/hosts
|
||||
```
|
||||
:::
|
||||
|
||||
## 检查网络
|
||||
|
||||
在所有节点执行命令
|
||||
``` {2,11,13}
|
||||
[root@demo-master-a-1 ~]$ ip route show
|
||||
default via 172.21.0.1 dev eth0
|
||||
169.254.0.0/16 dev eth0 scope link metric 1002
|
||||
172.21.0.0/20 dev eth0 proto kernel scope link src 172.21.0.12
|
||||
|
||||
[root@demo-master-a-1 ~]$ ip address
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
inet 127.0.0.1/8 scope host lo
|
||||
valid_lft forever preferred_lft forever
|
||||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
|
||||
link/ether 00:16:3e:12:a4:1b brd ff:ff:ff:ff:ff:ff
|
||||
inet 172.17.216.80/20 brd 172.17.223.255 scope global dynamic eth0
|
||||
valid_lft 305741654sec preferred_lft 305741654sec
|
||||
```
|
||||
::: tip kubelet使用的IP地址
|
||||
* `ip route show` 命令中,可以知道机器的默认网卡,通常是 `eth0`,如 ***default via 172.21.0.23 dev <font color="blue" weight="500">eth0</font>***
|
||||
* `ip address` 命令中,可显示默认网卡的 IP 地址,Kubernetes 将使用此 IP 地址与集群内的其他节点通信,如 `172.17.216.80`
|
||||
* 所有节点上 Kubernetes 所使用的 IP 地址必须可以互通(无需 NAT 映射、无安全组或防火墙隔离)
|
||||
:::
|
||||
|
||||
|
||||
## 安装containerd/kubelet/kubeadm/kubectl
|
||||
|
||||
<!-- <SharingBlock> -->
|
||||
|
||||
<InstallEnvCheck20 type="k8s">
|
||||
|
||||
使用 root 身份在所有节点执行如下代码,以安装软件:
|
||||
- containerd
|
||||
- nfs-utils
|
||||
- kubectl / kubeadm / kubelet
|
||||
|
||||
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="快速安装" active>
|
||||
|
||||
**请将脚本最后的 1.22.3 替换成您需要的版本号(必须是 1.22 的小版本,不能是 1.19.1 等),**
|
||||
<font color="red">脚本中间的 v1.22.x 不要替换</font>
|
||||
|
||||
> docker hub 镜像请根据自己网络的情况任选一个
|
||||
> * 第四行为腾讯云 docker hub 镜像
|
||||
> * 第六行为DaoCloud docker hub 镜像
|
||||
> * 第八行为华为云 docker hub 镜像
|
||||
> * 第十行为阿里云 docker hub 镜像
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
# 最后一个参数 1.22.3 用于指定 kubenetes 版本,支持所有 1.22.x 版本的安装
|
||||
# 腾讯云 docker hub 镜像
|
||||
# export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com"
|
||||
# DaoCloud 镜像
|
||||
# export REGISTRY_MIRROR="http://f1361db2.m.daocloud.io"
|
||||
# 华为云镜像
|
||||
# export REGISTRY_MIRROR="https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com"
|
||||
# 阿里云 docker hub 镜像
|
||||
export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/install_kubelet.sh | sh -s 1.22.3
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="手动安装">
|
||||
|
||||
手动执行以下代码,结果与快速安装相同。<font color="red">***请将脚本第79行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.22.3***</font>
|
||||
|
||||
> docker hub 镜像请根据自己网络的情况任选一个
|
||||
> * 第四行为腾讯云 docker hub 镜像
|
||||
> * 第六行为DaoCloud docker hub 镜像
|
||||
> * 第八行为阿里云 docker hub 镜像
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
# 最后一个参数 1.22.3 用于指定 kubenetes 版本,支持所有 1.22.x 版本的安装
|
||||
# 腾讯云 docker hub 镜像
|
||||
# export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com"
|
||||
# DaoCloud 镜像
|
||||
# export REGISTRY_MIRROR="http://f1361db2.m.daocloud.io"
|
||||
# 阿里云 docker hub 镜像
|
||||
export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com
|
||||
```
|
||||
|
||||
<<< @/.vuepress/public/install-script/v1.22.x/install_kubelet.sh {79}
|
||||
|
||||
::: warning
|
||||
如果此时执行 `systemctl status kubelet` 命令,将得到 kubelet 启动失败的错误提示,请忽略此错误,因为必须完成后续步骤中 kubeadm init 的操作,kubelet 才能正常启动
|
||||
:::
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
|
||||
</InstallEnvCheck20>
|
||||
|
||||
<!-- </SharingBlock> -->
|
||||
|
||||
<!-- </div>
|
||||
|
||||
<div slot="step3"> -->
|
||||
|
||||
## 初始化 master 节点
|
||||
|
||||
::: danger 关于初始化时用到的环境变量
|
||||
* **APISERVER_NAME** 不能是 master 的 hostname
|
||||
* **APISERVER_NAME** 必须全为小写字母、数字、小数点,不能包含减号
|
||||
* **POD_SUBNET** 所使用的网段不能与 ***master节点/worker节点*** 所在的网段重叠。该字段的取值为一个 <a href="/glossary/cidr.html" target="_blank">CIDR</a> 值,如果您对 CIDR 这个概念还不熟悉,请仍然执行 export POD_SUBNET=10.100.0.0/16 命令,不做修改
|
||||
:::
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="快速初始化" active>
|
||||
|
||||
|
||||
**请将脚本最后的 1.22.3 替换成您需要的版本号(必须是 1.22 的小版本,不能是 1.19.1 等),**
|
||||
<font color="red">脚本中间的 v1.22.x 不要替换</font>
|
||||
|
||||
``` sh {10}
|
||||
# 只在 master 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点实际 IP(请使用内网 IP)
|
||||
# export 命令只在当前 shell 会话中有效,开启新的 shell 窗口后,如果要继续安装过程,请重新执行此处的 export 命令
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为 您想要的 dnsName
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
# Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/init_master.sh | sh -s 1.22.3
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="手动初始化">
|
||||
|
||||
手动执行以下代码,结果与快速初始化相同。<font color="red">***请将脚本第21行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.22.3***</font>
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点的内网IP
|
||||
# export 命令只在当前 shell 会话中有效,开启新的 shell 窗口后,如果要继续安装过程,请重新执行此处的 export 命令
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为 您想要的 dnsName
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
# Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
```
|
||||
|
||||
<<< @/.vuepress/public/install-script/v1.22.x/init_master.sh {21}
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
|
||||
> 感谢 [https://github.com/zhangguanzhang/google_containers](https://github.com/zhangguanzhang/google_containers) 提供最新的 google_containers 国内镜像
|
||||
|
||||
如果出现如下错误:
|
||||
``` {5,6}
|
||||
[config/images] Pulled registry.aliyuncs.com/k8sxio/pause:3.2
|
||||
[config/images] Pulled registry.aliyuncs.com/k8sxio/etcd:3.4.13-0
|
||||
failed to pull image "swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0": output: time="2021-04-30T13:26:14+08:00" level=fatal
|
||||
msg="pulling image failed: rpc error: code = NotFound desc = failed to pull and unpack image \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\":
|
||||
failed to resolve reference \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\":
|
||||
swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0: not found", error: exit status 1
|
||||
To see the stack trace of this error execute with --v=5 or higher
|
||||
```
|
||||
请执行如下命令:
|
||||
> 在原命令的最后增加参数 `/coredns`
|
||||
``` sh
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/init_master.sh | sh -s 1.22.3 /coredns
|
||||
```
|
||||
|
||||
</b-card>
|
||||
|
||||
<b-button v-b-toggle.collapse-init-error variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-error', 'error-init-master', '查看初始化时的错误解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-init-error" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
* 请确保您的环境符合 [安装containerd/kubelet/kubeadm/kubectl](#安装containerd-kubelet-kubeadm-kubectl) 中所有勾选框的要求
|
||||
* 请确保您使用 root 用户执行初始化命令
|
||||
* 检查环境变量,执行如下命令
|
||||
``` sh
|
||||
echo MASTER_IP=${MASTER_IP} && echo APISERVER_NAME=${APISERVER_NAME} && echo POD_SUBNET=${POD_SUBNET}
|
||||
```
|
||||
请验证如下几点:
|
||||
* 环境变量 ***MASTER_IP*** 的值应该为 master 节点的 **内网IP**,如果不是,请重新 export
|
||||
* **APISERVER_NAME** 不能是 master 的 hostname
|
||||
* **APISERVER_NAME** 必须全为小写字母、数字、小数点,不能包含减号
|
||||
* **POD_SUBNET** 所使用的网段不能与 ***master节点/worker节点*** 所在的网段重叠。该字段的取值为一个 <a href="/glossary/cidr.html" target="_blank">CIDR</a> 值,如果您对 CIDR 这个概念还不熟悉,请仍然执行 export POD_SUBNET=10.100.0.0/16 命令,不做修改
|
||||
* 重新初始化 master 节点前,请先执行 `kubeadm reset -f` 操作
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
**检查 master 初始化结果**
|
||||
|
||||
`coredns` 将处于启动失败的状态,请继续下一步,完成 [安装网络插件](#安装网络插件) 这个步骤后,coredns 将正常启动。
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
|
||||
# 执行如下命令,等待 3-10 分钟,直到所有的容器组处于 Running 状态
|
||||
watch kubectl get pod -n kube-system -o wide
|
||||
|
||||
# 查看 master 节点初始化结果
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
|
||||
<b-button v-b-toggle.collapse-init-pending variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-pending', 'error-init-master', '查看初始化时的镜像下载错误的解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-init-pending" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
* ImagePullBackoff / Pending
|
||||
* 如果 `kubectl get pod -n kube-system -o wide` 的输出结果中出现 ImagePullBackoff 或者长时间处于 Pending 的情况
|
||||
* ContainerCreating
|
||||
* 如果 `kubectl get pod -n kube-system -o wide` 的输出结果中某个 Pod 长期处于 ContainerCreating、PodInitializing 或 Init:0/3 的状态,可以尝试:
|
||||
* 查看该 Pod 的状态,例如:
|
||||
``` sh
|
||||
kubectl describe pod kube-flannel-ds-amd64-8l25c -n kube-system
|
||||
```
|
||||
如果输出结果中,最后一行显示的是 Pulling image,请耐心等待
|
||||
```
|
||||
Normal Pulling 44s kubelet, k8s-worker-02 Pulling image "quay.io/coreos/flannel:v0.12.0-amd64"
|
||||
```
|
||||
* 将该 Pod 删除,系统会自动重建一个新的 Pod,例如:
|
||||
``` sh
|
||||
kubectl delete pod kube-flannel-ds-amd64-8l25c -n kube-system
|
||||
```
|
||||
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
<!-- </div>
|
||||
|
||||
|
||||
<div slot="step4"> -->
|
||||
|
||||
## 安装网络插件
|
||||
|
||||
网络插件可以选择 calico 或者 flannel(任意选择其一即可)。
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="Calico" active>
|
||||
|
||||
::: danger 阿里云
|
||||
如果您在阿里云上安装 K8S,建议使用 flannel,有多个案例表明 calico 与阿里云存在兼容性问题。
|
||||
:::
|
||||
|
||||
``` sh
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
kubectl apply -f https://kuboard.cn/install-script/v1.22.x/calico-operator.yaml
|
||||
wget https://kuboard.cn/install-script/v1.22.x/calico-custom-resources.yaml
|
||||
sed -i "s#192.168.0.0/16#${POD_SUBNET}#" calico-custom-resources.yaml
|
||||
kubectl apply -f calico-custom-resources.yaml
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="Flannel">
|
||||
|
||||
``` sh
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
wget https://kuboard.cn/install-script/flannel/flannel-v0.14.0.yaml
|
||||
sed -i "s#10.244.0.0/16#${POD_SUBNET}#" flannel-v0.14.0.yaml
|
||||
kubectl apply -f ./flannel-v0.14.0.yaml
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
|
||||
|
||||
## 初始化 worker节点
|
||||
|
||||
### 获得 join命令参数
|
||||
|
||||
**在 master 节点上执行**
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubeadm token create --print-join-command
|
||||
```
|
||||
|
||||
可获取kubeadm join 命令及参数,如下所示
|
||||
|
||||
``` sh
|
||||
# kubeadm token create 命令的输出
|
||||
kubeadm join apiserver.demo:6443 --token mpfjma.4vjjg8flqihor4vt --discovery-token-ca-cert-hash sha256:6f7a8e40a810323672de5eee6f4d19aa2dbdb38411845a1bf5dd63485c43d303
|
||||
```
|
||||
|
||||
::: tip 有效时间
|
||||
该 token 的有效时间为 2 个小时,2小时内,您可以使用此 token 初始化任意数量的 worker 节点。
|
||||
:::
|
||||
|
||||
|
||||
### 初始化worker
|
||||
|
||||
**针对所有的 worker 节点执行**
|
||||
|
||||
``` sh
|
||||
# 只在 worker 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点的内网 IP
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为初始化 master 节点时所使用的 APISERVER_NAME
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
|
||||
# 替换为 master 节点上 kubeadm token create 命令的输出
|
||||
kubeadm join apiserver.demo:6443 --token mpfjma.4vjjg8flqihor4vt --discovery-token-ca-cert-hash sha256:6f7a8e40a810323672de5eee6f4d19aa2dbdb38411845a1bf5dd63485c43d303
|
||||
```
|
||||
|
||||
<b-button v-b-toggle.collapse-join-error variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-error', 'error-init-worker', '查看初始化worker时的错误解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-join-error" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
### 常见错误原因
|
||||
|
||||
经常在群里提问为什么 join 不成功的情况大致有这几种:
|
||||
|
||||
#### worker 节点不能访问 apiserver
|
||||
|
||||
在worker节点执行以下语句可验证worker节点是否能访问 apiserver
|
||||
``` sh
|
||||
curl -ik https://apiserver.demo:6443
|
||||
```
|
||||
如果不能,请在 master 节点上验证
|
||||
``` sh
|
||||
curl -ik https://localhost:6443
|
||||
```
|
||||
正常输出结果如下所示:
|
||||
``` {1}
|
||||
HTTP/1.1 403 Forbidden
|
||||
Cache-Control: no-cache, private
|
||||
Content-Type: application/json
|
||||
X-Content-Type-Options: nosniff
|
||||
Date: Fri, 15 Nov 2019 04:34:40 GMT
|
||||
Content-Length: 233
|
||||
|
||||
{
|
||||
"kind": "Status",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
...
|
||||
```
|
||||
::: tip 可能原因
|
||||
* 如果 master 节点能够访问 apiserver、而 worker 节点不能,则请检查自己的网络设置
|
||||
* /etc/hosts 是否正确设置?
|
||||
* 是否有安全组或防火墙的限制?
|
||||
:::
|
||||
|
||||
#### worker 节点默认网卡
|
||||
|
||||
* [Kubelet使用的 IP 地址](#检查网络) 与 master 节点可互通(无需 NAT 映射),且没有防火墙、安全组隔离
|
||||
* 如果你使用 vmware 或 virtualbox 创建虚拟机用于 K8S 学习,可以尝试 NAT 模式的网络,而不是桥接模式的网络
|
||||
|
||||
### 移除worker节点并重试
|
||||
|
||||
::: warning
|
||||
正常情况下,您无需移除 worker 节点,如果添加到集群出错,您可以移除 worker 节点,再重新尝试添加
|
||||
:::
|
||||
|
||||
在准备移除的 worker 节点上执行
|
||||
|
||||
``` sh
|
||||
# 只在 worker 节点执行
|
||||
kubeadm reset -f
|
||||
```
|
||||
|
||||
在 master 节点 demo-master-a-1 上执行
|
||||
|
||||
```sh
|
||||
# 只在 master 节点执行
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
如果列表中没有您要移除的节点,则忽略下一个步骤
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubectl delete node demo-worker-x-x
|
||||
```
|
||||
|
||||
::: tip
|
||||
* 将 demo-worker-x-x 替换为要移除的 worker 节点的名字
|
||||
* worker 节点的名字可以通过在节点 demo-master-a-1 上执行 kubectl get nodes 命令获得
|
||||
:::
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
### 检查初始化结果
|
||||
|
||||
在 master 节点上执行
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
输出结果如下所示:
|
||||
```sh
|
||||
[root@demo-master-a-1 ~]# kubectl get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
demo-master-a-1 Ready master 5m3s v1.22.x
|
||||
demo-worker-a-1 Ready <none> 2m26s v1.22.x
|
||||
demo-worker-a-2 Ready <none> 3m56s v1.22.x
|
||||
```
|
||||
|
||||
|
||||
<!-- </div>
|
||||
|
||||
<div slot="step6"> -->
|
||||
|
||||
|
||||
## 下一步
|
||||
|
||||
如果您使用自己笔记本上的虚拟机安装的集群,将来打算重启虚拟机,请参考 [重启Kubernetes集群](./k8s-restart.html)
|
||||
|
||||
:tada: :tada: :tada:
|
||||
|
||||
您已经完成了 Kubernetes 集群的安装,下一步请:
|
||||
|
||||
<Course courseId="477593" />
|
||||
|
||||
<!-- <span v-on:click="$sendGaEvent('安装后求GitHub Star','安装后求GitHub Star','安装后求GitHub Star')"><a href="https://github.com/eip-work/kuboard-press" target="_blank">点击此处,给个GitHub Star</a></span>
|
||||
支持一下吧,<StarCount></StarCount>这么多人都 star 了呢,怎么能少得了您呢? -->
|
||||
|
||||
[安装 Kuboard - 微服务管理界面](/install/v3/install-built-in.html)
|
||||
|
||||
[获取 Kubernetes 免费教程](/learning/)
|
||||
|
||||
|
||||
<!-- </div>
|
||||
</StoryBook> -->
|
||||
@ -38,7 +38,7 @@ Kuboard 是 Kubernetes 的一款图形化管理界面。
|
||||
|
||||
* 初学者,请参考
|
||||
* [在 Windows/Mac 安装 Kubernetes 测试集群](install-docker-desktop.html) <Badge type="error">不推荐</Badge>
|
||||
* [安装 Kubernetes 单Master节点](install-k8s.html) <Badge type="success">推荐</Badge>
|
||||
* [离线安装高可用的Kubernetes集群](install-k8s.html) <Badge type="success">推荐</Badge>
|
||||
* 用于生产,请参考 [安装 Kubernetes 高可用](install-kubernetes.html)
|
||||
|
||||
## 兼容性
|
||||
|
||||
BIN
install/install-k8s.assets/kuboard-spray-01.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
BIN
install/install-k8s.assets/kuboard-spray-02.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
install/install-k8s.assets/kuboard-spray-03.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
BIN
install/install-k8s.assets/kuboard-spray-04.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
BIN
install/install-k8s.assets/kuboard-spray-05.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-05.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
BIN
install/install-k8s.assets/kuboard-spray-06.png
Normal file
BIN
install/install-k8s.assets/kuboard-spray-06.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@ -1,560 +1,179 @@
|
||||
---
|
||||
vssueId: 15
|
||||
# layout: StepLayout
|
||||
sharingTitle: K8S入门第一步---安装,装不好还有人免费远程协助,更有K8S免费教程提供,你还在等什么?
|
||||
sharingTitle: Kuboard 带给大家的2022年新年礼物:离线安装高可用的 Kubernetes 集群 v1.23.1
|
||||
description: Kubernete安装文档_Kubernetes最新稳定版v1.22.x的快速安装文档_该文档由众多网友验证并在线提出修改意见_持续不断地更新和完善_并且通过QQ群提供免费在线答疑的服务
|
||||
meta:
|
||||
- name: keywords
|
||||
content: Kubernetes安装,K8S安装,kubeadm,Kubernetes 安装,K8S 安装,k8s搭建
|
||||
---
|
||||
|
||||
# 使用kubeadm安装kubernetes_v1.22.x
|
||||
# 使用 KuboardSpray 安装kubernetes_v1.23.1
|
||||
|
||||
<AdSenseTitle/>
|
||||
|
||||
## 文档特点
|
||||
|
||||
<div style="min-height: 612px;">
|
||||
<InstallBanner version="v1.22.x" updateCount="98"/>
|
||||
</div>
|
||||
|
||||
参考此免费文档,98%以上的概率,您能够顺利完成 K8S 安装,极个别的问题可以到QQ群里免费答疑。
|
||||
|
||||
<Course courseId="477593" />
|
||||
## Kuboard-Spray
|
||||
|
||||
|
||||
## 配置要求
|
||||
Kuboard-Spray 是一款可以在图形界面引导下完成 Kubernetes 高可用集群离线安装的工具,开源仓库的地址为 [Kuboard-Spray](https://github.com/eip-work/kuboard-spary)
|
||||
<span><iframe style="display:inline-block;vertical-align:middle;" src="https://addons.kuboard.cn/downloads/github-star-kuboard-spray.html" frameborder="0" scrolling="0" width="120" height="20" title="GitHub"></iframe></span>
|
||||
|
||||
**安装后的集群版本为**
|
||||
|
||||
* Kubernetes v1.23.1
|
||||
|
||||
### 社区
|
||||
|
||||
对此项目感兴趣的同学,请点击此处 <span><iframe style="display:inline-block;vertical-align:middle;" src="https://addons.kuboard.cn/downloads/github-star-kuboard-spray.html" frameborder="0" scrolling="0" width="100" height="20" title="GitHub"></iframe></span> 在 GitHub 添加本项目的 Star 以后,扫码加入群聊(提供 star 截图才会被拉入群聊哦!)
|
||||
|
||||
<p>
|
||||
<img src="https://addons.kuboard.cn/downloads/qr_code_kuboard-spray.jpg" style="width: 150px; height: 150px;"/>
|
||||
</p>
|
||||
|
||||
### 配置要求
|
||||
|
||||
对于 Kubernetes 初学者,在搭建K8S集群时,推荐在阿里云或腾讯云采购如下配置:(您也可以使用自己的虚拟机、私有云等您最容易获得的 Linux 环境)
|
||||
|
||||
* 至少2台 **2核4G** 的服务器
|
||||
* 至少 2 台 **2核4G** 的服务器
|
||||
* 本文档中,CPU 必须为 x86 架构,暂时未适配 arm 架构的 CPU
|
||||
* **CentOS 7.8** 或 **CentOS Stream 8**
|
||||
* **CentOS 7.8**、 **CentOS 7.9** 或 **Ubuntu 20.04**
|
||||
|
||||
<!-- <grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
|
||||
|
||||
<div> -->
|
||||
|
||||
[【云上优选 特惠来袭】华为云回馈用户,产品低至2折](https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=36cf686d-2650-4107-baa4-f0dc3c860df4&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905)
|
||||
|
||||
[【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元](https://cloud.tencent.com/act/cps/redirect?redirect=1062&cps_key=2ee6baa049659f4713ddc55a51314372&from=console)
|
||||
|
||||
|
||||
<!-- [阿里云,双十二主会场,低至一折](https://www.aliyun.com/1212/2019/home?userCode=obezo3pg) -->
|
||||
<b-button v-b-toggle.collapse-1 variant="outline-info" size="sm">历史安装文档</b-button>
|
||||
<b-collapse id="collapse-1" class="mt-2">
|
||||
<b-card>
|
||||
|
||||
**本站提供的历史 Kubernetes 安装文档,请参考:**
|
||||
|
||||
**安装后的软件版本为**
|
||||
历史安装文档基于 kubeadm 命令行方式安装集群。
|
||||
|
||||
* Kubernetes v1.22.x
|
||||
* calico 3.17.1
|
||||
* nginx-ingress 1.9.1
|
||||
* Containerd.io 1.4.3
|
||||
* [安装 Kubernetes v1.22.x 单Master节点](/install/history-k8s/install-k8s-1.22.x.html)
|
||||
* [安装 Kubernetes v1.21.x 单Master节点](/install/history-k8s/install-k8s-1.21.x.html)
|
||||
* [安装 Kubernetes v1.20.x 单Master节点](/install/history-k8s/install-k8s-1.20.x.html)
|
||||
* [安装 Kubernetes v1.19.x 单Master节点](/install/history-k8s/install-k8s-1.19.x.html)
|
||||
* [安装 Kubernetes v1.18.x 单Master节点](/install/history-k8s/install-k8s-1.18.x.html)
|
||||
* [安装 Kubernetes v1.17.x 单Master节点](/install/history-k8s/install-k8s-1.17.x.html)
|
||||
* [安装 Kubernetes v1.16.3 单Master节点](/install/history-k8s/install-k8s-1.16.3.html)
|
||||
* [安装 Kubernetes v1.15.4 单Master节点](/install/history-k8s/install-k8s-1.15.4.html)
|
||||
|
||||
> 如果要安装 Kubernetes 历史版本,请参考:
|
||||
> * [安装 Kubernetes v1.21.x 单Master节点](/install/history-k8s/install-k8s-1.21.x.html)
|
||||
> * [安装 Kubernetes v1.20.x 单Master节点](/install/history-k8s/install-k8s-1.20.x.html)
|
||||
> * [安装 Kubernetes v1.19.x 单Master节点](/install/history-k8s/install-k8s-1.19.x.html)
|
||||
> * [安装 Kubernetes v1.18.x 单Master节点](/install/history-k8s/install-k8s-1.18.x.html)
|
||||
> * [安装 Kubernetes v1.17.x 单Master节点](/install/history-k8s/install-k8s-1.17.x.html)
|
||||
> * [安装 Kubernetes v1.16.3 单Master节点](/install/history-k8s/install-k8s-1.16.3.html)
|
||||
> * [安装 Kubernetes v1.15.4 单Master节点](/install/history-k8s/install-k8s-1.15.4.html)
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
<!-- </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> -->
|
||||
|
||||
安装后的拓扑图如下:<span v-on:click="$sendGaEvent('下载拓扑图-kubernetes', '下载拓扑图-kubernetes', 'Download-install-kubernetes.html')"><a :href="$withBase('/kuboard.rp')" download="www.kuboard.cn.rp">下载拓扑图源文件</a></span> <font color="#999">使用Axure RP 9.0可打开该文件</font>
|
||||
|
||||
强烈建议初学者先按照此文档完成安装,在对 K8S 有更多理解后,再参考文档 [安装Kubernetes高可用](./install-kubernetes.html)
|
||||
|
||||
<p style="max-width: 720px;">
|
||||
<img src="/images/topology/k8s.png" style="max-width: 100%;" alt="Kubernetes安装:Kubernetes安装拓扑图">
|
||||
</p>
|
||||
|
||||
::: tip Container Runtime
|
||||
|
||||
* Kubernetes v1.22 开始,默认移除 docker 的依赖,如果宿主机上安装了 docker 和 containerd,将优先使用 docker 作为容器运行引擎,如果宿主机上未安装 docker 只安装了 containerd,将使用 containerd 作为容器运行引擎;
|
||||
* 本文使用 containerd 作为容器运行引擎;
|
||||
|
||||
:::
|
||||
-->
|
||||
|
||||
|
||||
::: tip 关于二进制安装
|
||||
|
||||
* kubeadm 是 Kubernetes 官方支持的安装方式,“二进制” 不是。本文档采用 kubernetes.io 官方推荐的 kubeadm 工具安装 kubernetes 集群。
|
||||
|
||||
:::
|
||||
|
||||
|
||||
<!-- </div>
|
||||
<div slot="step1"> -->
|
||||
|
||||
## 检查 centos / hostname
|
||||
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
cat /etc/redhat-release
|
||||
|
||||
# 此处 hostname 的输出将会是该机器在 Kubernetes 集群中的节点名字
|
||||
# 不能使用 localhost 作为节点的名字
|
||||
hostname
|
||||
|
||||
# 请使用 lscpu 命令,核对 CPU 信息
|
||||
# Architecture: x86_64 本安装文档不支持 arm 架构
|
||||
# CPU(s): 2 CPU 内核数量不能低于 2
|
||||
lscpu
|
||||
```
|
||||
|
||||
**操作系统兼容性**
|
||||
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
|
||||
|
||||
<div>
|
||||
|
||||
| CentOS 版本 | 本文档是否兼容 | 备注 |
|
||||
| ----------- | --------------------------------------- | ----------------------------------- |
|
||||
| CentOS Stream 8 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
| CentOS 7.9 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
| CentOS 7.8 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
| CentOS 7.7 | <span style="font-size: 24px;">😞</span> | 未验证 |
|
||||
| CentOS 7.6 | <span style="font-size: 24px;">😞</span> | 未验证 |
|
||||
| Ubuntu 20.04 | <span style="font-size: 24px;">😄</span> | 已验证 |
|
||||
|
||||
## 安装 Kuboard-Spray
|
||||
|
||||
</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>
|
||||
* 取一台服务器或虚拟机,执行一条命令,即可完成 Kuboard-Spray 的安装。
|
||||
|
||||
::: tip 修改 hostname
|
||||
如果您需要修改 hostname,可执行如下指令:
|
||||
``` sh
|
||||
# 修改 hostname
|
||||
hostnamectl set-hostname your-new-host-name
|
||||
# 查看修改结果
|
||||
hostnamectl status
|
||||
# 设置 hostname 解析
|
||||
echo "127.0.0.1 $(hostname)" >> /etc/hosts
|
||||
```
|
||||
:::
|
||||
对这台服务器的最低要求为:
|
||||
<div style="font-size: 13px;margin-left: 40px;">
|
||||
|
||||
## 检查网络
|
||||
* 1核2G
|
||||
* 不少于 10G 磁盘空余空间
|
||||
* 已经安装好 docker
|
||||
|
||||
在所有节点执行命令
|
||||
``` {2,11,13}
|
||||
[root@demo-master-a-1 ~]$ ip route show
|
||||
default via 172.21.0.1 dev eth0
|
||||
169.254.0.0/16 dev eth0 scope link metric 1002
|
||||
172.21.0.0/20 dev eth0 proto kernel scope link src 172.21.0.12
|
||||
</div>
|
||||
|
||||
[root@demo-master-a-1 ~]$ ip address
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
inet 127.0.0.1/8 scope host lo
|
||||
valid_lft forever preferred_lft forever
|
||||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
|
||||
link/ether 00:16:3e:12:a4:1b brd ff:ff:ff:ff:ff:ff
|
||||
inet 172.17.216.80/20 brd 172.17.223.255 scope global dynamic eth0
|
||||
valid_lft 305741654sec preferred_lft 305741654sec
|
||||
```
|
||||
::: tip kubelet使用的IP地址
|
||||
* `ip route show` 命令中,可以知道机器的默认网卡,通常是 `eth0`,如 ***default via 172.21.0.23 dev <font color="blue" weight="500">eth0</font>***
|
||||
* `ip address` 命令中,可显示默认网卡的 IP 地址,Kubernetes 将使用此 IP 地址与集群内的其他节点通信,如 `172.17.216.80`
|
||||
* 所有节点上 Kubernetes 所使用的 IP 地址必须可以互通(无需 NAT 映射、无安全组或防火墙隔离)
|
||||
:::
|
||||
待执行的命令如下:
|
||||
|
||||
|
||||
## 安装containerd/kubelet/kubeadm/kubectl
|
||||
|
||||
<!-- <SharingBlock> -->
|
||||
|
||||
<InstallEnvCheck20 type="k8s">
|
||||
|
||||
使用 root 身份在所有节点执行如下代码,以安装软件:
|
||||
- containerd
|
||||
- nfs-utils
|
||||
- kubectl / kubeadm / kubelet
|
||||
|
||||
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="快速安装" active>
|
||||
|
||||
**请将脚本最后的 1.22.3 替换成您需要的版本号(必须是 1.22 的小版本,不能是 1.19.1 等),**
|
||||
<font color="red">脚本中间的 v1.22.x 不要替换</font>
|
||||
|
||||
> docker hub 镜像请根据自己网络的情况任选一个
|
||||
> * 第四行为腾讯云 docker hub 镜像
|
||||
> * 第六行为DaoCloud docker hub 镜像
|
||||
> * 第八行为华为云 docker hub 镜像
|
||||
> * 第十行为阿里云 docker hub 镜像
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
# 最后一个参数 1.22.3 用于指定 kubenetes 版本,支持所有 1.22.x 版本的安装
|
||||
# 腾讯云 docker hub 镜像
|
||||
# export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com"
|
||||
# DaoCloud 镜像
|
||||
# export REGISTRY_MIRROR="http://f1361db2.m.daocloud.io"
|
||||
# 华为云镜像
|
||||
# export REGISTRY_MIRROR="https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com"
|
||||
# 阿里云 docker hub 镜像
|
||||
export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/install_kubelet.sh | sh -s 1.22.3
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="手动安装">
|
||||
|
||||
手动执行以下代码,结果与快速安装相同。<font color="red">***请将脚本第79行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.22.3***</font>
|
||||
|
||||
> docker hub 镜像请根据自己网络的情况任选一个
|
||||
> * 第四行为腾讯云 docker hub 镜像
|
||||
> * 第六行为DaoCloud docker hub 镜像
|
||||
> * 第八行为阿里云 docker hub 镜像
|
||||
``` sh
|
||||
# 在 master 节点和 worker 节点都要执行
|
||||
# 最后一个参数 1.22.3 用于指定 kubenetes 版本,支持所有 1.22.x 版本的安装
|
||||
# 腾讯云 docker hub 镜像
|
||||
# export REGISTRY_MIRROR="https://mirror.ccs.tencentyun.com"
|
||||
# DaoCloud 镜像
|
||||
# export REGISTRY_MIRROR="http://f1361db2.m.daocloud.io"
|
||||
# 阿里云 docker hub 镜像
|
||||
export REGISTRY_MIRROR=https://registry.cn-hangzhou.aliyuncs.com
|
||||
```
|
||||
|
||||
<<< @/.vuepress/public/install-script/v1.22.x/install_kubelet.sh {79}
|
||||
|
||||
::: warning
|
||||
如果此时执行 `systemctl status kubelet` 命令,将得到 kubelet 启动失败的错误提示,请忽略此错误,因为必须完成后续步骤中 kubeadm init 的操作,kubelet 才能正常启动
|
||||
:::
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
|
||||
</InstallEnvCheck20>
|
||||
|
||||
<!-- </SharingBlock> -->
|
||||
|
||||
<!-- </div>
|
||||
|
||||
<div slot="step3"> -->
|
||||
|
||||
## 初始化 master 节点
|
||||
|
||||
::: danger 关于初始化时用到的环境变量
|
||||
* **APISERVER_NAME** 不能是 master 的 hostname
|
||||
* **APISERVER_NAME** 必须全为小写字母、数字、小数点,不能包含减号
|
||||
* **POD_SUBNET** 所使用的网段不能与 ***master节点/worker节点*** 所在的网段重叠。该字段的取值为一个 <a href="/glossary/cidr.html" target="_blank">CIDR</a> 值,如果您对 CIDR 这个概念还不熟悉,请仍然执行 export POD_SUBNET=10.100.0.0/16 命令,不做修改
|
||||
:::
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="快速初始化" active>
|
||||
|
||||
|
||||
**请将脚本最后的 1.22.3 替换成您需要的版本号(必须是 1.22 的小版本,不能是 1.19.1 等),**
|
||||
<font color="red">脚本中间的 v1.22.x 不要替换</font>
|
||||
|
||||
``` sh {10}
|
||||
# 只在 master 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点实际 IP(请使用内网 IP)
|
||||
# export 命令只在当前 shell 会话中有效,开启新的 shell 窗口后,如果要继续安装过程,请重新执行此处的 export 命令
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为 您想要的 dnsName
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
# Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/init_master.sh | sh -s 1.22.3
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="手动初始化">
|
||||
|
||||
手动执行以下代码,结果与快速初始化相同。<font color="red">***请将脚本第21行(已高亮)的 ${1} 替换成您需要的版本号,例如 1.22.3***</font>
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点的内网IP
|
||||
# export 命令只在当前 shell 会话中有效,开启新的 shell 窗口后,如果要继续安装过程,请重新执行此处的 export 命令
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为 您想要的 dnsName
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
# Kubernetes 容器组所在的网段,该网段安装完成后,由 kubernetes 创建,事先并不存在于您的物理网络中
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
```
|
||||
|
||||
<<< @/.vuepress/public/install-script/v1.22.x/init_master.sh {21}
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
|
||||
> 感谢 [https://github.com/zhangguanzhang/google_containers](https://github.com/zhangguanzhang/google_containers) 提供最新的 google_containers 国内镜像
|
||||
|
||||
如果出现如下错误:
|
||||
``` {5,6}
|
||||
[config/images] Pulled registry.aliyuncs.com/k8sxio/pause:3.2
|
||||
[config/images] Pulled registry.aliyuncs.com/k8sxio/etcd:3.4.13-0
|
||||
failed to pull image "swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0": output: time="2021-04-30T13:26:14+08:00" level=fatal
|
||||
msg="pulling image failed: rpc error: code = NotFound desc = failed to pull and unpack image \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\":
|
||||
failed to resolve reference \"swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0\":
|
||||
swr.cn-east-2.myhuaweicloud.com/coredns:1.8.0: not found", error: exit status 1
|
||||
To see the stack trace of this error execute with --v=5 or higher
|
||||
```
|
||||
请执行如下命令:
|
||||
> 在原命令的最后增加参数 `/coredns`
|
||||
``` sh
|
||||
curl -sSL https://kuboard.cn/install-script/v1.22.x/init_master.sh | sh -s 1.22.3 /coredns
|
||||
```
|
||||
|
||||
</b-card>
|
||||
|
||||
<b-button v-b-toggle.collapse-init-error variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-error', 'error-init-master', '查看初始化时的错误解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-init-error" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
* 请确保您的环境符合 [安装containerd/kubelet/kubeadm/kubectl](#安装containerd-kubelet-kubeadm-kubectl) 中所有勾选框的要求
|
||||
* 请确保您使用 root 用户执行初始化命令
|
||||
* 检查环境变量,执行如下命令
|
||||
``` sh
|
||||
echo MASTER_IP=${MASTER_IP} && echo APISERVER_NAME=${APISERVER_NAME} && echo POD_SUBNET=${POD_SUBNET}
|
||||
```sh {4,5,6}
|
||||
docker run -d \
|
||||
--restart=unless-stopped \
|
||||
--name=kuboard-spray \
|
||||
-p 80:80/tcp \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /root/kuboard-spray-data:/data \
|
||||
eipwork/kuboard-spray:v1.0.0-alpha.1-amd64
|
||||
```
|
||||
请验证如下几点:
|
||||
* 环境变量 ***MASTER_IP*** 的值应该为 master 节点的 **内网IP**,如果不是,请重新 export
|
||||
* **APISERVER_NAME** 不能是 master 的 hostname
|
||||
* **APISERVER_NAME** 必须全为小写字母、数字、小数点,不能包含减号
|
||||
* **POD_SUBNET** 所使用的网段不能与 ***master节点/worker节点*** 所在的网段重叠。该字段的取值为一个 <a href="/glossary/cidr.html" target="_blank">CIDR</a> 值,如果您对 CIDR 这个概念还不熟悉,请仍然执行 export POD_SUBNET=10.100.0.0/16 命令,不做修改
|
||||
* 重新初始化 master 节点前,请先执行 `kubeadm reset -f` 操作
|
||||
::: tip 持久化
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
* KuboardSpray 的信息保存在容器的 `/data` 路径,请将其映射到一个您认为安全的地方,上面的命令中,将其映射到了 `/root/kuboard-spray-data` 路径;
|
||||
* 只要此路径的内容不受损坏,重启、升级、重新安装 Kuboard-Spray,或者将数据及 Kuboard-Spray 迁移到另外一台机器上,您都可以找回到原来的信息。
|
||||
|
||||
**检查 master 初始化结果**
|
||||
|
||||
`coredns` 将处于启动失败的状态,请继续下一步,完成 [安装网络插件](#安装网络插件) 这个步骤后,coredns 将正常启动。
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
|
||||
# 执行如下命令,等待 3-10 分钟,直到所有的容器组处于 Running 状态
|
||||
watch kubectl get pod -n kube-system -o wide
|
||||
|
||||
# 查看 master 节点初始化结果
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
|
||||
<b-button v-b-toggle.collapse-init-pending variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-pending', 'error-init-master', '查看初始化时的镜像下载错误的解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-init-pending" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
* ImagePullBackoff / Pending
|
||||
* 如果 `kubectl get pod -n kube-system -o wide` 的输出结果中出现 ImagePullBackoff 或者长时间处于 Pending 的情况
|
||||
* ContainerCreating
|
||||
* 如果 `kubectl get pod -n kube-system -o wide` 的输出结果中某个 Pod 长期处于 ContainerCreating、PodInitializing 或 Init:0/3 的状态,可以尝试:
|
||||
* 查看该 Pod 的状态,例如:
|
||||
``` sh
|
||||
kubectl describe pod kube-flannel-ds-amd64-8l25c -n kube-system
|
||||
```
|
||||
如果输出结果中,最后一行显示的是 Pulling image,请耐心等待
|
||||
```
|
||||
Normal Pulling 44s kubelet, k8s-worker-02 Pulling image "quay.io/coreos/flannel:v0.12.0-amd64"
|
||||
```
|
||||
* 将该 Pod 删除,系统会自动重建一个新的 Pod,例如:
|
||||
``` sh
|
||||
kubectl delete pod kube-flannel-ds-amd64-8l25c -n kube-system
|
||||
```
|
||||
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
<!-- </div>
|
||||
|
||||
|
||||
<div slot="step4"> -->
|
||||
|
||||
## 安装网络插件
|
||||
|
||||
网络插件可以选择 calico 或者 flannel(任意选择其一即可)。
|
||||
|
||||
<b-card>
|
||||
<b-tabs content-class="mt-3">
|
||||
<b-tab title="Calico" active>
|
||||
|
||||
::: danger 阿里云
|
||||
如果您在阿里云上安装 K8S,建议使用 flannel,有多个案例表明 calico 与阿里云存在兼容性问题。
|
||||
:::
|
||||
|
||||
``` sh
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
kubectl apply -f https://kuboard.cn/install-script/v1.22.x/calico-operator.yaml
|
||||
wget https://kuboard.cn/install-script/v1.22.x/calico-custom-resources.yaml
|
||||
sed -i "s#192.168.0.0/16#${POD_SUBNET}#" calico-custom-resources.yaml
|
||||
kubectl apply -f calico-custom-resources.yaml
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
<b-tab title="Flannel">
|
||||
|
||||
``` sh
|
||||
export POD_SUBNET=10.100.0.0/16
|
||||
wget https://kuboard.cn/install-script/flannel/flannel-v0.14.0.yaml
|
||||
sed -i "s#10.244.0.0/16#${POD_SUBNET}#" flannel-v0.14.0.yaml
|
||||
kubectl apply -f ./flannel-v0.14.0.yaml
|
||||
```
|
||||
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
</b-card>
|
||||
|
||||
|
||||
## 初始化 worker节点
|
||||
|
||||
### 获得 join命令参数
|
||||
|
||||
**在 master 节点上执行**
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubeadm token create --print-join-command
|
||||
```
|
||||
|
||||
可获取kubeadm join 命令及参数,如下所示
|
||||
|
||||
``` sh
|
||||
# kubeadm token create 命令的输出
|
||||
kubeadm join apiserver.demo:6443 --token mpfjma.4vjjg8flqihor4vt --discovery-token-ca-cert-hash sha256:6f7a8e40a810323672de5eee6f4d19aa2dbdb38411845a1bf5dd63485c43d303
|
||||
```
|
||||
|
||||
::: tip 有效时间
|
||||
该 token 的有效时间为 2 个小时,2小时内,您可以使用此 token 初始化任意数量的 worker 节点。
|
||||
:::
|
||||
|
||||
|
||||
### 初始化worker
|
||||
|
||||
**针对所有的 worker 节点执行**
|
||||
|
||||
``` sh
|
||||
# 只在 worker 节点执行
|
||||
# 替换 x.x.x.x 为 master 节点的内网 IP
|
||||
export MASTER_IP=x.x.x.x
|
||||
# 替换 apiserver.demo 为初始化 master 节点时所使用的 APISERVER_NAME
|
||||
export APISERVER_NAME=apiserver.demo
|
||||
echo "${MASTER_IP} ${APISERVER_NAME}" >> /etc/hosts
|
||||
|
||||
# 替换为 master 节点上 kubeadm token create 命令的输出
|
||||
kubeadm join apiserver.demo:6443 --token mpfjma.4vjjg8flqihor4vt --discovery-token-ca-cert-hash sha256:6f7a8e40a810323672de5eee6f4d19aa2dbdb38411845a1bf5dd63485c43d303
|
||||
```
|
||||
|
||||
<b-button v-b-toggle.collapse-join-error variant="danger" size="sm" style="margin-top: 1rem;" v-on:click="$sendGaEvent('install-k8s-error', 'error-init-worker', '查看初始化worker时的错误解决办法')">如果出错点这里</b-button>
|
||||
<b-collapse id="collapse-join-error" class="mt-2">
|
||||
<b-card style="background-color: rgb(254, 240, 240); border: solid 1px #F56C6C;">
|
||||
|
||||
### 常见错误原因
|
||||
|
||||
经常在群里提问为什么 join 不成功的情况大致有这几种:
|
||||
|
||||
#### worker 节点不能访问 apiserver
|
||||
|
||||
在worker节点执行以下语句可验证worker节点是否能访问 apiserver
|
||||
``` sh
|
||||
curl -ik https://apiserver.demo:6443
|
||||
```
|
||||
如果不能,请在 master 节点上验证
|
||||
``` sh
|
||||
curl -ik https://localhost:6443
|
||||
```
|
||||
正常输出结果如下所示:
|
||||
``` {1}
|
||||
HTTP/1.1 403 Forbidden
|
||||
Cache-Control: no-cache, private
|
||||
Content-Type: application/json
|
||||
X-Content-Type-Options: nosniff
|
||||
Date: Fri, 15 Nov 2019 04:34:40 GMT
|
||||
Content-Length: 233
|
||||
|
||||
{
|
||||
"kind": "Status",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
...
|
||||
```
|
||||
::: tip 可能原因
|
||||
* 如果 master 节点能够访问 apiserver、而 worker 节点不能,则请检查自己的网络设置
|
||||
* /etc/hosts 是否正确设置?
|
||||
* 是否有安全组或防火墙的限制?
|
||||
:::
|
||||
|
||||
#### worker 节点默认网卡
|
||||
|
||||
|
||||
* 在浏览器打开地址 `http://这台机器的IP`,输入默认密码 `Kuboard123`,即可登录 Kuboard-Spray 界面。
|
||||
|
||||
## 加载离线资源包
|
||||
|
||||
* 在 Kuboard-Spray 界面中,导航到 `系统设置` --> `资源包管理` 界面,可以看到已经等候您多时的 `Kuboard-Spray 离线资源包`,如下图所示:
|
||||
|
||||

|
||||
|
||||
* 点击 `导 入` 按钮,在界面的引导下完成资源包的加载。
|
||||
|
||||
::: tip 离线导入
|
||||
|
||||
如果您处在内网环境,上图中的列表默认将是空的,请注意其中的 `离线加载资源包` 按钮,它可以引导您轻松完成资源包的离线加载过程。
|
||||
|
||||
:::
|
||||
|
||||
## 规划并安装集群
|
||||
|
||||
* 在 Kuboard-Spray 界面中,导航到 `集群管理` 界面,点击界面中的 `添加集群安装计划` 按钮,填写表单如下:
|
||||
* 集群名称: 自定义名称,本文中填写为 kuboard123,此名称不可以修改;
|
||||
* 资源包:选择前面步骤中导入的离线资源包。
|
||||
|
||||

|
||||
|
||||
* 点击上图对话框中的 `确定` 按钮后,将进入集群规划页面,在该界面中添加您每个集群节点的连接参数并设置节点的角色,如下图所示:
|
||||
|
||||

|
||||
|
||||
::: tip 注意事项
|
||||
|
||||
* 在 `全局设置` 标签页,可以设置节点的通用连接参数,例如所有的节点都使用相同的 ssh 端口、用户名、密码,则共同的参数只在此处设置即可;
|
||||
* 在节点标签页,如果该节点的角色包含 `etcd` 则必须填写 `ETCD 成员名称` 这个字段;
|
||||
* 如果您 KuboardSpray 所在节点不能直接访问到 Kubernetes 集群的节点,您可以设置跳板机参数,使 KuboardSpray 可以通过 ssh 访问集群节点。
|
||||
* 集群安装过程中,除了已经导入的资源包以外,还需要使用 yum 或 apt 指令安装一些系统软件,例如 curl, rsync, ipvadm, ipset, ethtool 等,此时要用到操作系统的 apt 软件源或者 yum 软件源。`全局设置` 标签页中,可以引导您完成 apt / yum 软件源的设置,您可以:
|
||||
* 使用节点操作系统已经事先配置的 apt / yum 源,或者
|
||||
* 在安装过程中自动配置节点的操作系统使用指定的软件源
|
||||
* 如果您使用 docker 作为集群的容器引擎,还需要在 `全局设置` 标签页指定安装 docker 用的 apt / yum 源。
|
||||
> 如果您使用 containerd 作为容器引擎,则无需配置 docker 的 apt / yum 源,containerd 的安装包已经包含在 KuboardSpray 离线资源包中。
|
||||
|
||||
:::
|
||||
|
||||
* 点击上图的 `保存` 按钮,再点击 `执行` 按钮,可以启动集群的离线安装过程,如下图所示:
|
||||
|
||||

|
||||
|
||||
|
||||
* 取决于您机器的性能和网络访问速度,大概喝一杯茶的功夫,集群就安装好了,安装成功时,日志界面的显示如下图所示:
|
||||
|
||||

|
||||
|
||||
## 访问集群
|
||||
|
||||
* 如果集群日志界面提示您集群已经安装成功,此时您可以返回到集群规划页面,此界面将自动切换到 `访问集群` 标签页,如下图所示:
|
||||
|
||||
* [Kubelet使用的 IP 地址](#检查网络) 与 master 节点可互通(无需 NAT 映射),且没有防火墙、安全组隔离
|
||||
* 如果你使用 vmware 或 virtualbox 创建虚拟机用于 K8S 学习,可以尝试 NAT 模式的网络,而不是桥接模式的网络
|
||||
界面给出了三种方式可以访问 kubernetes 集群:
|
||||
<div style="font-size: 13px;margin-left: 40px;">
|
||||
|
||||
### 移除worker节点并重试
|
||||
* 在集群主节点上执行 kubectl 命令
|
||||
* 获取集群的 .kubeconfig 文件
|
||||
* 将集群导入到 kuboard管理界面
|
||||
|
||||
::: warning
|
||||
正常情况下,您无需移除 worker 节点,如果添加到集群出错,您可以移除 worker 节点,再重新尝试添加
|
||||
:::
|
||||
|
||||
在准备移除的 worker 节点上执行
|
||||
|
||||
``` sh
|
||||
# 只在 worker 节点执行
|
||||
kubeadm reset -f
|
||||
```
|
||||
|
||||
在 master 节点 demo-master-a-1 上执行
|
||||
|
||||
```sh
|
||||
# 只在 master 节点执行
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
如果列表中没有您要移除的节点,则忽略下一个步骤
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubectl delete node demo-worker-x-x
|
||||
```
|
||||
|
||||
::: tip
|
||||
* 将 demo-worker-x-x 替换为要移除的 worker 节点的名字
|
||||
* worker 节点的名字可以通过在节点 demo-master-a-1 上执行 kubectl get nodes 命令获得
|
||||
:::
|
||||
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
|
||||
### 检查初始化结果
|
||||
|
||||
在 master 节点上执行
|
||||
|
||||
``` sh
|
||||
# 只在 master 节点执行
|
||||
kubectl get nodes -o wide
|
||||
```
|
||||
输出结果如下所示:
|
||||
```sh
|
||||
[root@demo-master-a-1 ~]# kubectl get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
demo-master-a-1 Ready master 5m3s v1.22.x
|
||||
demo-worker-a-1 Ready <none> 2m26s v1.22.x
|
||||
demo-worker-a-2 Ready <none> 3m56s v1.22.x
|
||||
```
|
||||
|
||||
|
||||
<!-- </div>
|
||||
|
||||
<div slot="step6"> -->
|
||||
</div>
|
||||
|
||||

|
||||
|
||||
## 下一步
|
||||
|
||||
@ -564,12 +183,11 @@ demo-worker-a-2 Ready <none> 3m56s v1.22.x
|
||||
|
||||
您已经完成了 Kubernetes 集群的安装,下一步请:
|
||||
|
||||
<Course courseId="477593" />
|
||||
|
||||
<!-- <span v-on:click="$sendGaEvent('安装后求GitHub Star','安装后求GitHub Star','安装后求GitHub Star')"><a href="https://github.com/eip-work/kuboard-press" target="_blank">点击此处,给个GitHub Star</a></span>
|
||||
支持一下吧,<StarCount></StarCount>这么多人都 star 了呢,怎么能少得了您呢? -->
|
||||
|
||||
[安装 Kuboard - 微服务管理界面](/install/v3/install-built-in.html)
|
||||
[安装 Kuboard - K8s 集群管理界面](/install/v3/install-built-in.html)
|
||||
|
||||
[获取 Kubernetes 免费教程](/learning/)
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ kubectl version
|
||||
|
||||
## 获取 kubectl config 文件
|
||||
|
||||
如果您参考 [安装 Kubernetes 单Master节点](install-k8s.html) 或 [安装 Kubernetes 高可用](install-kubernetes.html) 完成了 Kubernetes 安装,**请在 demo-master-a-1 节点上执行如下命令**
|
||||
如果您参考 [离线安装高可用的Kubernetes集群](install-k8s.html) 或 [安装 Kubernetes 高可用](install-kubernetes.html) 完成了 Kubernetes 安装,**请在 demo-master-a-1 节点上执行如下命令**
|
||||
|
||||
```sh
|
||||
cat /etc/kubernetes/admin.conf
|
||||
|
||||
@ -50,7 +50,7 @@ meta:
|
||||
* [Kubernetes组件](/learning/k8s-bg/component.html)
|
||||
|
||||
## **Kubernetes 体验**
|
||||
* [安装 Kubernetes 单Master节点](/install/install-k8s.html) (30分钟,初学者也许需要更多)
|
||||
* [离线安装高可用的Kubernetes集群](/install/install-k8s.html) (30分钟,初学者也许需要更多)
|
||||
* 参照经过众多网友验证,不断优化的安装文档,迅速完成 Kubernetes 安装,拥有属于自己的 Kubernetes 集群。
|
||||
* [安装微服务管理界面](/install/v3/install.html) (5分钟)
|
||||
* 使用 Kuboard,无需编写复杂冗长的 YAML 文件,就可以轻松管理 Kubernetes 集群。
|
||||
|
||||
@ -20,7 +20,7 @@ HorizontalPodAutoscaler 可以根据观察到的 CPU 利用率(或者 beta 阶
|
||||
## 前提条件
|
||||
|
||||
如运行本文中的例子,必须满足以下条件:
|
||||
* Kubernetes 集群,版本不低于 v1.6;可以参考 [安装 Kubernetes 单节点](/install/install-k8s.html) 完成集群的安装;
|
||||
* Kubernetes 集群,版本不低于 v1.6;可以参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 完成集群的安装;
|
||||
* Kubernetes 集群中已安装 [metrics-server](https://github.com/kubernetes-incubator/metrics-server/),用于提供资源度量的 API 接口,可以使用 `kubectl apply -f https://addons.kuboard.cn/metrics-server/0.3.7/metrics-server.yaml` 指令完成 metrics-server 的安装;
|
||||
* 如果想要使用自定义度量值,您的集群必须能够和这些度量值接口的服务进行通信;
|
||||
* 如果想要使用与 Kubernetes Object 无关的度量值(External metrics API),Kubernetes 集群版本必须不低于 v1.10,并且集群必须能够与提供外部度量值的 API 服务进行通信。
|
||||
|
||||
@ -21,7 +21,7 @@ Kuboard Proxy 提供了 Auth Proxy 的功能,本文以 Grafana 为例,介绍
|
||||
|
||||
## 前提
|
||||
|
||||
* 您已经安装了 Kubernetes 集群(不低于 v1.13),如果没有,请参考 [安装 Kubernetes 单 Master 节点](/install/install-k8s.html);
|
||||
* 您已经安装了 Kubernetes 集群(不低于 v1.13),如果没有,请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html);
|
||||
* 您已经安装了 Kuboard (不低于 v1.0.7.1),如果没有,请参考 [安装 Kuboard](/install/v3/install.html)
|
||||
|
||||
## 安装 Grafana
|
||||
|
||||
@ -20,7 +20,7 @@ meta:
|
||||
|
||||
* 您已经安装了 Kubernetes 集群
|
||||
* 版本不低于 Kubernetes v1.13.0
|
||||
* 可参考 [安装Kubernetes单Master节点](/install/install-k8s.html)
|
||||
* 可参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* 您已经安装了 Kuboard
|
||||
* 版本不低于 Kuboard v1.0.6-beta.7
|
||||
* 可参考 [安装Kuboard](/install/v3/install.html)
|
||||
|
||||
@ -17,7 +17,7 @@ meta:
|
||||
|
||||
假设您已经
|
||||
|
||||
* 完成 Kubernetes 集群的安装,请参考文档 [安装 Kubernetes 单Master节点](/install/install-k8s.html)
|
||||
* 完成 Kubernetes 集群的安装,请参考文档 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* 完成 Kuboard 的安装,请参考文档 [安装 Kuboard](/install/v3/install.html)
|
||||
* 版本不低于 `v3.1.1.0`
|
||||
|
||||
@ -27,7 +27,7 @@ meta:
|
||||
|
||||
::: tip
|
||||
* kubectl 是 k8s 的客户端工具,可以使用命令行管理集群。
|
||||
* 如果参考文档 [安装 Kubernetes 单Master节点](/install/install-k8s.html),您可以在 master 节点的 root 用户使用 kubectl 操作您的集群
|
||||
* 如果参考文档 [离线安装高可用的Kubernetes集群](/install/install-k8s.html),您可以在 master 节点的 root 用户使用 kubectl 操作您的集群
|
||||
* 您也可以尝试 [从客户端电脑远程管理 Kubernetes](/install/install-kubectl.html)
|
||||
:::
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ meta:
|
||||
<AdSenseTitle/>
|
||||
|
||||
本文描述了Kubernetes集群和Master节点(实际上是 apiserver)之间的通信路径。用户在自定义集群的安装之前,或者调整集群的网络配置之前必须理解这部分内容。例如:
|
||||
* 从 [安装Kubernetes单Master节点](/install/install-k8s.html) 的安装结果调整到 [安装Kubernetes高可用](/install/install-kubernetes.html) 的安装结果
|
||||
* 从 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 的安装结果调整到 [安装Kubernetes高可用](/install/install-kubernetes.html) 的安装结果
|
||||
* 将公网 IP 地址上的机器作为节点加入到 Kubernetes 集群
|
||||
|
||||
Master-Node 之间的通信可以分为如下两类:
|
||||
|
||||
@ -69,7 +69,7 @@ cloud-controller-manager 使得云供应商的代码和 Kubernetes 的代码可
|
||||
* 节点控制器:当某一个节点停止响应时,调用云供应商的接口,以检查该节点的虚拟机是否已经被云供应商删除
|
||||
> 译者注:私有化部署Kubernetes时,我们不知道节点的操作系统是否删除,所以在移除节点后,要自行通过 `kubectl delete node` 将节点对象从 Kubernetes 中删除
|
||||
* 路由控制器:在云供应商的基础设施中设定网络路由
|
||||
> 译者注:私有化部署Kubernetes时,需要自行规划Kubernetes的拓扑结构,并做好路由配置,例如 [安装Kubernetes单Master节点](/install/install-k8s.html) 中所作的
|
||||
> 译者注:私有化部署Kubernetes时,需要自行规划Kubernetes的拓扑结构,并做好路由配置,例如 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 中所作的
|
||||
* 服务(Service)控制器:创建、更新、删除云供应商提供的负载均衡器
|
||||
> 译者注:私有化部署Kubernetes时,不支持 LoadBalancer 类型的 Service,如需要此特性,需要创建 NodePort 类型的 Service,并自行配置负载均衡器
|
||||
* 数据卷(Volume)控制器:创建、绑定、挂载数据卷,并协调云供应商编排数据卷
|
||||
|
||||
@ -19,7 +19,7 @@ Kubernetes ConfigMap 可以将配置信息和容器镜像解耦,以使得容
|
||||
|
||||
您已经安装了 Kubernetes 集群,并且已经在集群中安装了 Kuboard,如果尚未安装,请参考:
|
||||
|
||||
* [安装 Kubernetes 单Master节点](/install/install-k8s.html)
|
||||
* [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* [安装 Kuboard](/install/v3/install.html)
|
||||
|
||||
## 创建 ConfigMap
|
||||
|
||||
@ -21,7 +21,7 @@ Kubernetes 中支持容器的 postStart 和 preStop 事件,本文阐述了如
|
||||
|
||||
您已经有一个安装好的 Kubernetes 集群,并且可以通过 kubectl 访问该集群。请参考:
|
||||
|
||||
[安装Kubernetes单Master节点](/install/install-k8s.html)
|
||||
[离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
|
||||
## 定义postStart和preStop处理程序
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ meta:
|
||||
|
||||
## 前提条件
|
||||
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [安装 Kubernetes 集群](/install/install-k8s.html);
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html);
|
||||
|
||||
* 您已经安装了 Kuboard,且 Kuboard 版本不低于 v2.0.5,安装方法请参考 [安装 Kuboard](/install/v3/install.html);
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ meta:
|
||||
|
||||
## 前提条件
|
||||
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [安装 Kubernetes 集群](/install/install-k8s.html);
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html);
|
||||
|
||||
* Kubernetes 集群有至少 3 个工作节点,且每个工作节点都有一块初系统盘以外的 **未格式化** 的裸盘(工作节点是虚拟机时,未格式化的裸盘可以是虚拟磁盘),用于创建 3 个 Ceph OSD;
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ meta:
|
||||
|
||||
## 前提条件
|
||||
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [安装 Kubernetes 集群](/install/install-k8s.html);
|
||||
* 您已经安装了 Kubernetes 集群,且集群版本不低于 v1.17.0,安装方法请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html);
|
||||
|
||||
* Kubernetes 集群有至少 3 个工作节点,且每个工作节点都有一块初系统盘以外的 **未格式化** 的裸盘(工作节点是虚拟机时,未格式化的裸盘可以是虚拟磁盘),用于创建 3 个 Ceph OSD;
|
||||
|
||||
|
||||
@ -21,13 +21,13 @@ meta:
|
||||
|
||||
## 前提条件
|
||||
|
||||
您已经安装了 Kubernetes 集群,如果没有,请参考文档 [安装Kubernetes单Master节点](/install/install-k8s.html)
|
||||
您已经安装了 Kubernetes 集群,如果没有,请参考文档 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
|
||||
您可以使用 kubectl 访问您的集群,请参考文档 [安装Kubectl](/install/install-kubectl.html)
|
||||
|
||||
请确保您使用的网络插件支持 Network Policy,如下的网络插件都是可以的:
|
||||
|
||||
* [Calico](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/) 如果您按照 [安装Kubernetes单Master节点](/install/install-k8s.html) 安装的集群,默认是 calico 网络插件
|
||||
* [Calico](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/calico-network-policy/) 如果您按照 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 安装的集群,默认是 calico 网络插件
|
||||
* [Cilium](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/)
|
||||
* [Kube-router](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/kube-router-network-policy/)
|
||||
* [Romana](https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/romana-network-policy/)
|
||||
|
||||
@ -23,7 +23,7 @@ meta:
|
||||
## 前提条件
|
||||
|
||||
* 您必须有一个K8S集群
|
||||
* 可参考 [安装Kubernetes单Master节点集群](/install/install-k8s.html)
|
||||
* 可参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* kubectl 版本不低于 1.14,可参考 [安装kubectl](/install/install-kubectl.html)
|
||||
* 在执行 kubectl 命令的机器上任意位置创建一个空白目录用于本例子的执行。本文假设后续所有命令的当前目录都是此时创建的这个目录。
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ PersistentVolume 和 PersistentVolumeClaim 都是独立于 Pod 的生命周期
|
||||
## 前提条件
|
||||
|
||||
* 您必须有一个K8S集群
|
||||
* 可参考 [安装Kubernetes单Master节点集群](/install/install-k8s.html)
|
||||
* 可参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* kubectl 版本不低于 1.14,可参考 [安装kubectl](/install/install-kubectl.html)
|
||||
* 在执行 kubectl 命令的机器上任意位置创建一个空白目录用于本例子的执行。本文假设后续所有命令的当前目录都是此时创建的这个目录。
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ Open Capacity Platform 是基于 Java Spring Cloud 的微服务架构,为了
|
||||
* Kubernetes worker 节点
|
||||
* **软件**
|
||||
* Kubernetes 集群及管理软件
|
||||
* Kubernetes 最新版本,参考 [安装Kubernetes单Master节点](/install/install-k8s.html)
|
||||
* Kubernetes 最新版本,参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html)
|
||||
* Kuboard 最新版本,参考 [安装Kuboard](/install/install-kubernetes.html)
|
||||
* Master节点
|
||||
* Docker 已在安装 Kubernetes 时完成安装
|
||||
|
||||
@ -33,7 +33,7 @@ meta:
|
||||
|
||||
Kuboard 为初学者学习 Kubernetes 时设计了如下学习路径:
|
||||
|
||||
* 跟随文档 [安装 Kubernetes 单Master节点](/install/install-k8s.html) 快速安装一个可以练习使用的 Kubernetes 环境,(初学者也许要花费2小时或更多)
|
||||
* 跟随文档 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) 快速安装一个可以练习使用的 Kubernetes 环境,(初学者也许要花费2小时或更多)
|
||||
* 跟随文档 [安装 Kuboard](/install/v3/install.html) (5分钟)
|
||||
* 使用 Kuboard 工作负载编辑器 [创建 busybox](/guide/example/busybox.html) (10分钟)
|
||||
* 尝试 Kuboard 设计的其他 example [使用 Kuboard](/guide/index.html)
|
||||
|
||||
@ -33,7 +33,7 @@ Kuboard 从以下几方面解决 Kubernetes 落地的难题:
|
||||
|
||||
### Kubernetes 安装手册
|
||||
|
||||
通过对 Kubernetes 安装步骤的反复研究,提供了精简的 Kubernetes 安装手册,并且听取网友实际安装过程中的反馈,多次修改和优化,逐渐形成经过检验的、简洁的 Kubernetes 安装手册。请参考 [安装 Kubernetes 单Master节点](/install/install-k8s.html) , [安装 Kubernetes 高可用](/install/install-kubernetes.html)。
|
||||
通过对 Kubernetes 安装步骤的反复研究,提供了精简的 Kubernetes 安装手册,并且听取网友实际安装过程中的反馈,多次修改和优化,逐渐形成经过检验的、简洁的 Kubernetes 安装手册。请参考 [离线安装高可用的Kubernetes集群](/install/install-k8s.html) , [安装 Kubernetes 高可用](/install/install-kubernetes.html)。
|
||||
|
||||

|
||||
|
||||
|
||||
@ -13,15 +13,20 @@
|
||||
"@vuepress/plugin-nprogress": "^1.8.2",
|
||||
"animated-number-vue": "^1.0.0",
|
||||
"aos": "^2.3.4",
|
||||
"async-validator": "1.11.5",
|
||||
"axios": "^0.21.1",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"bootstrap": "^4.6.0",
|
||||
"bootstrap-vue": "^2.21.2",
|
||||
"codemirror": "^5.65.0",
|
||||
"date-fns": "^1.30.1",
|
||||
"element-ui": "^2.15.6",
|
||||
"esm": "^3.2.25",
|
||||
"js-cookie": "^2.2.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"reduce-css-calc": "^2.1.8",
|
||||
"vue-clipboard2": "^0.3.1",
|
||||
"vue-codemirror": "^4.0.6",
|
||||
"vue2-animate": "^2.1.4",
|
||||
"vuepress": "^1.8.2",
|
||||
"vuepress-plugin-baidu-autopush": "^1.0.1",
|
||||
|
||||
@ -75,9 +75,41 @@ Service.spec.ports[*].appProtocol
|
||||
|
||||
* proxy 在未登录时,提示登录,并返回原界面 (暂不支持此特性)
|
||||
* cronjob 支持时区设置 (Kubernetes 接口目前不支持设置时区)
|
||||
|
||||
|
||||
待解决问题:会导致用户不能删除集群
|
||||
2021/12/22 08:38:22 [Recovery] 2021/12/22 - 08:38:22 panic recovered:
|
||||
runtime error: invalid memory address or nil pointer dereference
|
||||
/usr/local/go/src/runtime/panic.go:212 (0x435eba)
|
||||
/usr/local/go/src/runtime/signal_unix.go:734 (0x44ebb2)
|
||||
/usr/src/kuboard/server/reversek8s/cluster_passport.go:43 (0xec7dee)
|
||||
/usr/src/kuboard/server/reversek8s/cluster_passport.go:109 (0xec88f8)
|
||||
/usr/src/kuboard/server/reversek8s/cluster_passport.go:200 (0xec9c32)
|
||||
/usr/src/kuboard/server/reversek8s/reverse_request.go:55 (0xed3b04)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165 (0xbff659)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/recovery.go:99 (0xbff640)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165 (0xbfe733)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/logger.go:241 (0xbfe6f2)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/context.go:165 (0xbf4be9)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/gin.go:489 (0xbf4bcf)
|
||||
/go/pkg/mod/github.com/gin-gonic/gin@v1.7.2/gin.go:445 (0xbf46bb)
|
||||
/usr/local/go/src/net/http/server.go:2887 (0x6e6b62)
|
||||
/usr/local/go/src/net/http/server.go:1952 (0x6e1f8c)
|
||||
/usr/local/go/src/runtime/asm_amd64.s:1371 (0x46e400)
|
||||
|
||||
|
||||
优化:未添加容器时,存储卷挂载页应该提示
|
||||
|
||||
-->
|
||||
|
||||
<!-- ## v3.3.0.4
|
||||
|
||||
**发布日期**
|
||||
|
||||
**优化**
|
||||
|
||||
* 优化终端界面的字体 -->
|
||||
|
||||
## v3.3.0.3
|
||||
|
||||
**发布日期**
|
||||
|
||||
14
support/kuboard-spray/README.md
Normal file
14
support/kuboard-spray/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
lessAds: true
|
||||
# vssueId: 71
|
||||
layout: SpecialSupportPage
|
||||
description: Kubernetes教程_本文描述了 kuboard-spray 的最新资源包
|
||||
---
|
||||
|
||||
# Kuboard-Spray
|
||||
|
||||
<AdSenseTitle/>
|
||||
|
||||
<ClientOnly>
|
||||
<KuboardSprayResources/>
|
||||
</ClientOnly>
|
||||
2768
yarn-error.log
2768
yarn-error.log
File diff suppressed because it is too large
Load Diff
94
yarn.lock
94
yarn.lock
@ -1501,6 +1501,11 @@ argparse@^1.0.7:
|
||||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
argparse@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://mirrors.cloud.tencent.com/npm/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
|
||||
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
|
||||
|
||||
arr-diff@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
||||
@ -1587,6 +1592,18 @@ async-limiter@~1.0.0:
|
||||
resolved "https://registry.npm.taobao.org/async-limiter/download/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd"
|
||||
integrity sha1-3TeelPDbgxCwgpH51kwyCXZmF/0=
|
||||
|
||||
async-validator@1.11.5:
|
||||
version "1.11.5"
|
||||
resolved "https://r2.cnpmjs.org/async-validator/-/async-validator-1.11.5.tgz#9d43cf49ef6bb76be5442388d19fb9a6e47597ea"
|
||||
integrity sha512-XNtCsMAeAH1pdLMEg1z8/Bb3a8cdCbui9QbJATRFHHHW5kT6+NPI3zSVQUXgikTFITzsg+kYY5NTWhM2Orwt9w==
|
||||
|
||||
async-validator@~1.8.1:
|
||||
version "1.8.5"
|
||||
resolved "https://r2.cnpmjs.org/async-validator/-/async-validator-1.8.5.tgz#dc3e08ec1fd0dddb67e60842f02c0cd1cec6d7f0"
|
||||
integrity sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==
|
||||
dependencies:
|
||||
babel-runtime "6.x"
|
||||
|
||||
async@^2.6.2:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.npm.taobao.org/async/download/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff"
|
||||
@ -1641,6 +1658,11 @@ axios@^0.21.1:
|
||||
dependencies:
|
||||
follow-redirects "^1.10.0"
|
||||
|
||||
babel-helper-vue-jsx-merge-props@^2.0.0:
|
||||
version "2.0.3"
|
||||
resolved "https://r2.cnpmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6"
|
||||
integrity sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==
|
||||
|
||||
babel-loader@^8.0.4:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.1.0.tgz?cache=0&sync_timestamp=1584715959282&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3"
|
||||
@ -1666,6 +1688,14 @@ babel-plugin-dynamic-import-node@^2.3.3:
|
||||
dependencies:
|
||||
object.assign "^4.1.0"
|
||||
|
||||
babel-runtime@6.x:
|
||||
version "6.26.0"
|
||||
resolved "https://r2.cnpmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
|
||||
integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==
|
||||
dependencies:
|
||||
core-js "^2.4.0"
|
||||
regenerator-runtime "^0.11.0"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
@ -2214,6 +2244,11 @@ coa@^2.0.2:
|
||||
chalk "^2.4.1"
|
||||
q "^1.1.2"
|
||||
|
||||
codemirror@^5.41.0, codemirror@^5.65.0:
|
||||
version "5.65.0"
|
||||
resolved "https://r2.cnpmjs.org/codemirror/-/codemirror-5.65.0.tgz#50344359393579f526ca53797e510ff75477117f"
|
||||
integrity sha512-gWEnHKEcz1Hyz7fsQWpK7P0sPI2/kSkRX2tc7DFA6TmZuDN75x/1ejnH/Pn8adYKrLEA1V2ww6L00GudHZbSKw==
|
||||
|
||||
collection-visit@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
|
||||
@ -2450,6 +2485,11 @@ core-js-compat@^3.6.2, core-js-compat@^3.6.5:
|
||||
browserslist "^4.8.5"
|
||||
semver "7.0.0"
|
||||
|
||||
core-js@^2.4.0:
|
||||
version "2.6.12"
|
||||
resolved "https://r2.cnpmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
|
||||
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
|
||||
|
||||
core-js@^3.6.4, core-js@^3.6.5:
|
||||
version "3.6.5"
|
||||
resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
|
||||
@ -2801,7 +2841,7 @@ deep-extend@^0.6.0:
|
||||
resolved "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||
integrity sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=
|
||||
|
||||
deepmerge@^1.5.2:
|
||||
deepmerge@^1.2.0, deepmerge@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753"
|
||||
integrity sha1-EEmdhohEza1P7ghC34x/bwyVp1M=
|
||||
@ -2894,6 +2934,11 @@ detect-node@^2.0.4:
|
||||
resolved "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
|
||||
integrity sha1-AU7o+PZpxcWAI9pkuBecCDooxGw=
|
||||
|
||||
diff-match-patch@^1.0.0:
|
||||
version "1.0.5"
|
||||
resolved "https://r2.cnpmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37"
|
||||
integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==
|
||||
|
||||
diffie-hellman@^5.0.0:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.npm.taobao.org/diffie-hellman/download/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
|
||||
@ -3041,6 +3086,18 @@ electron-to-chromium@^1.3.488:
|
||||
resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.498.tgz?cache=0&sync_timestamp=1594798561149&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felectron-to-chromium%2Fdownload%2Felectron-to-chromium-1.3.498.tgz#fd7188c8a49d6d0b5df1df55a1f1a4bf2c177457"
|
||||
integrity sha1-/XGIyKSdbQtd8d9VofGkvywXdFc=
|
||||
|
||||
element-ui@^2.15.6:
|
||||
version "2.15.6"
|
||||
resolved "https://r2.cnpmjs.org/element-ui/-/element-ui-2.15.6.tgz#c9609add35af5a686a4b7685dc1d757c75e01df3"
|
||||
integrity sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==
|
||||
dependencies:
|
||||
async-validator "~1.8.1"
|
||||
babel-helper-vue-jsx-merge-props "^2.0.0"
|
||||
deepmerge "^1.2.0"
|
||||
normalize-wheel "^1.0.1"
|
||||
resize-observer-polyfill "^1.5.0"
|
||||
throttle-debounce "^1.0.1"
|
||||
|
||||
elliptic@^6.0.0, elliptic@^6.5.2:
|
||||
version "6.5.3"
|
||||
resolved "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.3.tgz?cache=0&sync_timestamp=1592492844326&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6"
|
||||
@ -4474,6 +4531,13 @@ js-yaml@^3.11.0, js-yaml@^3.13.1:
|
||||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
js-yaml@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://mirrors.tencent.com/npm/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
||||
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
|
||||
jsbn@~0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
|
||||
@ -5216,6 +5280,11 @@ normalize-url@^4.1.0:
|
||||
resolved "https://registry.npm.taobao.org/normalize-url/download/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
|
||||
integrity sha1-RTNUCH5sqWlXvY9br3U/WYIUISk=
|
||||
|
||||
normalize-wheel@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://r2.cnpmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz#aec886affdb045070d856447df62ecf86146ec45"
|
||||
integrity sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA==
|
||||
|
||||
npm-run-path@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
|
||||
@ -6208,6 +6277,11 @@ regenerate@^1.4.0:
|
||||
resolved "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
|
||||
integrity sha1-ytkq2Oa1kXc0hfvgWkhcr09Ffm8=
|
||||
|
||||
regenerator-runtime@^0.11.0:
|
||||
version "0.11.1"
|
||||
resolved "https://r2.cnpmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
|
||||
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
|
||||
|
||||
regenerator-runtime@^0.13.4:
|
||||
version "0.13.5"
|
||||
resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697"
|
||||
@ -6346,6 +6420,11 @@ requires-port@^1.0.0:
|
||||
resolved "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
|
||||
integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=
|
||||
|
||||
resize-observer-polyfill@^1.5.0:
|
||||
version "1.5.1"
|
||||
resolved "https://r2.cnpmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
|
||||
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
|
||||
|
||||
resolve-cwd@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
|
||||
@ -7088,6 +7167,11 @@ text-table@^0.2.0:
|
||||
resolved "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
|
||||
throttle-debounce@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://r2.cnpmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz#51853da37be68a155cb6e827b3514a3c422e89cd"
|
||||
integrity sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==
|
||||
|
||||
through2@^2.0.0:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.npm.taobao.org/through2/download/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
|
||||
@ -7527,6 +7611,14 @@ vue-clipboard2@^0.3.1:
|
||||
dependencies:
|
||||
clipboard "^2.0.0"
|
||||
|
||||
vue-codemirror@^4.0.6:
|
||||
version "4.0.6"
|
||||
resolved "https://r2.cnpmjs.org/vue-codemirror/-/vue-codemirror-4.0.6.tgz#b786bb80d8d762a93aab8e46f79a81006f0437c4"
|
||||
integrity sha512-ilU7Uf0mqBNSSV3KT7FNEeRIxH4s1fmpG4TfHlzvXn0QiQAbkXS9lLfwuZpaBVEnpP5CSE62iGJjoliTuA8poQ==
|
||||
dependencies:
|
||||
codemirror "^5.41.0"
|
||||
diff-match-patch "^1.0.0"
|
||||
|
||||
vue-functional-data-merge@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npm.taobao.org/vue-functional-data-merge/download/vue-functional-data-merge-3.1.0.tgz#08a7797583b7f35680587f8a1d51d729aa1dc657"
|
||||
|
||||
Reference in New Issue
Block a user