Run following commands to deploy mysql in minikube
I am following below url
https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/#deploy-mysql
Full output of minikube start command used, if not already included:
Output of minikube commands are
ajoy@workspace:~$ kubectl apply -f https://k8s.io/examples/application/mysql/mysql-pv.yaml
persistentvolume/mysql-pv-volume created
persistentvolumeclaim/mysql-pv-claim created
ajoy@workspace:~$ kubectl apply -f https://k8s.io/examples/application/mysql/mysql-deployment.yaml
service/mysql created
deployment.apps/mysql created
But it failed to create MySQL deployment in minikube. and it is giving following error. i can see the error in pod log
2020-04-25 17:40:03+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.6.47-1debian9 started.
2020-04-25 17:40:03+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
command was: mysqld --verbose --help
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 13 - Permission denied)
Fatal error in defaults handling. Program aborted
hi @ajoysinhactc I am curious which driver and which version of minikube are u using?
@ajoysinhactc do you mind also sharing the output of
docker info | grep -5 Security
this could be because your docker security has apparmor and you might to need this https://minikube.sigs.k8s.io/docs/drivers/docker/#troubleshooting
Do you mind sharing the output of minikube start along with the command-line?
I can't imagine any start options having an effect, but am just curious if there is something exotic.
@ajoysinhactc do you mind also sharing the output of
docker info | grep -5 Securitythis could be because your docker security has apparmor and you might to need this https://minikube.sigs.k8s.io/docs/drivers/docker/#troubleshooting
Thanks .. this is the solution .. after disabling apparmor for mysqld using following commands on ubuntu mysql is deployed on minikube [ ubuntu environment ]
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
It has been solved
Most helpful comment
Thanks .. this is the solution .. after disabling apparmor for mysqld using following commands on ubuntu mysql is deployed on minikube [ ubuntu environment ]