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

176
Views
How to delete a kubernetes cluster using kops without deleting EBS persistent volume that I used for my database?

When I tried to delete a kubernetes cluster running in AWS, it removed all the associated resources like loadbalancers of my application, autoscaling groups, EC2 instances and its EBS volumes as expected. However, it also removed EBS volume that I used as a persistent volume. Luckily, I had a snapshot to create an EBS volume out of it. How to avoid this in future when I want to delete my cluster without disturbing EBS volume that I used for my database?

I followed the steps below for deleting my cluster.

  1. Kubectl delete -f my-applicaton.yml (to terminate all the services&deployments including database pod)
  2. Changed reclaim policy of persistent volume from DELETE to RETAIN
  3. kubectl delete pvc db-pvc (deleted persistent volume claim)
  4. kubectl delete pv db-pv (deleted persistent volume)
  5. kops delete cluster --name ${NAME} --yes
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

To prevent kOps from deleting the EBS(Elastic Block Store) volume you need to remove all the tags on the EBS volume. Then you can add this to your PV in your new cluster in order to reuse it:

awsElasticBlockStore:
  volumeID: <vol-123>
  fsType: ext4
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!