# [[Benefits of k8s]] Why use [[Kubernetes]]? ## For deployment - k8s acts as a load balancer for pods in a cluster - It allows the addition and sharing of resources (such as storage) - It takes [[Infrastructure as code|programmatic instructions]] for how to build or rebuild an application from scratch, or how and when to scale up/down - k8s does automated bin packing, which lets you designate nodes to be used and containers that require resources and then have k8s automatically assign containers to nodes and spin them up - k8s is self-healing: it can react to outages by recreating failed components. - It enables secret and configuration management for the cluster - k8s allows horizontal infrastructure [[Scalability|scaling]] and [[Autoscaling]] [^hackernoon] - Automated rollbacks - Kubernetes can update components automatically or roll back to the last versions if things don't go well. ## For testing - k8s allows testers to create their own testing environments easily, and sending developers the exact [[Creating Kubernetes manifests|manifests]] used can solve the "It's working fine on my machine" problem. Also see [[Testing Kubernetes]]. [^hackernoon]: ul Haq, F. (2019). _Why (and when) you should use Kubernetes_. Hacker Noon. Retrieved from https://hackernoon.com/why-and-when-you-should-use-kubernetes-8b50915d97d8