Q2 Practise test troubleshoot Network It was found that kube-proxy pods are cra . . .

Nitin Garg:
Q2 Practise test troubleshoot Network

It was found that kube-proxy pods are crashed. Later upon checking it was found that config file is misspelled inside daemonset kube-proxy but the correct file mentioned inside the configmap kube-proxy is itself not found. Then how it worked fine after correcting the value in DS i.e. /var/lib/kube-proxy/config.conf ?? @Tej_Singh_Rana
image.png

Mohamed Ayman:
Please try again using those steps,

  1. Check the logs of the kube-proxy pods
    kubectl -n kube-system logs <name_of_the_kube_proxy_pod>
  2. The configuration file /var/lib/kube-proxy/configuration.conf is not valid. The configuration path does not match the data in the ConfigMap.
    kubectl -n kube-system describe configmap kube-proxy shows that the file name used is config.conf which is mounted in the kube-proxy daemonset pods at the path /var/lib/kube-proxy/config.conf
  3. However in the DaemonSet for kube-proxy, the command used to start the kube-proxy pod makes use of the path /var/lib/kube-proxy/configuration.conf.
    Correct this path to /var/lib/kube-proxy/config.conf as per the ConfigMap and recreate the kube-proxy pods.
    This should get the kube-proxy pods back in a running state.

Tej_Singh_Rana:
Hello, @Nitin Garg
Because you’re looking in the wrong location. We attached configMap via configMap volumes, not hostPath or similar. So it’s only available inside the pod not in a host system. For more clarification, please look into the kube-proxy daemonset volumes.

Nitin Garg:
Hello @Mohamed Ayman and @Tej_Singh_Rana thank you for your explanation. Yes I realized it later that its not the actual hostpath volume but configmap volume …