#yoyogodemo:v1_k8s-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: yoyogodemo
spec:
  selector:
    matchLabels:
      app: yoyogodemo
  replicas: 1 # tells deployment to run 2 pods matching the template
  template: # create pods using pod definition in this template
    metadata:
      labels:
        app: yoyogodemo
    spec:
      containers:
        - name: yoyogodemo
          image: maxzhang1985/yoyogo:version-1.4.6
          imagePullPolicy: Always #Always 总是拉取镜像 IfNotPresent 本地有则使用本地镜像,不拉取Never 只使用本地镜像，从不拉取，即使本地没有
          ports:
            - containerPort: 8080
          livenessProbe:
            httpGet:
              path: /info
              port: 8080
            initialDelaySeconds: 15
            timeoutSeconds: 1
          env:
            - name: PROFILE
              value: "test12"