Even though originally, we wanted no dependency on AWS, for our persistent storage of our Elasticsearch cluster, we will use dynamically provisioned AWS EBS volumes.
on the command line, this is set as --cloud-provider=aws
, but kubespray
also has an option in its all.yml
properties file, so you’ll need to set:
cloud_provider: aws
(note the _
vs -
in the different way the var is set).
Warning
|
Without this attribute, even if you have created the StorageClass (see below)
you will get "no volume plugin matched" errors
in the kube-controller-manager logs (took me a while to find out where
these logs are…)
|
This is enabled by adding a plugin for provisioning volumes. This
comes in the form of a StorageClass
.
Here is an example:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: ebs
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
zones: eu-west-1a, eu-west-1b, eu-west-1c