@@ -82,7 +82,7 @@ that are most appropriate for your configuration, do the following:
82
82
kubectl get ns
83
83
```
84
84
The output is similar to this:
85
- ```
85
+ ```
86
86
NAME STATUS AGE
87
87
default Active 9m30s
88
88
kube-node-lease Active 9m32s
@@ -99,21 +99,23 @@ that are most appropriate for your configuration, do the following:
99
99
kubectl label --dry-run=server --overwrite ns --all \
100
100
pod-security.kubernetes.io/enforce=privileged
101
101
```
102
- The output is similar to this:
103
- ```
102
+
103
+ The output is similar to:
104
+ ```
104
105
namespace/default labeled
105
106
namespace/kube-node-lease labeled
106
107
namespace/kube-public labeled
107
108
namespace/kube-system labeled
108
109
namespace/local-path-storage labeled
109
110
```
110
111
2. Baseline
111
- ` ` ` shell
112
+ ` ` ` shell
112
113
kubectl label --dry-run=server --overwrite ns --all \
113
114
pod-security.kubernetes.io/enforce=baseline
114
115
` ` `
115
- The output is similar to this:
116
- ```
116
+
117
+ The output is similar to:
118
+ ```
117
119
namespace/default labeled
118
120
namespace/kube-node-lease labeled
119
121
namespace/kube-public labeled
@@ -123,15 +125,16 @@ that are most appropriate for your configuration, do the following:
123
125
Warning: kube-proxy-m6hwf: host namespaces, hostPath volumes, privileged
124
126
namespace/kube-system labeled
125
127
namespace/local-path-storage labeled
126
- ```
128
+ ```
127
129
128
130
3. Restricted
129
131
` ` ` shell
130
132
kubectl label --dry-run=server --overwrite ns --all \
131
133
pod-security.kubernetes.io/enforce=restricted
132
134
` ` `
133
- The output is similar to this:
134
- ```
135
+
136
+ The output is similar to:
137
+ ```
135
138
namespace/default labeled
136
139
namespace/kube-node-lease labeled
137
140
namespace/kube-public labeled
@@ -180,7 +183,7 @@ following:
180
183
181
184
```
182
185
mkdir -p /tmp/pss
183
- cat <<EOF > /tmp/pss/cluster-level-pss.yaml
186
+ cat <<EOF > /tmp/pss/cluster-level-pss.yaml
184
187
apiVersion: apiserver.config.k8s.io/v1
185
188
kind: AdmissionConfiguration
186
189
plugins:
@@ -212,7 +215,7 @@ following:
212
215
1. Configure the API server to consume this file during cluster creation:
213
216
214
217
```
215
- cat <<EOF > /tmp/pss/cluster-config.yaml
218
+ cat <<EOF > /tmp/pss/cluster-config.yaml
216
219
kind: Cluster
217
220
apiVersion: kind.x-k8s.io/v1alpha4
218
221
nodes:
@@ -281,11 +284,11 @@ following:
281
284
The output is similar to this:
282
285
```
283
286
Kubernetes control plane is running at https://127.0.0.1:63855
284
-
285
287
CoreDNS is running at https://127.0.0.1:63855/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
286
-
288
+
287
289
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
288
290
```
291
+
289
292
1 . Create a Pod in the default namespace:
290
293
291
294
``` shell
0 commit comments