1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: open
- spec:
- minReadySeconds: 5
- replicas: 1
- selector:
- matchLabels:
- k8s-app: open
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxSurge: 1
- template:
- metadata:
- labels:
- k8s-app: open
- spec:
- containers:
- - command: [ "java","-jar","/app.jar" ]
- env:
- - name: PATH
- value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- - name: TZ
- value: Asia/Shanghai
- image: { { image } }
- imagePullPolicy: IfNotPresent
- name: open
- resources:
- requests:
- limits:
- cpu: 100m
- memory: 512Mi
- requests:
- cpu: 100m
- memory: 256Mi
- livenessProbe:
- httpGet:
- port: 80
- path: /hello
- initialDelaySeconds: 3
- periodSeconds: 30
- readinessProbe:
- httpGet:
- port: 80
- path: /hello
- initialDelaySeconds: 3
- periodSeconds: 5
- timeoutSeconds: 1
- dnsPolicy: ClusterFirst
- terminationGracePeriodSeconds: 30
|