apiVersion: apps/v1 #  for k8s versions before 1.9.0 use apps/v1beta2  and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
  name: sugarcrmstack79-mysql-server
spec:
  selector:
    matchLabels:
      app: sugarcrmstack79-mysql
      tier: backend
  replicas: 1
  template:
    metadata:
      labels:
        app: sugarcrmstack79-mysql
        tier: backend
    spec:
      containers:
      - name: mysql-server
        image: mysql:5.7
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: "password"
        ports:
        - containerPort: 3306
        volumeMounts:
            - name: sugarcrmstack79-mysql-storage
              mountPath: /var/lib/mysql
      volumes:
        - name: sugarcrmstack79-mysql-storage
          emptyDir: {}


