apiVersion: apps/v1 kind: Deployment metadata: name: pztjweb namespace: kube- spec: selector: matchLabels: app: pztjweb replicas: 1 template: metadata: labels: app: pztjweb spec: containers: - image: 10.2.1.24:10242/bpa/pztjweb: imagePullPolicy: IfNotPresent name: pztjweb env: - name: branch value: ports: - containerPort: 80 protocol: TCP volumeMounts: - mountPath: "/etc/localtime" name: timezone resources: requests: cpu: "100m" memory: "112Mi" limits: cpu: "500m" memory: "512Mi" volumes: - name: timezone hostPath: path: /usr/share/zoneinfo/Asia/Shanghai --- kind: Service apiVersion: v1 metadata: labels: app: pztjweb name: pztjweb namespace: kube- spec: type: ClusterIP ports: - port: 80 name: http selector: app: pztjweb