Centralized & versioned file based system for a web application deployed in Kubernetes

1/11/2021

I am trying to create an Centralized file based repository where I can upload all the configuration files needed for an application to run which is deployed as a pod inside the Kubernetes. Any suggestion on achieving this functionality ? Can the file based repository version the files uploaded ?

I see that s3fs-fuse can be used to achieve this, but i lack to see that, it wont support versioning the added config files in the S3 bucket. https://github.com/s3fs-fuse/s3fs-fuse

Any other suggestion ?

-- babs84
amazon-s3
amazon-web-services
kubernetes
kubernetes-pod
s3fs

2 Answers

1/13/2021

Why not use git?

The following article contains an example which runs a git clone within an initContainer:

https://blog.frankel.ch/versatility-kubernetes-initcontainer/

-- Mark O'Connor
Source: StackOverflow

1/11/2021

You could use elastic file system which is supported by EKS:

Applications running in Kubernetes can use EFS file systems to share data between pods in a scale-out group, or with other applications running within or outside of Kubernetes. EFS can also help Kubernetes applications be highly available because all data written to EFS is written to multiple AWS Availability zones. If a Kubernetes pod is terminated and relaunched, the CSI driver will reconnect the EFS file system, even if the pod is relaunched in a different AWS Availability Zone.

But its not S3 and it does not have versioning of files such as S3 has. You would have to add such functionality yourself, e.g. by keeping everything in a git repository on the EFS file system.

-- Marcin
Source: StackOverflow