I'm new to K8s and struggling with some problems with kube-proxy. I have a service that needs to expose the deployment. Everything seems correct but it does not expose it. I found the problem in kube-proxy logs.
Unknown proxy mode "", assuming iptables proxy
No output for the command iptables-save | grep hostnames
I thought adding --proxy-mode
into the kube-proxy manifest would resolve my issue and couldn't find it.
I also tried to check the config file with this command:
ps -ef | grep kube-proxy
Output:
root 1423 24476 0 12:12 pts/0 00:00:00 grep --color=auto kube-proxy
root 8424 8392 0 11:45 ? 00:00:00 /usr/local/bin/kube-proxy --config=/var/lib/kube-proxy/config.conf --hostname-override=
ip-10-0-0-100.us-west-2.compute.internal
root@ip-10-0-0-100:~# find /var/lib/kube-proxy/config.conf
find: ‘/var/lib/kube-proxy/config.conf’: No such file or directory
root@ip-10-0-0-100:~# find /usr/local/bin/kube-proxy
find: ‘/usr/local/bin/kube-proxy’: No such file or directory
Any leads to help me find my way would highly be appreciated. Thanks!
One of the reason could be the network plugin not being installed out of many possibilities.
In my case, when I received the below error, I wanted to check for the installed CNI plugin.
Check installed CNI plugin with below command,
Suppose, it's a
weave-net
. Then we must look for the objects created for this plug-in withk get all -n kube-system
. In my case, I didn't find any objects created for the weave-net. Thus I just installed weave with the below command,One more thing to keep in mind,
/var/lib/kube-proxy/config.conf
is the mounted location inside the kube-proxy pod. Check the details of ConfigMap named kube-proxy.