A brief introduction to Kubernetes.
What is it?
Kubernetes is an open source orchestrator for deploying containerized applications.
Why use it?
- velocity: i.e. deploying software
- scaling: software and teams
- abstracting infrastructure: i.e. can deploy containers on EKS or AKS
- Immutable infrastructure means you build a new image and replace your old images. This makes it easy to roll back to previous images
- Declarative Configuration: i.e. you define state rather than (via imperative commands) actions
- Self-Healing: K8s continually monitors and updates state. E.g. if you create 3 replicas it creates them and continually monitors to make sure they’re still up. Or if you destroy one it will bring up another.
- Decoupling: each component is separated from other components by defined APIs and service load balancers
- Easy scaling: just change a number in the configuration file. Or set up autoscaling
- Scaling development teams with microservices
- pods can group container images from different teams into a single unit
- K8s provides load balancing, naming and discovery to isolate microservices
- Namespaces provide isolation and access control
- Ingress objects provide easy-to-use frontend to combine multiple microservices into a single API surface area
- Separation of Concerns for Consistency and Scaling
All cloud operators support Kubernetes. And PersistentVolumes and PersistentVolumeClaims abstract away the storage implementations.
Using pods you can aggregate them over instances meaning fewer machines.
What, typically, might you do:
- Deploy an app
- Expose it publicly via a Service
- Scale by running the number of replicas in a Deployment