Skip to content

Commit

Permalink
Sync /administer-cluster/namespaces-walkthrough.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jzhupup committed Oct 31, 2022
1 parent ff852e3 commit 1a96e0a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ Let's create two new namespaces to hold our work.
让我们创建两个新的名字空间来保存我们的工作。

<!--
Use the file [`namespace-dev.json`](/examples/admin/namespace-dev.json) which describes a `development` namespace:
Use the file [`namespace-dev.yaml`](/examples/admin/namespace-dev.yaml) which describes a `development` namespace:
-->
文件 [`namespace-dev.json`](/examples/admin/namespace-dev.json) 描述了 `development` 名字空间:
文件 [`namespace-dev.yaml`](/examples/admin/namespace-dev.yaml) 描述了 `development` 名字空间:

{{< codenew language="json" file="admin/namespace-dev.json" >}}
{{< codenew language="yaml" file="admin/namespace-dev.yaml" >}}

<!--
Create the `development` namespace using kubectl.
Expand All @@ -140,24 +140,24 @@ Create the `development` namespace using kubectl.
使用 kubectl 创建 `development` 名字空间。

```shell
kubectl create -f https://k8s.io/examples/admin/namespace-dev.json
kubectl create -f https://k8s.io/examples/admin/namespace-dev.yaml
```

<!--
Save the following contents into file [`namespace-prod.json`](/examples/admin/namespace-prod.json) which describes a `production` namespace:
Save the following contents into file [`namespace-prod.yaml`](/examples/admin/namespace-prod.yaml) which describes a `production` namespace:
-->
将下列的内容保存到文件 [`namespace-prod.json`](/examples/admin/namespace-prod.json) 中,
将下列的内容保存到文件 [`namespace-prod.yaml`](/examples/admin/namespace-prod.yaml) 中,
这些内容是对 `production` 名字空间的描述:

{{< codenew language="json" file="admin/namespace-prod.json" >}}
{{< codenew language="yaml" file="admin/namespace-prod.yaml" >}}

<!--
And then let's create the `production` namespace using kubectl.
-->
让我们使用 kubectl 创建 `production` 名字空间。

```shell
kubectl create -f https://k8s.io/examples/admin/namespace-prod.json
kubectl create -f https://k8s.io/examples/admin/namespace-prod.yaml
```

<!--
Expand Down Expand Up @@ -397,7 +397,7 @@ Production likes to run cattle, so let's create some cattle pods.
生产环境需要以放牛的方式运维,让我们创建一些名为 `cattle` 的 Pod。

```shell
kubectl create deployment cattle --image=k8s.gcr.io/serve_hostname --replicas=5
kubectl create deployment cattle --image=registry.k8s.io/serve_hostname --replicas=5
kubectl get deployment
```

Expand Down
6 changes: 6 additions & 0 deletions content/zh-cn/examples/admin/namespace-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: development
labels:
name: development
6 changes: 6 additions & 0 deletions content/zh-cn/examples/admin/namespace-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: production
labels:
name: production

0 comments on commit 1a96e0a

Please sign in to comment.