Deploying your first pod

To deploy our first pod, we will define a Kubernetes Deployment configuration file. This file will declare the deployment strategy (spec.strategy), how many pods we want to have at any given moment (spec.replicas), the volumes that will be provided to the pod (spec.template.spec.volumes), and the recipe that should be used to spin up the pod containers (spec.template.spec.containers):

$ cat deploy/elixir-drip-deployment-prod.ymlapiVersion: extensions/v1beta1kind: Deploymentmetadata:  name: elixir-drip  namespace: production  labels:    app: elixir-drip    env: productionspec:  replicas: 3  strategy:    type: RollingUpdate    rollingUpdate:      maxUnavailable: 1      maxSurge: 2  template:    metadata:      labels:        app: elixir-drip        env: production

Get Mastering Elixir 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.