Skip to content

Instantly share code, notes, and snippets.

@sridhargaddam
Last active August 9, 2023 06:35
Show Gist options
  • Save sridhargaddam/8b070d486127fa4e2a7dd9a6b605a832 to your computer and use it in GitHub Desktop.
Save sridhargaddam/8b070d486127fa4e2a7dd9a6b605a832 to your computer and use it in GitHub Desktop.
enable-forwarding
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: enable-forwarding
namespace: submariner-operator
spec:
selector:
matchLabels:
app: enable-forwarding
template:
metadata:
labels:
app: enable-forwarding
spec:
tolerations:
- operator: Exists
containers:
- name: enable-forwarding
image: quay.io/submariner/nettest:devel
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- net_admin
drop:
- all
privileged: true
readOnlyRootFilesystem: false
runAsNonRoot: false
command: ["/bin/sh", "-c"]
args:
- sysctl -w net.ipv4.conf.all.forwarding=1;
sleep infinity
restartPolicy: Always
securityContext: {}
serviceAccount: submariner-routeagent
serviceAccountName: submariner-routeagent
hostNetwork: true
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment