Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: <your-name>-deployment
- spec:
- selector:
- matchLabels:
- app: <your-name>-app
- replicas: 2 # tells deployment to run 2 pods matching the template
- template:
- metadata:
- labels:
- app: <your-name>-app
- spec:
- containers:
- - name: <your-name>-container
- image: lovescloud/rildemo:default
- args :
- - /bin/sh
- - -c
- - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
- livenessProbe:
- exec:
- command:
- - cat
- - /tmp/healthy
- initialDelaySeconds: 5
- periodSeconds: 5
- failureThreshold: 1
- readinessProbe:
- exec:
- command:
- - cat
- - /tmp/healthy
- ports:
- - containerPort: 80
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: <your-name>-service
- namespace: default
- spec:
- ports:
- - port: 80
- protocol: TCP
- targetPort: 80
- selector:
- app: <your-name>-app
- type: NodePort
Add Comment
Please, Sign In to add comment