Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Last active August 25, 2021 00:24
Show Gist options
  • Save jsturtevant/bf055cdd04cd93a9b62932a787ae5c77 to your computer and use it in GitHub Desktop.
Save jsturtevant/bf055cdd04cd93a9b62932a787ae5c77 to your computer and use it in GitHub Desktop.
hostprocess-cmd
apiVersion: v1
kind: Pod
metadata:
name: hostprocess-
# annotations:
# microsoft.com/hostprocess-inherit-user: "true"
spec:
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: test
imagePullPolicy: Always
image: jsturtevant/agnhost:2.33-1
command:
- "%CONTAINER_SANDBOX_MOUNT_POINT%\\agnhost"
- pause
restartPolicy: Always
nodeSelector:
"kubernetes.io/os": windows
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
---
apiVersion: v1
kind: Pod
metadata:
name: hostprocess-agnhost-older-client
# annotations:
# microsoft.com/hostprocess-inherit-user: "true"
spec:
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: test
imagePullPolicy: Always
image: k8s.gcr.io/e2e-test-images/agnhost:2.32
command:
- powershell
- -c
- start-process
- "-wait"
- "-nonewwindow"
- "$env:CONTAINER_SANDBOX_MOUNT_POINT\\agnhost"
args:
- "inclusterclient --poll-interval 5"
restartPolicy: Always
nodeSelector:
"kubernetes.io/os": windows
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
---
apiVersion: v1
kind: Pod
metadata:
name: hostprocess-agnhost
# annotations:
# microsoft.com/hostprocess-inherit-user: "true"
spec:
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: test
imagePullPolicy: Always
image: jsturtevant/agnhost:2.33-1
command:
- powershell
- -c
- start-process
- "-wait"
- "-nonewwindow"
- "$env:CONTAINER_SANDBOX_MOUNT_POINT\\agnhost"
args:
- "pause"
restartPolicy: Always
nodeSelector:
"kubernetes.io/os": windows
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment