Skip to content

Commit 1755c46

Browse files
committed
translate tutorrials/security/ns-level-pss
1 parent 9c6994e commit 1755c46

File tree

1 file changed

+39
-52
lines changed

1 file changed

+39
-52
lines changed
Lines changed: 39 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
---
2-
title: Apply Pod Security Standards at the Namespace Level
3-
content_type: tutorial
2+
title: 名前空間レベルでのPodセキュリティの標準の適用
3+
content_type: チュートリアル
44
weight: 20
55
---
66

77
{{% alert title="Note" %}}
8-
This tutorial applies only for new clusters.
8+
このチュートリアルは、新しいクラスターにのみ適用されます。
99
{{% /alert %}}
1010

11-
Pod Security admission (PSA) is enabled by default in v1.23 and later, as it
12-
[graduated to beta](/blog/2021/12/09/pod-security-admission-beta/). Pod Security Admission
13-
is an admission controller that applies
14-
[Pod Security Standards](/docs/concepts/security/pod-security-standards/)
15-
when pods are created. In this tutorial, you will enforce the `baseline` Pod Security Standard,
16-
one namespace at a time.
11+
Podセキュリティアドミッション(PSA)は、[ベータへ進み](/blog/2021/12/09/pod-security-admission-beta/)、v1.23以降でデフォルトで有効になっています。
12+
Podセキュリティアドミッションは、Podが作成される際に、[Podセキュリティの標準](/ja/docs/concepts/security/pod-security-standards/)の適用の認可を制御するものです。
13+
このチュートリアルでは、一度に1つの名前空間で`baseline` Podセキュリティ標準を強制します。
1714

18-
You can also apply Pod Security Standards to multiple namespaces at once at the cluster
19-
level. For instructions, refer to
20-
[Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/).
15+
Podセキュリティ標準を複数の名前空間に一度にクラスターレベルで適用することもできます。やり方については[クラスターレベルでのPodセキュリティの標準の適用](/docs/tutorials/security/cluster-level-pss/)を参照してください。
2116

2217
## {{% heading "prerequisites" %}}
2318

24-
Install the following on your workstation:
19+
ワークステーションに以下をインストールしてください:
2520

2621
- [KinD](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
27-
- [kubectl](/docs/tasks/tools/)
22+
- [kubectl](/ja/docs/tasks/tools/)
2823

29-
## Create cluster
24+
## クラスターの作成
3025

31-
1. Create a `KinD` cluster as follows:
26+
1. 以下のように`KinD`クラスターを作成します。
3227

3328
```shell
3429
kind create cluster --name psa-ns-level
3530
```
3631

37-
The output is similar to this:
32+
出力は次のようになります:
3833

3934
```
4035
Creating cluster "psa-ns-level" ...
@@ -52,12 +47,12 @@ Install the following on your workstation:
5247
Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/quick-start/
5348
```
5449

55-
1. Set the kubectl context to the new cluster:
50+
1. kubectl contextを新しいクラスターにセットします:
5651

5752
```shell
5853
kubectl cluster-info --context kind-psa-ns-level
5954
```
60-
The output is similar to this:
55+
出力は次のようになります:
6156

6257
```
6358
Kubernetes control plane is running at https://127.0.0.1:50996
@@ -66,37 +61,33 @@ Install the following on your workstation:
6661
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
6762
```
6863

69-
## Create a namespace
64+
## 名前空間の作成
7065

71-
Create a new namespace called `example`:
66+
`example`と呼ぶ新しい名前空間を作成します:
7267

7368
```shell
7469
kubectl create ns example
7570
```
7671

77-
The output is similar to this:
72+
出力は次のようになります:
7873

7974
```
8075
namespace/example created
8176
```
8277

83-
## Enable Pod Security Standards checking for that namespace
78+
## 名前空間へのPodセキュリティ標準チェックの有効化
8479

85-
1. Enable Pod Security Standards on this namespace using labels supported by
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.
80+
1. ビルトインのPod Security Admissionでサポートされているラベルを使って、この名前空間のPodセキュリティ標準を有効にします。
81+
このステップでは、_baseline_ Podセキュリティ標準の最新バージョンに合わないPodについて警告するチェックを設定します。
8982

9083
```shell
9184
kubectl label --overwrite ns example \
9285
pod-security.kubernetes.io/warn=baseline \
9386
pod-security.kubernetes.io/warn-version=latest
9487
```
9588

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
98-
`warn` and `audit` for `restricted` Pod Security Standards as per the latest
99-
version (default value)
89+
2. ラベルを使って、任意の名前空間に対して複数のPodセキュリティ標準チェックを設定できます。
90+
以下のコマンドは、`baseline` Podセキュリティ標準を`enforce`(強制)としますが、`restricted` Podセキュリティ標準には最新バージョンに準じて`warn`(警告)および`audit`(監査)とします(デフォルト値)。
10091

10192
```shell
10293
kubectl label --overwrite ns example \
@@ -108,55 +99,51 @@ namespace/example created
10899
pod-security.kubernetes.io/audit-version=latest
109100
```
110101

111-
## Verify the Pod Security Standard enforcement
102+
## Podセキュリティ標準の強制の実証
112103

113-
1. Create a baseline Pod in the `example` namespace:
104+
1. `example`名前空間内に`baseline` Podを作成します:
114105

115106
```shell
116107
kubectl apply -n example -f https://k8s.io/examples/security/example-baseline-pod.yaml
117108
```
118-
The Pod does start OK; the output includes a warning. For example:
109+
Podは正常に起動しますが、出力には警告が含まれています。例えば:
119110

120111
```
121112
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")
122113
pod/nginx created
123114
```
124115

125-
1. Create a baseline Pod in the `default` namespace:
116+
1. `default`名前空間内に`baseline` Podを作成します:
126117

127118
```shell
128119
kubectl apply -n default -f https://k8s.io/examples/security/example-baseline-pod.yaml
129120
```
130-
Output is similar to this:
121+
出力は次のようになります:
131122

132123
```
133124
pod/nginx created
134125
```
135126

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.
127+
`example`名前空間にだけ、Podセキュリティ標準のenforceと警告の設定が適用されました。
128+
`default`名前空間内では、警告なしに同じPodを作成できました。
139129

140-
## Clean up
130+
## 後片付け
141131

142-
Now delete the cluster which you created above by running the following command:
132+
では、上記で作成したクラスターを、以下のコマンドを実行して削除します:
143133

144134
```shell
145135
kind delete cluster --name psa-ns-level
146136
```
147137

148138
## {{% heading "whatsnext" %}}
149139

150-
- Run a
151-
[shell script](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)
152-
to perform all the preceding steps all at once.
140+
- 前出の一連の手順を一度に全て行うために[シェルスクリプト](/examples/security/kind-with-namespace-level-baseline-pod-security.sh)を実行します。
153141

154-
1. Create KinD cluster
155-
2. Create new namespace
156-
3. Apply `baseline` Pod Security Standard in `enforce` mode while applying
157-
`restricted` Pod Security Standard also in `warn` and `audit` mode.
158-
4. Create a new pod with the following pod security standards applied
142+
1. KinDクラスターを作成します。
143+
2. 新しい名前空間を作成します。
144+
3. `enforce`モードでは`baseline` Podセキュリティ標準を適用し、`warn`および`audit`モードでは`restricted` Podセキュリティ標準を適用します。
145+
4. これらのPodセキュリティ標準を適用した新しいPodを作成します。
159146

160-
- [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
161-
- [Pod Security Standards](/docs/concepts/security/pod-security-standards/)
162-
- [Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/)
147+
- [Podのセキュリティアドミッション](/ja/docs/concepts/security/pod-security-admission/)
148+
- [Podセキュリティの標準](/ja/docs/concepts/security/pod-security-standards/)
149+
- [クラスターレベルでのPodセキュリティの標準の適用](/ja/docs/tutorials/security/cluster-level-pss/)

0 commit comments

Comments
 (0)