erro de Indentação corrigido usando programa yamllint:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: statefulset-mysql
spec:
selector:
matchLabels:
name: mysql
serviceName: db
template:
metadata:
labels:
name: mysql
spec:
containers:
- name: container-mysql
image: mysql:5.7.19
ports:
- containerPort: 3306
env:
- name: MYSQL_DATABASE
value: "loja"
- name: MYSQL_USER
value: "root"
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "1"
volumeMounts:
- name: volume-mysql
mountPath: /var/lib/mysql
volumes:
- name: volume-mysql
persistentVolumeClaim:
claimName: configuracao-mysql
apiVersion: v1
kind: Service
metadata:
name: db
spec:
type: ClusterIP
ports:
- port: 3306
selector:
name: mysql
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: configuracao-mysql
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi