Skip to content

Commit a39ee49

Browse files
author
Tim Bannister
committed
Tidy PSA tutorials
Various tidying to match website style guide better.
1 parent c6b3f34 commit a39ee49

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

content/en/docs/tutorials/security/cluster-level-pss.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ that are most appropriate for your configuration, do the following:
8282
kubectl get ns
8383
```
8484
The output is similar to this:
85-
```
85+
```
8686
NAME STATUS AGE
8787
default Active 9m30s
8888
kube-node-lease Active 9m32s
@@ -99,21 +99,23 @@ that are most appropriate for your configuration, do the following:
9999
kubectl label --dry-run=server --overwrite ns --all \
100100
pod-security.kubernetes.io/enforce=privileged
101101
```
102-
The output is similar to this:
103-
```
102+
103+
The output is similar to:
104+
```
104105
namespace/default labeled
105106
namespace/kube-node-lease labeled
106107
namespace/kube-public labeled
107108
namespace/kube-system labeled
108109
namespace/local-path-storage labeled
109110
```
110111
2. Baseline
111-
```shell
112+
```shell
112113
kubectl label --dry-run=server --overwrite ns --all \
113114
pod-security.kubernetes.io/enforce=baseline
114115
```
115-
The output is similar to this:
116-
```
116+
117+
The output is similar to:
118+
```
117119
namespace/default labeled
118120
namespace/kube-node-lease labeled
119121
namespace/kube-public labeled
@@ -123,15 +125,16 @@ that are most appropriate for your configuration, do the following:
123125
Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged
124126
namespace/kube-system labeled
125127
namespace/local-path-storage labeled
126-
```
128+
```
127129

128130
3. Restricted
129131
```shell
130132
kubectl label --dry-run=server --overwrite ns --all \
131133
pod-security.kubernetes.io/enforce=restricted
132134
```
133-
The output is similar to this:
134-
```
135+
136+
The output is similar to:
137+
```
135138
namespace/default labeled
136139
namespace/kube-node-lease labeled
137140
namespace/kube-public labeled
@@ -180,7 +183,7 @@ following:
180183

181184
```
182185
mkdir -p /tmp/pss
183-
cat <<EOF > /tmp/pss/cluster-level-pss.yaml
186+
cat <<EOF > /tmp/pss/cluster-level-pss.yaml
184187
apiVersion: apiserver.config.k8s.io/v1
185188
kind: AdmissionConfiguration
186189
plugins:
@@ -212,7 +215,7 @@ following:
212215
1. Configure the API server to consume this file during cluster creation:
213216
214217
```
215-
cat <<EOF > /tmp/pss/cluster-config.yaml
218+
cat <<EOF > /tmp/pss/cluster-config.yaml
216219
kind: Cluster
217220
apiVersion: kind.x-k8s.io/v1alpha4
218221
nodes:
@@ -281,11 +284,11 @@ following:
281284
The output is similar to this:
282285
```
283286
Kubernetes control plane is running at https://127.0.0.1:63855
284-
285287
CoreDNS is running at https://127.0.0.1:63855/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
286-
288+
287289
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
288290
```
291+
289292
1. Create a Pod in the default namespace:
290293

291294
```shell

content/en/docs/tutorials/security/ns-level-pss.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,21 @@ The output is similar to this:
8080
namespace/example created
8181
```
8282

83-
## Apply Pod Security Standards
83+
## Enable Pod Security Standards checking for that namespace
8484

8585
1. Enable Pod Security Standards on this namespace using labels supported by
86-
built-in Pod Security Admission. In this step we will warn on baseline pod
87-
security standard as per the latest version (default value)
86+
built-in Pod Security Admission. In this step you will configure a check to
87+
warn on Pods that don't meet the latest version of the _baseline_ pod
88+
security standard.
8889

8990
```shell
9091
kubectl label --overwrite ns example \
9192
pod-security.kubernetes.io/warn=baseline \
9293
pod-security.kubernetes.io/warn-version=latest
9394
```
9495

95-
2. Multiple pod security standards can be enabled on any namespace, using labels.
96-
Following command will `enforce` the `baseline` Pod Security Standard, but
96+
2. You can configure multiple pod security standard checks on any namespace, using labels.
97+
The following command will `enforce` the `baseline` Pod Security Standard, but
9798
`warn` and `audit` for `restricted` Pod Security Standards as per the latest
9899
version (default value)
99100

@@ -107,7 +108,7 @@ namespace/example created
107108
pod-security.kubernetes.io/audit-version=latest
108109
```
109110

110-
## Verify the Pod Security Standards
111+
## Verify the Pod Security Standard enforcement
111112

112113
1. Create a baseline Pod in the `example` namespace:
113114

@@ -132,9 +133,9 @@ namespace/example created
132133
pod/nginx created
133134
```
134135

135-
The Pod Security Standards were applied only to the `example`
136-
namespace. You could create the same Pod in the `default` namespace
137-
with no warnings.
136+
The Pod Security Standards enforcement and warning settings were applied only
137+
to the `example` namespace. You could create the same Pod in the `default`
138+
namespace with no warnings.
138139

139140
## Clean up
140141

0 commit comments

Comments
 (0)