cilium关闭vxlan

说明

在这里插入图片描述
在这里插入图片描述

操作

启用标志

yum -y install net-tools.x86_64
ifconfig | grep vxlan
cilium_vxlan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

修改相关配置

ks get cm cilium-config -oyaml | grep -E 'tunnel|ipv4-native-routing-cidr|auto-direct-node-routes|bpf-lb-mode'
  auto-direct-node-routes: "true"
  bpf-lb-mode: dsr
  ipv4-native-routing-cidr: 245.0.0.0/8
  tunnel: disabled

重启所有cilium相关组件

ks delete $(ks get po -oname | grep cilium)

禁用标志

ifconfig | grep vxlan

端口修改

在这里插入图片描述

ks edit cm cilium-config
 /usr/bin/cilium-agent --help | grep tun
  -t, --tunnel string                                           Tunnel mode {vxlan, geneve, disabled} (default "vxlan" for the "veth" datapath mode)
      --tunnel-port int                                         Tunnel port (default 8472 for "vxlan" and 6081 for "geneve")

在这里插入图片描述

/usr/bin/cilium-agent --help
Run the cilium agent

Usage:
  cilium-agent [flags]

Flags:
      --agent-health-port int                                   TCP port for agent health status API (default 9879)
      --agent-labels strings                                    Additional labels to identify this agent
      --agent-not-ready-taint-key string                        Key of the taint indicating that Cilium is not ready on the node (default "node.cilium.io/agent-not-ready")
      --allocator-list-timeout duration                         Timeout for listing allocator state before exiting (default 3m0s)
      --allow-icmp-frag-needed                                  Allow ICMP Fragmentation Needed type packets for purposes like TCP Path MTU. (default true)
      --allow-localhost string                                  Policy when to allow local stack to reach local endpoints { auto | always | policy } (default "auto")
      --annotate-k8s-node                                       Annotate Kubernetes node
      --api-rate-limit map                                      API rate limiting configuration (example: --rate-limit endpoint-create=rate-limit:10/m,rate-burst:2)
      --arping-refresh-period duration                          Period for remote node ARP entry refresh (set 0 to disable) (default 30s)
      --auto-create-cilium-node-resource                        Automatically create CiliumNode resource for own node on startup (default true)
      --auto-direct-node-routes                                 Enable automatic L2 routing between nodes
      --bgp-announce-lb-ip                                      Announces service IPs of type LoadBalancer via BGP
      --bgp-announce-pod-cidr                                   Announces the node's pod CIDR via BGP
      --bgp-config-path string                                  Path to file containing the BGP configuration (default "/var/lib/cilium/bgp/config.yaml")
      --bpf-ct-global-any-max int                               Maximum number of entries in non-TCP CT table (default 262144)
      --bpf-ct-global-tcp-max int                               Maximum number of entries in TCP CT table (default 524288)
      --bpf-ct-timeout-regular-any duration                     Timeout for entries in non-TCP CT table (default 1m0s)
      --bpf-ct-timeout-regular-tcp duration                     Timeout for established entries in TCP CT table (default 6h0m0s)
      --bpf-ct-timeout-regular-tcp-fin duration                 Teardown timeout for entries in TCP CT table (default 10s)
      --bpf-ct-timeout-regular-tcp-syn duration                 Establishment timeout for entries in TCP CT table (default 1m0s)
      --bpf-ct-timeout-service-any duration                     Timeout for service entries in non-TCP CT table (default 1m0s)
      --bpf-ct-timeout-service-tcp duration                     Timeout for established service entries in TCP CT table (default 6h0m0s)
      --bpf-ct-timeout-service-tcp-grace duration               Timeout for graceful shutdown of service entries in TCP CT table (default 1m0s)
      --bpf-fragments-map-max int                               Maximum number of entries in fragments tracking map (default 8192)
      --bpf-lb-acceleration string                              BPF load balancing acceleration via XDP ("native", "disabled") (default "disabled")
      --bpf-lb-algorithm string                                 BPF load balancing algorithm ("random", "maglev") (default "random")
      --bpf-lb-dev-ip-addr-inherit string                       Device name which IP addr is inherited by devices running LB BPF program (--devices)
      --bpf-lb-dsr-dispatch string                              BPF load balancing DSR dispatch method ("opt", "ipip") (default "opt")
      --bpf-lb-dsr-l4-xlate string                              BPF load balancing DSR L4 DNAT method for IPIP ("frontend", "backend") (default "frontend")
      --bpf-lb-external-clusterip                               Enable external access to ClusterIP services (default false)
      --bpf-lb-maglev-hash-seed string                          Maglev cluster-wide hash seed (base64 encoded) (default "JLfvgnHc2kaSUFaI")
      --bpf-lb-maglev-table-size uint                           Maglev per service backend table size (parameter M) (default 16381)
      --bpf-lb-map-max int                                      Maximum number of entries in Cilium BPF lbmap (default 65536)
      --bpf-lb-mode string                                      BPF load balancing mode ("snat", "dsr", "hybrid") (default "snat")
      --bpf-lb-rss-ipv4-src-cidr string                         BPF load balancing RSS outer source IPv4 CIDR prefix for IPIP
      --bpf-lb-rss-ipv6-src-cidr string                         BPF load balancing RSS outer source IPv6 CIDR prefix for IPIP
      --bpf-lb-sock                                             Enable socket-based LB for E/W traffic
      --bpf-lb-sock-hostns-only                                 Skip socket LB for services when inside a pod namespace, in favor of service LB at the pod interface. Socket LB is still used when in the host namespace. Required by service mesh (e.g., Istio, Linkerd).
      --bpf-map-dynamic-size-ratio float                        Ratio (0.0-1.0) of total system memory to use for dynamic sizing of CT, NAT 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值