I’m use helm installed consul to k8s , but my server is having problems using it
So .Please tell me how to solve it
[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.
environment:
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
I was able to get my service running but not working by executing the following command
sudo modprobe ip_tables