apiVersion: v1 kind: Service metadata: name: cloud-yysj-driver-info labels: app: cloud-yysj-driver-info svcEndpoints: actuator spec: type: NodePort ports: - name: server port: 8080 targetPort: 8080 - name: management port: 8081 targetPort: 8081 selector: app: cloud-yysj-driver-info --- apiVersion: apps/v1 kind: Deployment metadata: name: cloud-yysj-driver-info labels: app: cloud-yysj-driver-info spec: replicas: 1 selector: matchLabels: app: cloud-yysj-driver-info template: metadata: name: cloud-yysj-driver-info labels: app: cloud-yysj-driver-info spec: restartPolicy: Always containers: - name: service-provider image: hub.i139.cn/cloud-yysj/cloud-yysj-driver-info:1.0.0 imagePullPolicy: IfNotPresent ports: - name: server containerPort: 8080 - name: management containerPort: 8081 env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: JAVA_OPTS value: "" - name: APP_OPTS value: "" resources: limits: memory: 1000Mi cpu: 2000m requests: memory: 256Mi cpu: 1000m readinessProbe: initialDelaySeconds: 20 periodSeconds: 5 timeoutSeconds: 10 failureThreshold: 5 httpGet: path: /actuator/health port: 8081 livenessProbe: initialDelaySeconds: 60 periodSeconds: 5 timeoutSeconds: 5 failureThreshold: 3 httpGet: path: /actuator/health port: 8081