简体   繁体   English

如何在 azure (AKS) 中的 Kube.netes 集群中附加磁盘

[英]How to attach a disk in Kubernetes cluster in azure (AKS)

I have deployed my running application in AKS.我已经在 AKS 中部署了正在运行的应用程序。 I want to add new disk (Harddisk of 30GB) but I don't know how to do it.我想添加新磁盘(30GB 的硬盘),但我不知道该怎么做。

I want to attach 3 disks.我想附加 3 个磁盘。

Here is details of AKS:这是AKS的详细信息:

  • Node size: Standard_DS2_v2节点大小: Standard_DS2_v2
  • Node pools: 1 node pool节点池: 1 node pool
  • Storage is:存储是:

default (default)   kubernetes.io/azure-disk   Delete          WaitForFirstConsumer   true

Please, tell me how to add it.请告诉我如何添加它。

Based on Kube.netes documentation :基于Kube.netes 文档

A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes . PersistentVolume (PV) 是集群中的一块存储,已由管理员配置或使用存储类动态配置。

It is a resource in the cluster just like a node is a cluster resource.它是集群中的资源,就像节点是集群资源一样。 PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV. PV 是类似于 Volumes 的卷插件,但其生命周期独立于使用 PV 的任何单个 Pod。

In the Azure documentation one can find clear guides how to:Azure 文档中,可以找到明确的指南:

NOTE : Before you begin you should have existing AKS cluster and Azure CLI version 2.0.59 or later installed and configured.注意:在开始之前,你应该 安装并配置现有的 AKS 群集和 Azure CLI 版本 2.0.59 或更高版本。 To check your version run:要检查您的版本运行:

az --version

See also this documentation .另请参阅此文档

A persistent volume represents a piece of storage that has been provisioned for use with Kube.netes pods.持久卷表示已配置用于 Kube.netes pod 的一块存储。 A persistent volume can be used by one or many pods, and can be dynamically or statically provisioned .一个持久卷可以被一个或多个 pod 使用,并且可以动态或静态配置

This article shows you how to dynamically create persistent volumes with Azure disks for use by a single pod in an Azure Kube.netes Service (AKS) cluster. 本文介绍如何使用 Azure 磁盘动态创建持久卷,供 Azure Kube.netes 服务 (AKS) 集群中的单个 pod 使用


But if your requirement is to share the persistent volume across the multiple nodes use Azure FileShare但是,如果您的要求是跨多个节点共享持久卷,请使用Azure FileShare

This article shows you how to dynamically create an Azure Files share for use by multiple pods in an Azure Kube.netes Service (AKS) cluster.本文介绍如何动态创建 Azure 文件共享以供 Azure Kube.netes 服务 (AKS) 集群中的多个 pod 使用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何更新 Azure Kube.netes 服务 (AKS) 的凭据 - how to update the credentials for Azure Kubernetes Service (AKS) 使用 Kube.netes Python 客户端为 Azure AKS 集群填充 pod CPU 限制 - Populate pods CPU limits using Kubernetes Python Client for Azure AKS cluster 如何使用 terraform 限制 kube.netes 集群上的磁盘使用 - How to limit disk usage on kubernetes cluster using terraform 如何在 helm 图表中检测 kube.netes 集群提供程序(eks、aks)? - How do I detect kubernetes cluster provider (eks, aks) in helm charts? Azure 专用链接到 AKS,专用终结点到另一个 AKS 群集 - Azure private link to AKS with private endpoint to another AKS cluster Azure Kube.netes 集群安全 - Azure Kubernetes Cluster Security Azure AKS - 如何为在不同可用性区域的节点上运行的 pod 在公共磁盘上安装卷? - Azure AKS - how to mount a volume on a common disk for pods running on nodes from different availability zones? 如何将文件从本地磁盘复制到 AKS VMSS(所有 Azure 虚拟机规模集) - How to copy a file from local disk to AKS VMSS (All Azure Virtual Machine Scale Sets) 如何在不丢失数据的情况下将外部磁盘附加到 Azure 中的 Windows VM? - How to attach external disk to Windows VM in Azure without losing data? Azure AKS:如何避免在集群创建期间在“默认”命名空间中创建资源 - Azure AKS: how to avoid resource creation in "default" namespace during cluster creation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM