Start United States USA — software Silly Kubectl Trick #10: Cleaning Up After Yourself

Silly Kubectl Trick #10: Cleaning Up After Yourself

191
0
TEILEN

If there’s one thing that Kubernetes makes easy, it’s creating resources. Eventually, you’ll want to tear them down to free up CPU, disk, and RAM for your next wild experiment.
Join the DZone community and get the full member experience. If there’s one thing that Kubernetes makes easy, it’s creating resources – pods, deployments, volumes – before long you’ll have tons of them lying around. Eventually, you’ll want to tear some of them down, to free up CPU, disk, and RAM for your next wild experiment. This happens to us all the time in our research clusters, and we’ve picked up a few tricks: If you’ve been dutifully recording your resource definitions in a YAML file, and just kept kubectl apply -ing it, you’re in luck! The kubectl delete command also understands the -f flag, and will remove every resource defined.

Continue reading...