-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9401104
commit d5313aa
Showing
28 changed files
with
275 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
source/kubernetes/concepts/storage/k8s_dynamic_volume_provisioning.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _k8s_dynamic_volume_provisioning: | ||
|
||
=================================================== | ||
Kubernetes动态卷制备(Dynamic Volume Provisioning) | ||
=================================================== | ||
|
||
开源动态卷制备: :ref:`openebs` | ||
================================== | ||
|
||
在 :ref:`k8s_csi` 有多种实现规范(SPEC),例如 :ref:`ceph-csi` | ||
|
||
参考 | ||
======= | ||
|
||
- `Kubernetes Documentation>Concepts>Storage>Dynamic Volume Provisioning <https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/>`_ 对应中文版文档: `Kubernetes 文档>概念>存储>动态卷制备 <https://kubernetes.io/zh-cn/docs/concepts/storage/dynamic-provisioning/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _debug_k8s_node_notready: | ||
|
||
============================= | ||
排查Kubernetes节点NotReady | ||
============================= | ||
|
||
参考 | ||
====== | ||
|
||
- `How to Fix Kubernetes ‘Node Not Ready’ Error <https://komodor.com/learn/how-to-fix-kubernetes-node-not-ready-error/>`_ | ||
- `Debugging your Kubernetes nodes in the ‘not ready’ state <https://www.airplane.dev/blog/debugging-kubernetes-nodes-in-not-ready-state>`_ | ||
- `How to debug when Kubernetes nodes are in 'Not Ready' state <https://stackoverflow.com/questions/47107117/how-to-debug-when-kubernetes-nodes-are-in-not-ready-state>`_ | ||
- `How to Fix the Kubernetes Node NotReady Error <https://linuxhint.com/fix-kubernetes-node-not-ready-error/>`_ | ||
- `K8s Troubleshooting — Node NotReady <https://medium.com/geekculture/k8s-troubleshooting-node-notready-8b39a026696e>`_ | ||
- `Kubernetes: Node ‘NotReady’ [SOLVED] <https://www.shellhacks.com/kubernetes-node-notready/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _admission_plugins: | ||
|
||
========================== | ||
Admission 插件 | ||
========================== | ||
|
||
检查默认启用的admission plugins | ||
================================== | ||
|
||
- ``kube-apiserver`` 提供了查询哪些插件是默认启用: | ||
|
||
.. literalinclude:: admission_plugins/apiserver_default_admission_plugins | ||
:caption: 检查默认启用的Admission Plugins | ||
|
||
不过,需要注意的是,默认通过 :ref:`kubespray` 部署的 ``kube-apiserver`` 容器内部没有提供任何 ``sh`` 命令,所以我参考 `How to access kube-apiserver on command line? <https://stackoverflow.com/questions/56542351/how-to-access-kube-apiserver-on-command-line>`_ 想要登陆到容器内部并没有成功。不过,还是可以通过以下命令观察: | ||
|
||
.. literalinclude:: admission_plugins/kubectl_apiserver_default_admission_plugins | ||
:caption: 通过 ``kubectl`` 运行pod内部的 ``kube-apiserver`` 检查默认启用的Admission Plugins | ||
|
||
输出类似(注意:输出实际是一行,我这里为了方便查看做了多行格式化) | ||
|
||
.. literalinclude:: admission_plugins/kubectl_apiserver_default_admission_plugins_output | ||
:caption: 通过 ``kubectl`` 运行pod内部的 ``kube-apiserver`` 检查默认启用的Admission Plugins 输出 | ||
|
||
.. _admission_plugins_DefaultStorageClass: | ||
|
||
Admission Plugin ``DefaultStorageClass`` | ||
------------------------------------------- | ||
|
||
Admission Plugin ``DefaultStorageClass`` 为 **没有请求任何特定存储类** 的 ``PersistentVolumeClaim`` (PVC) 对象的创建请求,自动添加默认存储类。这样用户无需关心存储类型(很多用户也不care),就可以自动完成配置。 | ||
|
||
注意,当没有配置默认存储类是,这个Adminssion Controller不执行任何操作。而且,如果有多个存储类被标记为默认存储类,也会导致该控制器拒绝所有创建 PVC 的请求并返回错误。 | ||
|
||
参考 | ||
========= | ||
|
||
- `Using Admission Controllers <https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers>`_ |
1 change: 1 addition & 0 deletions
1
source/kubernetes/security/admission_plugins/apiserver_default_admission_plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kube-apiserver -h | grep enable-admission-plugins |
1 change: 1 addition & 0 deletions
1
source/kubernetes/security/admission_plugins/kubectl_apiserver_default_admission_plugins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kubectl exec -it kube-apiserver-y-k8s-m-1 -n kube-system -- kube-apiserver -h | grep enable-admission-plugins |
14 changes: 14 additions & 0 deletions
14
.../kubernetes/security/admission_plugins/kubectl_apiserver_default_admission_plugins_output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
... | ||
--enable-admission-plugins strings admission plugins that should be enabled in addition to default enabled ones | ||
(NamespaceLifecycle, LimitRanger, ServiceAccount, TaintNodesByCondition, PodSecurity, Priority, DefaultTolerationSeconds, DefaultStorageClass, | ||
StorageObjectInUseProtection, PersistentVolumeClaimResize, RuntimeClass, CertificateApproval, CertificateSigning, CertificateSubjectRestriction, | ||
|
||
DefaultIngressClass, MutatingAdmissionWebhook, ValidatingAdmissionPolicy, ValidatingAdmissionWebhook, ResourceQuota). | ||
Comma-delimited list of admission plugins: AlwaysAdmit, AlwaysDeny, AlwaysPullImages, CertificateApproval, CertificateSigning, | ||
CertificateSubjectRestriction, DefaultIngressClass, DefaultStorageClass, DefaultTolerationSeconds, DenyServiceExternalIPs, EventRateLimit, | ||
ExtendedResourceToleration, ImagePolicyWebhook, LimitPodHardAntiAffinityTopology, LimitRanger, MutatingAdmissionWebhook, NamespaceAutoProvision, | ||
NamespaceExists, NamespaceLifecycle, NodeRestriction, OwnerReferencesPermissionEnforcement, PersistentVolumeClaimResize, PersistentVolumeLabel, | ||
PodNodeSelector, PodSecurity, PodTolerationRestriction, Priority, ResourceQuota, RuntimeClass, SecurityContextDeny, ServiceAccount, | ||
StorageObjectInUseProtection, TaintNodesByCondition, ValidatingAdmissionPolicy, ValidatingAdmissionWebhook. | ||
|
||
The order of plugins in this flag does not matter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. _ceph-csi: | ||
|
||
============================================================ | ||
Ceph CSI | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _k8s_csi: | ||
|
||
============================================================ | ||
Kubernetes 容器存储接口(Container Storage Interface, CSI) | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
k8s_csi_arch.rst | ||
ceph-csi/index | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _k8s_csi_arch: | ||
|
||
======================= | ||
Kubernetes CSI架构 | ||
======================= | ||
|
||
参考 | ||
======= | ||
|
||
- `Kubernetes CSI Specification <https://cctoctofx.netlify.app/post/cloud-computing/k8s-csi-interprete/>`_ 这篇文章较为全面清晰,提供了不少索引信息,可以作为学习起点 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. _cstor_arch: | ||
|
||
================ | ||
cStor 架构 | ||
================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. _cstor: | ||
|
||
============================================================ | ||
cStor | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
cstor_arch.rst | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. _openebs: | ||
|
||
============================================================ | ||
OpenEBS 基于容器的块存储(Container Attached Storage) | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
openebs_arch.rst | ||
localpv/index | ||
cstor/index | ||
mayastor/index | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. _localpv: | ||
|
||
============================================================ | ||
LocalPV | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
localpv_arch.rst | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. _localpv_arch: | ||
|
||
====================== | ||
LocalPV 架构 | ||
====================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.. _mayastor: | ||
|
||
============================================================ | ||
Mayastor | ||
============================================================ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
mayastor_arch.rst | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
10 changes: 10 additions & 0 deletions
10
source/kubernetes/storage/openebs/mayastor/mayastor_arch.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _mayastor_arch: | ||
|
||
====================== | ||
Mayastor架构 | ||
====================== | ||
|
||
参考 | ||
===== | ||
|
||
- `Mayastor User Reference: Basic Architecture <https://mayastor.gitbook.io/introduction/basic-architecture>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. _openebs_arch: | ||
|
||
============================= | ||
OpenEBS架构 | ||
============================= | ||
|
||
**OpenEBS** 又称为 ``Container Attached Storage`` (基于容器的块存储): | ||
|
||
- OpenEBS遵循微服务架构,本身作为一组容器部署在Kubernetes工作节点上,使用Kubernetes编排管理OpenEBS组件 | ||
- 完全构建于用户空间 | ||
- OpenEBS支持一系列存储引擎(storage driver),通常使用案例: | ||
|
||
- Cassandra 这样的分布式应用程序可以使用 :ref:`localpv` 引擎实现低延迟写 | ||
- :ref:`mysql` 和 :ref:`pgsql` 可以使用 :ref:`zfs` 引擎( :ref:`cstor` )进行恢复 | ||
- :ref:`kafka` 这样的流媒体应用程序可以使用 :ref:`nvme` 引擎 :ref:`mayastor` (OpenEBS开发的NVMe-oF存储) | ||
|
||
参考 | ||
======= | ||
|
||
- `OpenEBS中文版 README.md <https://github.com/openebs/openebs/blob/main/translations/README.zh.md>`_ | ||
- `OpenEBS动态创建存储 <https://blog.51cto.com/liqingbiao/6051543>`_ 非常详尽的产品介绍,应该是官方文档的clone,我感觉需要多阅读几遍,并结合其包容的技术(例如 :ref:`zfs` :ref:`longhorn` 等)进行思考才能理解这个技术指南 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
source/linux/storage/zfs/admin/zfs_startup_zcloud/zfs_create_volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# 采用一条命令创建挂载好目录的ZFS卷,这个目录卷用于 y-k8s | ||
zfs create zpool-data/y-k8s | ||
# 如果要挂载到其他可选目录,例如可以增加 -o mountpoint=/y-k8s | ||
|
||
# 为 y-k8s Kubernetes集群的不同用途pv创建子卷,例如这里为 install_kubeflow_single_command 提供PV | ||
zfs create zpool-data/y-k8s/authservice-pvc |
2 changes: 2 additions & 0 deletions
2
source/linux/storage/zfs/admin/zfs_startup_zcloud/zpool_create
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
zpool create zpool-data sda | ||
# 设置了从zpool的根开始激活压缩 | ||
zfs set compression=lz4 zpool-data |