Deploying new releases

Just as we are not supposed to create Pods directly but using other controllers like ReplicaSet, we are not supposed to create ReplicaSets either. Kubernetes Deployments will create them for us. If you're wondering why, you'll have to wait a little while longer to find out. First, we'll create a few Deployments and, once we are familiar the process and the outcomes, it'll become obvious why they are better at managing ReplicaSets than we are.

Let's take a look at a Deployment specification for the database ReplicaSet we've been using thus far.

cat deploy/go-demo-2-db.yml  

The output is as follows:

apiVersion: apps/v1beta2
kind: Deployment
  name: go-demo-2-db
      type: db
 service: ...

Get The DevOps 2.3 Toolkit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.