Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda