Reputation: 2403
I started to use Docker and I'm trying out Google's Kubernetes project for my container orchestration. It looks really good!
The only thing I'm curious of is how I would handle the volume storage.
I'm using EC2 instances and the containers do volume from the EC2 filesystem.
The only thing left is the way I have to deploy my application code into all those EC2 instances, right? How can I handle this?
Upvotes: 1
Views: 209
Reputation: 15
The Kubernetes Container Storage Interface (CSI) project is reaching maturity and includes a volume driver for AWS EBS that allows you to attach EBS volumes to your containers.
The setup is relatively advanced, but does work smoothly once implemented. The advantage of using EBS rather than local storage is that the EBS storage is persistent and independent of the lifetime of the EC2 instance.
In addition, the CSI plugin takes care of the disk creation -> mounting -> unmounting -> deletion lifecycle for you.
The EBS CSI driver has a simple example that could get you started quickly
Upvotes: 1
Reputation: 13397
It's somewhat unclear what you're asking, but a good place to start would be reading about your options for volumes
in Kubernetes.
The options include using local EC2 disk with a lifetime tied to the lifetime of your pod (emptyDir
), local EC2 disk with lifetime tied to the lifetime of the node VM (hostDir
), and an Elastic Block Store volume (awsElasticBlockStore
).
Upvotes: 2