Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
Attaching external disk to aws cluster kubernetes

I have a cluster in AWS and have a deployment there. Now I want to attach an external AWS disk there. I am following the tutorial but didn't get how to indicate my disk there. Here is the code:

apiVersion: v1
kind: Pod
metadata:
  name: test-ebs
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-ebs
      name: test-volume
  volumes:
  - name: test-volume
    # This AWS EBS volume must already exist.
    awsElasticBlockStore:
      volumeID: "<volume id>"
      fsType: ext4

Seems to me that I should indicate my disk at volume. Where should I take volume id then? And how connect it to my cluster?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

volumeID: This is the AWS volume that will be used.

You can use the AWS CLI to get the volume ID assigned to your instance.

CLI command:

aws ec2 describe-volumes

see the doc for getting the volume ID with using describe-volumes

for ex:

apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: "pv0001" 
spec:
  capacity:
    storage: "5Gi" 
  accessModes:
    - "ReadWriteOnce"
  awsElasticBlockStore: 
    fsType: "ext4" 
    volumeID: "vol-f37a03aa" 
over 4 years ago · Santiago Trujillo Report

0

If the pod creation was successful with the volume attached (state of the ebs volume will change from "available" to "in-use" in AWS console), you could just do a kubectl describe pod and it should show up in Volumes with VolumeID similar to what you have in AWS:

ebs-volume-info

Hope this answers your question.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!