Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.47 KB | None | 0 0
  1. ---
  2. apiVersion: apps/v1beta1
  3. kind: Deployment
  4. metadata:
  5.   name: pez8
  6. spec:
  7.   replicas: 2
  8.   strategy:
  9.     type: RollingUpdate
  10.     rollingUpdate:
  11.       maxSurge: 1
  12.       maxUnavailable: 50%
  13.   template:
  14.     metadata:
  15.       labels:
  16.         app: pez8
  17.     spec:
  18.       terminationGracePeriodSeconds: 0
  19.       dnsPolicy: "None"
  20.       dnsConfig:
  21.         nameservers:
  22.          - 8.8.8.8
  23.           - 8.8.4.4
  24.       containers:
  25.         - name: pez8
  26.           imagePullPolicy: Always
  27.           image: 294954198282.dkr.ecr.eu-west-1.amazonaws.com/pez8:latest
  28.           ports:
  29.             - containerPort: 3000
  30.           readinessProbe:
  31.             httpGet:
  32.               path: /
  33.               port: 3000
  34.             initialDelaySeconds: 5
  35.             periodSeconds: 5
  36.             successThreshold: 1
  37. ---
  38. apiVersion: batch/v1beta1
  39. kind: CronJob
  40. metadata:
  41.   name: pez8c
  42. spec:
  43.   schedule: "0 */6 * * *"
  44.   jobTemplate:
  45.     spec:
  46.       template:
  47.         spec:
  48.           containers:
  49.             - name: pez8c
  50.               image: appropriate/curl:latest
  51.               args:
  52.                - /bin/sh
  53.                 - -fs
  54.                 - http://a93c468ea09f511eaa7b306c534ea3a3-2141762307.eu-west-1.elb.amazonaws.com/?refresh=true
  55.           restartPolicy: OnFailure
  56. ---
  57. kind: Service
  58. metadata:
  59.   name: pez8
  60. apiVersion: v1
  61. spec:
  62.   type: LoadBalancer
  63.   selector:
  64.     app: pez8
  65.   ports:
  66.     - name: http
  67.       protocol: TCP
  68.       port: 80
  69.       targetPort: 3000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement