Skip to content

mingfang/flexvolume-ebs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flexvolume-ebs

FlexVolume Plugin For AWS EBS

Features

  • Target EBS volumes to be mounted on a specified AZ
  • Auto detect attachment and mount devices
  • Works with new NVME EC2 instance types(C5, M5, T3, etc)
  • Supports XFS filesystem
  • Auto resize at mount time using xfs_grow

Requirements

Kubernetes Master

  • kube-controller-manager --flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins
  • IAM Role and IAM Role Policy
  • Set REGION env variable, e.g. export REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq -c -r .region)

Kubernetes Nodes

  • kubelet --volume-plugin-dir=/var/lib/kubelet/volumeplugins
  • kubelet --node-labels=failure-domain.beta.kubernetes.io/zone=$AZ

EBS Volumes

  • Must have Name tag, e.g. Name="volume1"

Persistent Volumes

  • Name PV to be the same as the EBS name tag, e.g. name: volume1
  • Label the target AZ, e.g. failure-domain.beta.kubernetes.io/zone: us-west-2a
  • Add flexvolume configuration
  • Note the storage capacity value is needed for validation but is not used at runtime
  • Sample PV

Persistent Volume Claim

  • Set volume name to be same as the PV name
  • Note the storage capacity value is needed for validation but is not used at runtime
  • Sample PVC

Installation

Deployment using DaemonSet

flexvolume-es-daemonset.yml

About

Kubernetes FlexVolume Plugin For AWS EBS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published