From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configuring Linux kernel settings for Kubernetes networking

Configuring Linux kernel settings for Kubernetes networking - Kubernetes Tutorial

From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Configuring Linux kernel settings for Kubernetes networking

- To make sure that the network agent is going to work well, you need to configure the Linux kernel on your Linux host with some additional settings. That's a Linux admin job, in fact. So you need sudo privileges. And the settings themself, make sure that bridged network traffic is processed by Linux IP firewalls rules. And you also need to make sure that IP forwarding is enabled. Without that networking is not going to work on your Kubernetes host. So the settings are net.bridge.bridge-nf-call-iptables. Bridge-nf, nf is for net filter. That makes a connection to the firewall. You need for ipv4 the setting ip_forward is one to enable IP forwarding. You need a similar bridge-nf-call setting for ipv6 tables, and you need similar settings for ip6 forwarding. One way to apply these settings is by creating a file in /etc/sysctl.d, for example, /etc/systcl.d/99-kubernetes-cri.conf. The important thing is that the file is in ctl.d and it ends in .conf., and the rest of it's not really…

Contents