0

I am trying to create a MySQL Operator for Kubernetes, using the guide of MySQL official documentation(https://dev.mysql.com/doc/mysql-operator/en/).

While doing the steps mentioned in the Document, after I deploy the InnoDBCluster, I can see all three pods become CrashLoopBackOff state. When I check the logs of the pods, it says,

cseroot@vm-fuzzing-2:~/paas-fuzzer$ kubectl logs mycluster-0
Defaulted container "sidecar" out of: sidecar, mysql, fixdatadir (init), initconf (init), initmysql (init)
[2024-05-08 18:11:36,343] sidecar              [INFO    ] MySQL Operator/sidecar_main.py=2.1.3 timestamp=2024-04-29T07:16:37 kopf=1.35.4 uid=27
[2024-05-08 18:11:36,365] sidecar              [INFO    ] My pod is mycluster-0 in default
[2024-05-08 18:11:36,365] sidecar              [INFO    ] Bootstrapping
[2024-05-08 18:11:36,365] sidecar              [INFO    ] Connect attempt #0 failed: MySQL Error (2002): Shell.connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
[2024-05-08 18:11:38,368] sidecar              [INFO    ] Connect attempt #1 failed: MySQL Error (2002): Shell.connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
[2024-05-08 18:11:40,369] sidecar              [INFO    ] Connect attempt #2 failed: MySQL Error (2002): Shell.connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
[2024-05-08 18:11:42,372] sidecar              [INFO    ] Connect attempt #3 failed: MySQL Error (2002): Shell.connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)

I followed the same procedure as the doc had. Please anyone suggest idea or help to solve the issue.

3
  • you must check mysql/initmysql container at least
    – ALex_hha
    Commented May 8 at 20:14
  • How can I check the mysql/initmysql container. There is no such containers created in the workflow. Commented May 9 at 8:46
  • kubectl logs --help
    – ALex_hha
    Commented May 9 at 9:33

0

You must log in to answer this question.

Browse other questions tagged .