Istio Sidecar の iptables エラー対応
Raspberry Pi 環境で Kubernetes と Istio を併用した際に発生する iptables エラーの原因とその解決方法を解説します。
背景
Raspberry Pi の Kubernetes 環境で istio を構築した際、以下のような iptables エラーが発生しました。
error Command error output: xtables parameter problem: iptables-restore: unable to initialize table 'nat'このエラーはノードで必要なカーネルモジュールが読み込まれていないために発生します。
解決方法
各ノードで以下のコマンドを実行し、必要なカーネルモジュールを読み込む設定を行います。
modprobe -a br_netfilter ip6table_mangle ip6table_nat ip6table_raw iptable_mangle iptable_nat iptable_raw xt_REDIRECT xt_connmark xt_conntrack xt_mark xt_owner xt_tcpudp bridge ip6_tables ip_tables nf_conntrack nf_conntrack_ipv4 nf_conntrack_ipv6 nf_nat nf_nat_ipv4 nf_nat_ipv6 nf_nat_redirect x_tablesこれにより、Istio の Sidecar が正しく動作するようになります。