我使用安装在k8s上的舵机,但是我的服务器在使用它时遇到问题,所以.Please告诉我如何解决它
[root@master ~]# kubectl logs -n wrs pod/config-server-7b64695cc8-b8c4j -c consul-connect-inject-init
2022-06-15T14:12:18.679Z [INFO] Registered service has been detected: service=config-server-service
2022-06-15T14:12:18.680Z [INFO] Registered service has been detected: service=config-server-service-sidecar-proxy
2022-06-15T14:12:18.680Z [INFO] Connect initialization completed
==> Error setting up traffic redirection rules: failed to run command: /sbin/iptables -t nat -N CONSUL_PROXY_INBOUND, err: exit status 3, output: modprobe: can't change directory to '/lib/modules': No such file or directory
iptables v1.8.7 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.环境:
kubernetes v1.23.6
proxy mode ipvs(not ip_tables)
helm 3.9.0
hashicorp/consul:1.12.0
hashicorp/consul-k8s-control-plane:0.44.0
CentOS Linux release 8.5.2111
Linux master 5.4.198-1.el8.elrepo.x86_64 #1 SMP Tue Jun 14 07:38:21 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux我能够运行我的服务,但不能通过执行以下命令来工作
sudo modprobe ip_tables发布于 2022-06-16 04:09:43
短期解决方案在所有工作节点中以根用户的身份运行mod探针iptables_nat,这将将模块加载到内核中。
长期解决方案您需要使用基于cni的解决方案,并且可以检查https://www.nomadproject.io/docs/integrations/consul-connect。
https://stackoverflow.com/questions/72633601
复制相似问题