<p>I'm kinda new to Kubernetes, and I would like to understand what is the purpose of Kube-proxy in Azure AKS/regular cluster.
from what I understand, Kube-proxy is updated by the API cluster from the various deployments configurations, which then updates the IP-table stack in the Linux kernel that responsible for the traffic routes between pods and services.</p>
<p>Am I missing something important?</p>
<p>Thanks!!</p>

<p>Basically <em>kube-proxy</em> component runs on each node to provide  network features. It is run as a Kubernetes  <a href="https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/" rel="nofollow noreferrer"><code>DaemonSet</code></a>  and its configuration is stored on a Kubernetes  <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer"><code>ConfigMap</code></a>. You can edit the kube-proxy  <code>DaemonSet</code>  or  <code>ConfigMap</code>  on the  <code>kube-system</code>  namespace using commands:</p>
<pre><code>$ kubectl -n kube-system edit daemonset kube-proxy

</code></pre>
<p>or</p>
<pre><code>$ kubectl -n kube-system edit configmap kube-proxy

</code></pre>
<blockquote>
<p><code>kube-proxy</code>  currently supports three different operation modes:</p>
<ul>
<li><strong>User space:</strong> This mode gets its name because the service routing takes place in  <code>kube-proxy</code>  in the user process space
instead of in the kernel network stack. It is not commonly used as it is slow and outdated.</li>
<li><strong>IPVS (IP Virtual Server)</strong>: Built on the Netfilter framework, IPVS implements Layer-4 load balancing in the Linux kernel, supporting multiple load-balancing algorithms, including least connections and shortest expected delay. This  <code>kube-proxy</code>  mode became generally available in Kubernetes 1.11, but it requires the Linux kernel to have the IPVS modules loaded. It is also not as widely supported by various Kubernetes networking projects as the iptables mode.</li>
<li><strong>iptables:</strong> This mode uses Linux kernel-level Netfilter rules to configure all routing for Kubernetes Services. This mode is the default for  <code>kube-proxy</code>  on most platforms. When load balancing for multiple backend pods, it uses unweighted round-robin scheduling.</li>
<li><strong>IPVS (IP Virtual Server)</strong>: Built on the Netfilter framework, IPVS implements Layer-4 load balancing in the Linux kernel, supporting multiple load-balancing algorithms, including least connections and shortest expected delay. This  <code>kube-proxy</code>  mode became generally available in Kubernetes 1.11, but it requires the Linux kernel to have the IPVS modules loaded. It is also not as widely supported by various Kubernetes networking projects as the iptables mode.</li>
</ul>
</blockquote>
<p>Take a look: <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/" rel="nofollow noreferrer">kube-proxy</a>, <a href="https://www.stackrox.com/post/2020/01/kubernetes-networking-demystified/" rel="nofollow noreferrer">kube-proxy-article</a>, <a href="https://stackoverflow.com/questions/52784153/how-to-set-kube-proxy-settings-using-kubectl-on-aks">aks-kube-proxy</a>.</p>
<p>Read also: <a href="https://kubernetes.io/docs/concepts/cluster-administration/proxies/" rel="nofollow noreferrer">proxies-in-kubernetes</a>.</p>
