Google Kubernetes storage in EC2

8/16/2015

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?

-- guidsen
amazon-ec2
deployment
devops
docker
kubernetes

2 Answers

8/17/2015

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).

-- Alex Robinson
Source: StackOverflow

11/30/2018

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

-- Pierre
Source: StackOverflow