Mysql Kubernetes 部署舵图失败,准备就绪,活性探测失败

问题描述

我是 stackoverflow 的新手,所以如果我没有遵守提出这个问题的所有规则,请原谅。

所以,我使用这个舵图:https://github.com/helm/charts/tree/master/stable/mysql 为我们的生产环境部署 MysqL。事实上,我们在生产中运行了这个设置,但它只创建了 1 个 MysqL pod,而我需要运行 3 个 pod。我尝试在 helm 图表的 values.yaml 文件中设置 replicas=3 并重新部署该图表,但它不断失败并出现一些错误错误是:

Events:
    Type     Reason            Age                    From                  Message
    ----     ------            ----                   ----                  -------
    Warning  FailedScheduling  4m58s                  default-scheduler     pod has unbound immediate PersistentVolumeClaims (repeated 4 times)
    normal   Scheduled         4m58s                  default-scheduler     Successfully assigned test-helm/cluster-MysqL-5bcdf87779-vdb2s to innolx12896
    normal   Pulled            4m57s                  kubelet,innolx12896  Container image "busyBox:1.29.3" already present on machine
    normal   Created           4m56s                  kubelet,innolx12896  Created container
    normal   Started           4m56s                  kubelet,innolx12896  Started container
    Warning  BackOff           4m32s (x2 over 4m37s)  kubelet,innolx12896  Back-off restarting Failed container
    normal   Pulled            2m52s (x4 over 4m55s)  kubelet,innolx12896  Container image "MysqL:5.7.14" already present on machine
    normal   Created           2m52s (x4 over 4m55s)  kubelet,innolx12896  Created container
    Warning  Unhealthy         2m52s (x3 over 3m12s)  kubelet,innolx12896  Readiness probe Failed: MysqLadmin: [Warning] Using a password on the command line interface can be insecure.
                                                                            MysqLadmin: connect to server at 'localhost' Failed
                                                                            error: 'Can't connect to local MysqL server through socket '/var/run/MysqLd/MysqLd.sock' (2)'
                                                                            Check that MysqLd is running and that the socket: '/var/run/MysqLd/MysqLd.sock' exists!
    normal   Killing           2m52s                  kubelet,innolx12896  Killing container with id docker://cluster-MysqL:Container Failed liveness probe.. Container will be killed and recreated.
    normal   Started           2m51s (x4 over 4m54s)  kubelet,innolx12896  Started container
    Warning  Unhealthy         2m12s (x4 over 3m42s)  kubelet,innolx12896  Liveness probe Failed: MysqLadmin: [Warning] Using a password on the command line interface can be insecure.
                                                                            MysqLadmin: connect to server at 'localhost' Failed
                                                                            error: 'Can't connect to local MysqL server through socket '/var/run/MysqLd/MysqLd.sock' (2)'
                                                                            Check that MysqLd is running and that the socket: '/var/run/MysqLd/MysqLd.sock' exists!

此外,当我尝试查看 MysqLd 袜子时,它也不见了。但我不明白为什么。由于单个 pod 部署工作正常,但 3 个 pod 部署会产生此错误

也可能有办法通过明确定义其他 StackOverflow 答案建议的袜子路径来解决这个问题1 或这个答案2。但需要注意的是,我们通过 Jenkins 实现了整个生产图表部署的自动化,并且没有为每个生产版本明确运行这些命令的范围。

所以,我需要知道如何解决这个问题,或者可能知道是什么导致了这个问题,以便我可以更改或更改我在开头提到的 helm chart 中的一些参数。还请告诉我是否无法扩展此部署,这意味着此掌舵图不支持或不适用于多个 MysqL pod。

提前致谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)