限定
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
<div style="border: solid 1px #E6A23C; background-color: rgb(253, 246, 236); padding: 1rem;">
|
||||
<div v-show="!envOk" key="not">
|
||||
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;">
|
||||
<!-- <grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="2/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 1rem 0 1rem 1rem;"> -->
|
||||
|
||||
<div>
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
</grid-item>
|
||||
<!-- </grid-item>
|
||||
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '0/1'}" style="padding: 2rem 1rem 1rem 1rem;">
|
||||
<AdSenseSquare/>
|
||||
</grid-item>
|
||||
</grid>
|
||||
</grid> -->
|
||||
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div v-show="!authorized" key="not">
|
||||
|
||||
<p style="color: red">请扫描二维码加微信后,获得授权码,显示完整文档。(需分享朋友圈)</p>
|
||||
<p>全站只在此一处需要输入验证码</p>
|
||||
<p>一次验证,可查看全站所有内容</p>
|
||||
<grid :rwd="{compact: 'stack'}">
|
||||
<grid-item size="1/3" :rwd="{tablet: '1/1', compact: '1/1'}" style="padding: 0rem 0 1rem 1rem;">
|
||||
|
||||
@ -34,8 +34,9 @@
|
||||
<div v-show="authorized" key="ok">
|
||||
<!-- <el-button style="margin-top: 10px;" @click="review" type="text">再看看我是否符合安装条件</el-button> -->
|
||||
<el-alert
|
||||
title="已为您显示完整文档,感谢配合。"
|
||||
description="缓存清空后需重新获得验证码"
|
||||
style="margin-bottom: 10px;"
|
||||
title="已为您解锁全站完整文档,感谢配合。"
|
||||
description="缓存清空后需重新输入验证码"
|
||||
effect="dark"
|
||||
type="success">
|
||||
</el-alert>
|
||||
@ -46,6 +47,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
function genCode() {
|
||||
let code = parseInt(Math.random() * 100)
|
||||
if (code < 10) {
|
||||
return code + 10
|
||||
} else {
|
||||
return code
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
data () {
|
||||
@ -53,14 +63,10 @@ export default {
|
||||
if (typeof window !== 'undefined') {
|
||||
a = localStorage.getItem('SharingBlockValidated')
|
||||
}
|
||||
let c2 = parseInt(Math.random() * 10)
|
||||
if (c2 === 0) {
|
||||
c2 = 1
|
||||
}
|
||||
return {
|
||||
authorized: a,
|
||||
code1: parseInt(Math.random() * 100),
|
||||
code2: c2,
|
||||
code1: genCode(),
|
||||
code2: genCode(),
|
||||
authCode: undefined
|
||||
}
|
||||
},
|
||||
|
||||
@ -221,6 +221,7 @@ module.exports = {
|
||||
'k8s-intermediate/persistent/pv',
|
||||
'k8s-intermediate/persistent/storage-class',
|
||||
'k8s-intermediate/persistent/nfs',
|
||||
'k8s-intermediate/persistent/limits',
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@ -109,6 +109,8 @@ echo "127.0.0.1 $(hostname)" >> /etc/hosts
|
||||
|
||||
## 安装 docker / kubelet
|
||||
|
||||
<SharingBlock>
|
||||
|
||||
<InstallEnvCheck type="kubernetes">
|
||||
|
||||
使用 root 身份在所有节点执行如下代码,以安装软件:
|
||||
@ -142,6 +144,8 @@ curl -sSL https://kuboard.cn/install-script/v1.16.2/install_kubelet.sh | sh
|
||||
|
||||
</InstallEnvCheck>
|
||||
|
||||
</SharingBlock>
|
||||
|
||||
<!-- </div>
|
||||
|
||||
<div slot="step3"> -->
|
||||
|
||||
@ -77,6 +77,8 @@ Labels(标签)可以在创建 Kubernetes 对象时附加上去,也可以
|
||||
|
||||
## 实战:为您的 nginx Deployment 创建一个 Service
|
||||
|
||||
<SharingBlock>
|
||||
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="使用kubectl">
|
||||
|
||||
@ -199,3 +201,5 @@ curl <任意节点的 IP>:32600
|
||||
~~接下来是对于多实例部署和滚动更新的相关介绍与实践
|
||||
|
||||
~~let‘s go-> [应用程序的伸缩](./scale.html)
|
||||
|
||||
</SharingBlock>
|
||||
|
||||
@ -44,6 +44,8 @@ spec:
|
||||
|
||||
## 实战:将 nginx Deployment 扩容到 4 个副本
|
||||
|
||||
<SharingBlock>
|
||||
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="使用kubectl">
|
||||
|
||||
@ -112,3 +114,5 @@ watch kubectl get pods -o wide
|
||||
~~一旦运行了多个应用程序实例,就可以在不停机的情况下执行滚动更新了,
|
||||
|
||||
~~let‘s go-> [执行滚动更新](./update.html)
|
||||
|
||||
</SharingBlock>
|
||||
|
||||
62
learning/k8s-intermediate/persistent/limits.md
Normal file
62
learning/k8s-intermediate/persistent/limits.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
# vssueId: 59
|
||||
layout: LearningLayout
|
||||
description: Kubernetes教程_本文介绍Kubernetes中Volume(数据卷)的基本概念_用法以及支持的数据卷类型
|
||||
meta:
|
||||
- name: keywords
|
||||
content: Kubernetes教程,K8S教程,Kubernetes入门,K8S入门,Kubernetes数据卷
|
||||
---
|
||||
|
||||
# 节点相关的数据卷限制
|
||||
|
||||
<AdSenseTitle>
|
||||
|
||||
> 参考文档: [Node-specific Volume Limits](https://kubernetes.io/docs/concepts/storage/storage-limits/)
|
||||
|
||||
本文描述了在不同的云供应商环境下,单个节点可以挂载的数据卷的最大数量。
|
||||
|
||||
类似于 Google、Amazon、Microsoft 这样的云供应商,通常都会限定单个节点可挂载的数据卷的最大数量。Kubernetes 必须遵守这些限定,否则,当 Pod 调度上某节点上时,可能会因为不能实现数据卷挂载而启动不了。
|
||||
|
||||
[[TOC]]
|
||||
|
||||
</AdSenseTitle>
|
||||
|
||||
## Kubernetes默认限制
|
||||
|
||||
Kubernetes调度器默认限制了单个节点可以挂载的数据卷的最大数量:
|
||||
|
||||
| 云供应商 | 节点最大数据卷数量 |
|
||||
| ------------------------------------------------------------ | ------------------ |
|
||||
| [Amazon Elastic Block Store (EBS)](https://aws.amazon.com/ebs/) | 39 |
|
||||
| [Google Persistent Disk](https://cloud.google.com/persistent-disk/) | 16 |
|
||||
| [Microsoft Azure Disk Storage](https://azure.microsoft.com/en-us/services/storage/main-disks/) | 16 |
|
||||
|
||||
|
||||
|
||||
## 自定义限制
|
||||
|
||||
修改此限制值的步骤如下:
|
||||
* 设置环境变量 `KUBE_MAX_PD_VOLS` 的取值
|
||||
* 重启调度器 kube-scheduler
|
||||
|
||||
建议不要将此数值设置得比默认值更大。在修改之前,请认真查询云供应商的相关文档,确保您的节点机器可以支持您设置的限制取值。
|
||||
|
||||
该限定对整个集群生效,因此,将影响到集群中的所有节点。
|
||||
|
||||
## Dynamic volume限制
|
||||
|
||||
**FEATURE STATE:** `Kubernetes v1.12` <Badge type="warning">beta</Badge>
|
||||
|
||||
Kubernetes v1.11 开始支持按节点限制动态数据卷的数量(Dynamic volume limits),在Kubernetes v1.12 中,该特性进入 beta 阶段,并默认启用。
|
||||
|
||||
动态数据卷数量限定(Dynamic volume limits)支持如下类型的数据卷:
|
||||
* Amazon EBS
|
||||
* Google Persistent Disk
|
||||
* Azure Disk
|
||||
* CSI
|
||||
|
||||
当动态数据卷数量限定(Dynamic volume limits)特性激活时,Kubernetes 自动根据节点的类型为其设置合适的可挂载数据卷的最大数量。例如:
|
||||
- 在 [Google Compute Engine](https://cloud.google.com/compute/) 上,[根据节点类型](https://cloud.google.com/compute/docs/disks/#pdnumberlimits),一个节点最多可以挂载 128 个数据卷
|
||||
- 针对 Amazon 部分实例类型(M5、C5、R5、T3、Z1D)上的 EBS 磁盘,Kubernetes 只允许为每个节点最多挂载 25 个数据卷。针对其他类型的节点 [Amazon Elastic Compute Cloud (EC2)](https://aws.amazon.com/ec2/), Kubernetes 允许为每个节点最多挂载 39 个数据卷
|
||||
- 在微软 Azure 上,根据节点类型不同,单个节点最多可以挂载 64 个磁盘。更多细节请参考[Sizes for virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes)
|
||||
- 针对 CSI,任何通过 CSI 规范定义数据卷挂载数量限制的驱动程序,都会将该数量限定作为节点的一个可收集的参数;Kubernetes 调度器可以读取此节点参数,且当节点已经达到最大可挂载数据卷数量时,不会再向该节点调度 Pod。更多细节请参考 [CSI specs](https://github.com/container-storage-interface/spec/blob/master/spec.md#nodegetinfo)
|
||||
@ -124,6 +124,8 @@ spec:
|
||||
|
||||
## 实战:通过 Ingress 使您的应用程序在互联网可用
|
||||
|
||||
<SharingBlock>
|
||||
|
||||
::: warning 前提
|
||||
* 假设您已经完成了 [公布应用程序](/learning/k8s-basics/expose.html) 中的实战部分
|
||||
* 假设您已经将 Ingress 融入到您的网络拓扑中,并且将 `*.demo.kuboard.cn` (请使用您自己的域名)解析到对应的外网 IP 地址
|
||||
@ -272,3 +274,6 @@ Kuboard 工作负载编辑器将 kubernetes 中三个主要对象 Deployment/Ser
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</SharingBlock>
|
||||
|
||||
@ -112,6 +112,8 @@ meta:
|
||||
|
||||
## 查看部署结果
|
||||
|
||||
<SharingBlock>
|
||||
|
||||
按照上面的部署方式,有如下两种方式可以从浏览器访问 eureka-server 的界面:
|
||||
|
||||
* 使用域名: [http://cloud-eureka.ocp.demo.kuboard.cn/](http://cloud-eureka.ocp.demo.kuboard.cn/)
|
||||
@ -122,3 +124,5 @@ meta:
|
||||
eureka-server 界面如下图所示:
|
||||
|
||||

|
||||
|
||||
</SharingBlock>
|
||||
|
||||
Reference in New Issue
Block a user