google-compute-engine,kubernetes"/>
  • 14
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I've been looking into using Kubernetes on Google Compute Engine. I have pods with configuration that needs to be deployed to them. Currently, I'm using a persistent disk to do this. However, as a persistent disk cannot be mounted more than once it cannot be used to deploy configuration if I use more than 1 pod.

What is the best way to do this? ConfigMaps won't work as I need to deploy a directory structure as configuration. The only solution I can see is rebuilding my docker container every time I need to change my config. Is that really the best way?

Kubernetes supports several types of volumes that are appropriate for different applications. As jwadsack suggested in his comment you can use a gcePersistentDisk volume which can be mounted as read-only by multiple consumers simultaneously. NFS (nfs volume) can also be mounted and used by multiple writers simultaneously.

  • 1
Reply Report

ConfigMaps allow mapping from files and directories. The main doc provides info. You likely need only very little adaptation to what you are used to from static files. Also ConfigMaps are definitely the only way to go, since binding volumes for everything but data defeats the purposes of Kubernetes a little, imo.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags