---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: db
spec:
  replicas: 1
  selector:
    matchLabels:
      app: db
  template:
    metadata:
      labels:
        app: db
    spec:
      containers:
      - name: mysql
        image: mysql:5
        env:
        - name: MYSQL_RANDOM_ROOT_PASSWORD
          value: "yes"
        ports:
        - containerPort: 3306
