Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
router.yaml 673 B
apiVersion: v1
kind: Pod
metadata:
  name: router
  labels:
    app: test4
  annotations:
    k8s.v1.cni.cncf.io/networks: v-network-1, v-network-2
spec:
  # securityContext:
  #  sysctls:
  #       - name: net.ipv4.ip_forward
  #         value: "1"
  containers:
  - name: router
    command: ["/bin/ash", "-c"]
    args: ["echo 'net.ipv4.ip_forward = 1' >> /etc/sysctl.conf && sysctl -p &&  ip addr add 10.0.1.1/24 dev net1 && ip addr add 10.0.2.1/24 dev net2 && 
            trap : TERM INT; sleep infinity & wait"]
    image: alpine:latest
    securityContext:
      privileged: true
      capabilities:
        add: ["NET_ADMIN"]
  #nodeName: test-l2sm-uc3m-polito-2