File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
content/zh-cn/docs/tasks/administer-cluster Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
title : 声明网络策略
3
3
min-kubernetes-server-version : v1.8
4
4
content_type : task
5
+ weight : 180
5
6
---
6
7
<!--
7
8
reviewers:
@@ -10,6 +11,7 @@ reviewers:
10
11
title: Declare Network Policy
11
12
min-kubernetes-server-version: v1.8
12
13
content_type: task
14
+ weight: 180
13
15
-->
14
16
15
17
<!-- overview -->
@@ -90,11 +92,11 @@ kubectl get svc,pod
90
92
```
91
93
``` none
92
94
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
93
- svc /kubernetes 10.100.0.1 <none> 443/TCP 46m
94
- svc /nginx 10.100.0.16 <none> 80/TCP 33s
95
+ service /kubernetes 10.100.0.1 <none> 443/TCP 46m
96
+ service /nginx 10.100.0.16 <none> 80/TCP 33s
95
97
96
98
NAME READY STATUS RESTARTS AGE
97
- po /nginx-701339712-e0qfq 1/1 Running 0 35s
99
+ pod /nginx-701339712-e0qfq 1/1 Running 0 35s
98
100
```
99
101
100
102
<!--
@@ -108,7 +110,7 @@ You should be able to access the new `nginx` service from other Pods. To access
108
110
要从 default 命名空间中的其它 Pod 来访问该服务。可以启动一个 busybox 容器:
109
111
110
112
``` shell
111
- kubectl run busybox --rm -ti --image=busybox:1.28 /bin/sh
113
+ kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
112
114
```
113
115
114
116
<!--
You can’t perform that action at this time.
0 commit comments