<p>Just finished reading Nigel Poulton's <strong>The Kubernetes Book</strong>. I'm left with the question of whether or not a Deployment can specify multiple ReplicaSets.</p>

<p>When I think Deployment, I think of it in the traditional sense of an entire application being deployed. Or is there meant to be a Deployment for each microservice?</p>

<pre><code>apiVersion: apps/v1beta2
kind: Deployment
metadata: 
  name: hello-deploy
spec:
  replicas: 10
  selector:
    matchLabels:
      app: hello-world
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      containers:
      - name: hello-pod
        image: nigelpoulton/k8sbook : latest
        ports:
        - containerPort: 8080
</code></pre>

<p>It is meant to be a deployment of each microservice. </p>

<p>You can also manage the quantity of "deployed services" of each microservices type. 
So for instance, if you want to deploy Service A (Docker image with an Java service) 5 times, you have a deployment resulting 5 pods. Each pod contains the image of Service A.</p>

<p>If you deploy a new version of this Service A (Docker image with an Java service), Kubernetes is able to do a rolling update and manage the shut down of the old Java service type (the existing pods) and creates 5 new pods with the new Java Service A.2 (a new docker image).</p>

<p>Thus your whole microservices application/infrastructure is build upon multiple deployments. Each generating Kubernetes pods, which are published by Kubernetes services.</p>
