Hi Guys,
I am trying to create one pod on minikube cluster. But it is showing me below error.
$ kubectl logs mysql
Error from server (BadRequest): container "mysql-con" in pod "mysql" is waiting to start: CreateContainerConfigError
I have used this below yml code to create mysql pod.
apiVersion: v1
kind: Pod
metadata:
name: mysql
labels:
name: mysql
spec:
containers:
- name: mysql-con
image: mysql:5.7
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: secret
key: rootpass
- name: MYSQL_USER
value: nadeem
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: secret
key: userpass
- name: MYSQL_DATABASE
value: database
volumeMounts:
- name: pvc-vol
mountPath: /var/lib/mysql
volumes:
- name: pvc-vol
persistentVolumeClaim:
claimName: pvc-volume
How can I solve this error?