DevOps
How do I deploy?
Merge
Into
Master
Containers
application
+
dependencies
Stateless
Immutable
Create and destroy them to arbitrarily
Handy for: testing, deploying and rolling back
Kubernetes
What does it provide?
- Replication
- Load balancing
- Logging
- Monitoring ( application and resources )
- Autoscaling
- Service discovery/networking
- Declarative configuration ( reproducible infrastructure )
- Resource quotas
- Mounting storage systems (also ceph, glusterfs,..)
- Secrets
- Rolling updates
Pod
Smallest unit
usually a single container
knows how to start itself
created and destroyed
has an IP
Pods are mortal
and their IP's cannot be relied upon to be stable over time
Enter Services
Service
a set of Pods
a policy on how to access them
Example
image processing backend
6 replicas
whatever uses it doesn't care about:
which instance it uses
how many instances there are
which instances are available
It just wants to resize
a damn image
Deployments
I want to roll out 6 replicas of the image processing backend
I now want 12, thanks
I want to roll out a new version
Oops a regression, roll back please
Deployments
ensure N pods are always running
declarative updates
Kompose
generate kubernetes config from docker-compose.yml
Our workflow
2. if master, push image and then deploy
kubectl set image deploy/uplink uplink=eu.gcr.io/uplink-test-cluster-174313/uplink:$CIRCLE_SHA1
gcloud docker -- push eu.gcr.io/uplink-test-cluster-174313/uplink:$CIRCLE_SHA1
1. Build
DEV
By ..
DEV
- 1,844