add pod that allows rebooting a host
This commit is contained in:
parent
5e02d5f5d0
commit
dfdac9c6f0
1 changed files with 21 additions and 0 deletions
21
generic/alpine-sleep-privileged.yaml
Normal file
21
generic/alpine-sleep-privileged.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: alpine-privileged-serverXX
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: alpine
|
||||||
|
image: alpine
|
||||||
|
args:
|
||||||
|
- sleep
|
||||||
|
- "1000000"
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
capabilities:
|
||||||
|
add: ["NET_ADMIN", "SYS_ADMIN"]
|
||||||
|
runAsUser: 0 # run as root (or any other user)
|
||||||
|
hostIPC: true # Use the host's ipc namespace https://www.man7.org/linux/man-pages/man7/ipc_namespaces.7.html
|
||||||
|
hostNetwork: true # Use the host's network namespace https://www.man7.org/linux/man-pages/man7/network_namespaces.7.html
|
||||||
|
hostPID: true
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: "serverXX"
|
Loading…
Reference in a new issue