简体   繁体   English

如何与kubernetes集群共享我的Google云实例的数量

[英]How to share volume of my google cloud instance with the kubernetes cluster

I am working on a design where I will have my git repository located at one of the google cloud instance. 我正在进行一项设计,我将把我的git存储库放在google云实例之一。 I am trying to run my tests in parallel using kubernetes cluster. 我正在尝试使用kubernetes集群并行运行我的测试。 However I am not able to share the Standard persistent disk(which is having the github repository) that is configured to my instance with the kubernetes cluster. 但是,我无法共享使用kubernetes集群配置到我的实例的标准持久性磁盘(具有github存储库)。 I need my containers to work on the repository that is located in the instance and don't want to create copies of it in cluster instances. 我需要我的容器在位于实例中的存储库上工作,并且不希望在集群实例中创建它的副本。

I have achieved the same thing using docker on a vm but now I would like to put everything on the cloud and run it in a containerised environment. 我在vm上使用docker实现了同样的功能,但现在我想将所有内容放在云上并在容器化环境中运行。

You need to create a persistant volume and then mount that pv to the kubernetes pod. 您需要创建一个持久卷,然后将该pv安装到kubernetes pod。

You should note that this will be read only as you cant attach multiple containers to write to a persistent disk - if you want RW then you will need to use NFS/Gluster or more sensibly GCR. 您应该注意,只有当您无法连接多个容器以写入永久磁盘时才会读取此内容 - 如果您需要RW,则需要使用NFS / Gluster或更明智的GCR。

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

相关问题 如何使用 Cloud Build 和 Skaffold 构建 kubernetes 集群并将其部署到 Google Cloud? - How to build and deploy kubernetes cluster to Google Cloud using Cloud Build and Skaffold? Google Kubernetes Engine:未在实例中看到挂载持久卷 - Google Kubernetes Engine: Not seeing mount persistent volume in the instance 如何在Kubernetes中直接挂载外部NFS共享/卷(1.10.3) - How to directly mount external NFS share/volume in kubernetes(1.10.3) Kube.netes - 如何引用文件共享以挂载卷? - Kubernetes - how to reference file share in order to mount volume? 使用PostgreSQL将Django应用程序部署到Kubernetes Google Cloud集群 - Deploying Django Application with PostgreSQL to Kubernetes Google Cloud cluster 如何在 azure 云服务上通过 kubernetes 检查持久卷的内容 - how to inspect the content of persistent volume by kubernetes on azure cloud service 如何在Google Container Engine / Kubernetes上扩展我的群集? - How do I scale up my cluster on Google Container Engine / Kubernetes? 如何在我的kubernetes集群之外访问mysql? - How to access mysql outside my kubernetes cluster? 在Kubernetes的工作节点之间共享存储/卷? - Share storage/volume between worker nodes in Kubernetes? kubernetes php nginx 部署共享卷 - kubernetes php nginx deployment share volume
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM