Kubernetes (or k8s) allows you to effortlessly deploy containers to a group of servers, automatically choosing servers with sufficient computing resources and connecting required network and storage resources. It lets developers run containers and allocate resources without too much hassle. It’s an open-source version of Borg which was considered one of Google’s competitive advantages.
There are many features and reasons to use Kubernetes, but for me the following stood out and made me a happy user.
- It works on-premise and on most clouds like AWS, Google Cloud and Azure.
- Automatic image garbage collection makes sure you never run out of disk space on your cluster nodes because you push hundreds of versions a day.
Kubernetes has automatic image garbage collection built-in. So useful and considerate. kubernetes.io/docs/admin/gar…—
Amir Szekely (@virtuajack) June 01, 2016
- Scaling your container horizontally is as easy as:
kubectl scale deployment nginx-deployment --replicas=10
- Rolling over your container to a new version one by one is as easy as:
kubectl set image deployment/nginx-deployment nginx=nginx:1.91
- Easy to define health checks (liveness probes) automatically restart your container and readiness probes delay roll over update if the new version doesn’t work.
- Automatic service discovery using built-in DNS server. Just define service and reference it by name from any container in your cluster. You can even define a service as a load balancer which will automatically create ELB on AWS, Load Balancer on GCE, etc.
- Labels on everything can help organize resources. Services use label selectors to choose which containers get traffic directed at them. This allows, for example, to easily create blue/green deployments.
- Secrets make it easier to handle keys and configuration separately from code and containers.
- Resource monitoring is available out of the box and can be used for auto-scaling.
- Horizontal auto scaling can be based on resource monitoring or custom metrics.
- You can always use the API to create custom behaviors. For example, you can automatically create Route53 record sets based on a service label.
Is there anything I missed? What’s your favorite Kubernetes feature?