podroute

package
v0.0.0-...-2891190 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeServiceCIDRRoute

func MakeServiceCIDRRoute(linkBridge netlink.Link, serviceCIDR string) (svcRoute *netlink.Route, err error)

MakeServiceCIDRRoute 生成 Pod 到 ServiceIP 的路由

func SetRouteInPod

func SetRouteInPod(bridgeName, netnsPath, serviceIPCIDR string) (svcRoute *netlink.Route, err error)

SetRouteInPod 在 Pod 命名空间中设置路由规则,有两种情况 1:默认路由, 一般 bridge + dhcp 会自动为 Pod 创建默认路由, 在 ESXI 环境下, 创建的 Pod 申请到 IP 后并不会创建, 后续可能需要适配 2:Pod 到 ServiceIP 的路由, 需要设置宿主机为该 Pod 的网关, 否则拥有宿主机网络 IP 的 Pod 无法访问到 ServiceIP

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL