Windows: Adds RunAsUserName related documentation (#15378)

Recently, the RunAsUserName feature has been added, allowing users to
run Windows containers with custom usernames, different from the image
default usernames.

Adds documentation regarding its prerequisites, feature gate, usage,
restrictions, and samples.
This commit is contained in:
Claudiu Belu
2019-08-19 16:37:30 +03:00
committed by Kubernetes Prow Robot
parent 128e9c26b0
commit 98533bdfb9
4 changed files with 171 additions and 0 deletions
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: run-as-username-container-demo
spec:
securityContext:
windowsOptions:
runAsUserName: "ContainerUser"
containers:
- name: run-as-username-demo
image: mcr.microsoft.com/windows/servercore:ltsc2019
command: ["ping", "-t", "localhost"]
securityContext:
windowsOptions:
runAsUserName: "ContainerAdministrator"
nodeSelector:
beta.kubernetes.io/os: windows
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Pod
metadata:
name: run-as-username-pod-demo
spec:
securityContext:
windowsOptions:
runAsUserName: "ContainerUser"
containers:
- name: run-as-username-demo
image: mcr.microsoft.com/windows/servercore:ltsc2019
command: ["ping", "-t", "localhost"]
nodeSelector:
beta.kubernetes.io/os: windows