Files
kubevpn/pkg/test/pod.yaml

34 lines
1018 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app: test
spec:
terminationGracePeriodSeconds: 0
containers:
- name: traffic-test
image: ghcr.io/kubenetworks/kubevpn:v1.1.28
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
args:
- |
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
echo 1 > /proc/sys/net/ipv4/conf/all/route_localnet
update-alternatives --set iptables /usr/sbin/iptables-legacy
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
ip6tables -t nat -A POSTROUTING -s fe80::cff4:d42c:7e73:e84b/64 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
tail -f /dev/null
securityContext:
privileged: true
capabilities:
add:
- NET_ADMIN
restartPolicy: Always