Failed to connect Amazon Web Services (AWS) EBS Volume in Kubernetes pod

I created the volume using the following command.

aws ec2 create-volume --size 10 --region us-east-1 --availability-zone us-east-1c --volume-type gp2

Then I used the file below to create a module that uses the volume. But when I log in, I do not see the volume. Is there something I can do wrong? Did I miss something? Thanks for any ideas.

--- 
  kind: "Pod"
  apiVersion: "v1"
  metadata:
    name: "nginx"
    labels:
      name: "nginx"
  spec:
    containers:
      -   
    name: "nginx" 
    image: "nginx" 
    volumeMounts:
    - mountPath: /test-ebs
      name: test-volume
  volumes:
  - name: test-volume
    # This AWS EBS volume must already exist.
    awsElasticBlockStore:
      volumeID: aws://us-east-1c/vol-8499707e
      fsType: ext4
+4
source share
2 answers

, , node.

http://kubernetes.io/docs/user-guide/volumes/

, - kubectl describe pod nginx?

+1

Source: https://habr.com/ru/post/1607544/


All Articles