Last active
July 17, 2020 10:13
-
-
Save shotu/a1c055ffb8e49ac05b7e7be784a7a859 to your computer and use it in GitHub Desktop.
A simple express server deployment file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
| kind: Deployment # What kind of object you want to create | |
| metadata: | |
| name: simple-express-js-server | |
| spec: | |
| replicas: 1 # tells deployment to run 1 pods matching the template | |
| selector: | |
| matchLabels: | |
| app: simple-express-js-server | |
| template: # content from this line is pod spec , which image to use, lables for the pods , and the container info | |
| metadata: | |
| labels: | |
| app: simple-express-js-server | |
| spec: | |
| containers: | |
| - name: simple-express-js-server | |
| image: atri/simple-express-js-server:latest # image hosted on docker hub | |
| ports: | |
| - containerPort: 3000 | |
| imagePullPolicy: Always # always to pull the image while updates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment