如何解决K3S安装中的错误:K3S.服务的工作失败

发布于 2025-02-11 14:11:27 字数 1739 浏览 2 评论 0原文

我在Ubuntu实例上安装K3并将MySQL AWS RD与主节点连接起来时面临问题。我已经制作了1个主节点和3个Worker节点。当我尝试执行以下以下命令时,我会出现错误。请帮助我。我检查了安全组中的入站和出站规则,该规则附加了RDS和EC2实例,但效果很好。请帮忙!!!

Job for k3s.service failed because the control process exited with error code.
See "systemctl status k3s.service" and "journalctl -xe" for details.

安装命令在用DB名称K3S

export K3S_DATASTORE_ENDPOINT='mysql://k3s:<xxxdbpasswordxxx>@tcp(k3s-cluster-db.cz2c5bol8r6l.us-east-1.rds.amazonaws.com:3306)/k3s' 
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig=/home/ubuntu/.kube/config  --write-kubeconfig-mode=644" sh -

错误:

“在此处输入图像说明”

入站规则

出站规则

systemctl状态k3s.service

journalctl -xe

”在此处输入图像描述”

I am facing problem in installing K3s on Ubuntu instance and connecting mysql AWS RDS with the master node . I have made 1 master node and 3 worker node .When I try to execute the following commands below I get error. Please help me with this .I checked the inbound and outbound rules in security group which is attached to RDS and EC2 instance but it works fine . Please Help !!!!

Job for k3s.service failed because the control process exited with error code.
See "systemctl status k3s.service" and "journalctl -xe" for details.

INSTALLATION COMMANDS after making RDS mysql dataabse with db name k3s

export K3S_DATASTORE_ENDPOINT='mysql://k3s:<xxxdbpasswordxxx>@tcp(k3s-cluster-db.cz2c5bol8r6l.us-east-1.rds.amazonaws.com:3306)/k3s' 
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--write-kubeconfig=/home/ubuntu/.kube/config  --write-kubeconfig-mode=644" sh -

ERROR :

enter image description here

INBOUND RULES

enter image description here

OUTBOUND RULES
enter image description here

systemctl status k3s.service
enter image description here

journalctl -xe

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

场罚期间 2025-02-18 14:11:27

您的命令似乎有两个问题:

INSTALL_K3S_EXEC=“—write-kubeconfig=/home/ubuntu/.kube/config  --write-kubeconfig-mode=644” 
  • 使用而不是可能会被外壳误解
  • 一个选项,例如- write-kubeconfig应该使用<代码> - (如中 - - write-kubeconfig

,因为错误消息是flag提供的,但未定义:-write-kube-config(并且具有-),以上可能只是字体/显示问题。
在这种情况下,检查是否是

Your command seems to have two issues:

INSTALL_K3S_EXEC=“—write-kubeconfig=/home/ubuntu/.kube/config  --write-kubeconfig-mode=644” 
  • using instead of " can be misinterpreted by the shell
  • an option like —write-kubeconfig should use -- (as in —-write-kubeconfig)

Since the error message is flag provided but not defined: --write-kube-config (and has --), it is possible the above is just a font/display issue.
In that case, check if this is an option order issue as described here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文