Merge pull request #26232 from ydFu/update-misc-batch-5

[zh] Sync concepts pages for policy
pull/26236/head
Kubernetes Prow Robot 2021-01-24 20:36:53 -08:00 committed by GitHub
commit 9c5b468f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 14 deletions

View File

@ -1,7 +1,7 @@
---
title: Pod 安全策略
content_type: concept
weight: 20
weight: 30
---
<!--
reviewers:
@ -9,7 +9,7 @@ reviewers:
- tallclair
title: Pod Security Policies
content_type: concept
weight: 20
weight: 30
-->
{{< feature-state state="beta" >}}
@ -404,12 +404,19 @@ kubectl-user create -f- <<EOF
apiVersion: v1
kind: Pod
metadata:
name: pause
name: pause
spec:
containers:
- name: pause
- name: pause
image: k8s.gcr.io/pause
EOF
```
<!--
The output is similar to this:
-->
输出类似于:
```
Error from server (Forbidden): error when creating "STDIN": pods "pause" is forbidden: unable to validate against any pod security policy: []
```
@ -487,16 +494,17 @@ kubectl-user create -f- <<EOF
apiVersion: v1
kind: Pod
metadata:
name: pause
name: pause
spec:
containers:
- name: pause
- name: pause
image: k8s.gcr.io/pause
EOF
```
输出:
<!--
The output is similar to this:
-->
输出类似于:
```
pod "pause" created
```
@ -513,18 +521,21 @@ kubectl-user create -f- <<EOF
apiVersion: v1
kind: Pod
metadata:
name: privileged
name: privileged
spec:
containers:
- name: pause
- name: pause
image: k8s.gcr.io/pause
securityContext:
privileged: true
EOF
```
输出为:
<!--
The output is similar to this:
-->
输出类似于:
```
Error from server (Forbidden): error when creating "STDIN": pods "privileged" is forbidden: unable to validate against any pod security policy: [spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]
```

View File

@ -1,7 +1,7 @@
---
title: 资源配额
content_type: concept
weight: 10
weight: 20
---
<!--
@ -9,7 +9,7 @@ reviewers:
- derekwaynecarr
title: Resource Quotas
content_type: concept
weight: 10
weight: 20
-->
<!-- overview -->