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: imagePullSecrets: - name: registry-key containers: - command: [ "java","-cp","/*","com.sxtvs.open.OpenApplication","--spring.profiles.active=prod" ] 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: limits: cpu: 4000m memory: 8192Mi requests: cpu: 3000m memory: 7168Mi livenessProbe: httpGet: port: 80 path: /hello initialDelaySeconds: 3 periodSeconds: 3 readinessProbe: httpGet: port: 80 path: /hello initialDelaySeconds: 3 periodSeconds: 3 timeoutSeconds: 1 dnsPolicy: ClusterFirst terminationGracePeriodSeconds: 30