You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -81,11 +83,14 @@ Install the following on your workstation:
81
83
82
84
<!-- 1. Set the kubectl context to the new cluster: -->
83
85
1. 将 kubectl 上下文设置为新集群:
86
+
84
87
```shell
85
88
kubectl cluster-info --context kind-psa-ns-level
86
89
```
87
-
<!-- The output is similar to this: -->
90
+
91
+
<!-- The output is similar to this: -->
88
92
输出类似于:
93
+
89
94
```
90
95
Kubernetes control plane is running at https://127.0.0.1:50996
91
96
CoreDNS is running at https://127.0.0.1:50996/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
@@ -158,7 +163,7 @@ namespace/example created
158
163
-->
159
164
## 验证 Pod 安全标准 {#verify-the-pod-security-standards}
160
165
161
-
1. 在 `example` 名字空间中创建一个最小的 pod:
166
+
1. 在 `example` 名字空间中创建一个最小的 Pod:
162
167
163
168
```shell
164
169
cat <<EOF > /tmp/pss/nginx-pod.yaml
@@ -179,11 +184,14 @@ namespace/example created
179
184
2. Apply the pod spec to the cluster in`example` namespace:
180
185
-->
181
186
1. 将 Pod 规约应用到集群中的 `example` 名字空间中:
187
+
182
188
```shell
183
189
kubectl apply -n example -f /tmp/pss/nginx-pod.yaml
184
190
```
191
+
185
192
<!-- The output is similar to this: -->
186
193
输出类似于:
194
+
187
195
```
188
196
Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "nginx" must set securityContext allowPrivilegeEscalation=false), unrestricted capabilities (container "nginx" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "nginx" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "nginx" must set securityContext seccompProfile.type to "RuntimeDefault" or "Localhost")
189
197
pod/nginx created
@@ -216,11 +224,11 @@ with no warnings.
216
224
<!--
217
225
## Clean up
218
226
219
-
Run `kind delete cluster -name psa-ns-level` to delete the cluster created.
227
+
Run `kind delete cluster --name psa-ns-level` to delete the cluster created.
0 commit comments