Add examples for host network
This commit is contained in:
parent
644a356212
commit
60b7952549
3 changed files with 53 additions and 0 deletions
17
generic/alpine-sleep-hostnetwork-netperm.yaml
Normal file
17
generic/alpine-sleep-hostnetwork-netperm.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: alpine-sleep-hostnetwork-netperm
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: alpine
|
||||
image: alpine:3.15
|
||||
args:
|
||||
- sleep
|
||||
- "1000000"
|
||||
securityContext:
|
||||
capabilities:
|
||||
# NET_ADMIN for wg
|
||||
# NET_RAW for iptables
|
||||
add: ["NET_ADMIN", "NET_RAW" ]
|
12
generic/alpine-sleep-hostnetwork.yaml
Normal file
12
generic/alpine-sleep-hostnetwork.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: alpine-sleep-hostnetwork
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: alpine
|
||||
image: alpine:3.15
|
||||
args:
|
||||
- sleep
|
||||
- "1000000"
|
24
generic/alpine-sleep-netperm.yaml
Normal file
24
generic/alpine-sleep-netperm.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: alpine-sleep-netperm
|
||||
spec:
|
||||
securityContext:
|
||||
sysctls:
|
||||
- name: net.ipv6.conf.all.forwarding
|
||||
value: "1"
|
||||
containers:
|
||||
- name: alpine
|
||||
image: alpine:3.15
|
||||
args:
|
||||
- sleep
|
||||
- "1000000"
|
||||
securityContext:
|
||||
capabilities:
|
||||
# NET_ADMIN for wg
|
||||
# NET_RAW for iptables
|
||||
add: ["NET_ADMIN", "NET_RAW" ]
|
||||
|
||||
# [12:31] nb3:generic% kubectl get pods -n testnico -w
|
||||
# NAME READY STATUS RESTARTS AGE
|
||||
# alpine-sleep-netperm 0/1 SysctlForbidden 0 49s
|
Loading…
Reference in a new issue