diff --git a/content/en/docs/tasks/administer-cluster/declare-network-policy.md b/content/en/docs/tasks/administer-cluster/declare-network-policy.md index 0fdbff57b8..1b6a706934 100644 --- a/content/en/docs/tasks/administer-cluster/declare-network-policy.md +++ b/content/en/docs/tasks/administer-cluster/declare-network-policy.md @@ -70,7 +70,7 @@ pod/nginx-701339712-e0qfq 1/1 Running 0 35s You should be able to access the new `nginx` service from other Pods. To access the `nginx` Service from another Pod in the `default` namespace, start a busybox container: ```console -kubectl run --generator=run-pod/v1 busybox --rm -ti --image=busybox -- /bin/sh +kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` In your shell, run the following command: @@ -113,7 +113,7 @@ networkpolicy.networking.k8s.io/access-nginx created When you attempt to access the `nginx` Service from a Pod without the correct labels, the request times out: ```console -kubectl run --generator=run-pod/v1 busybox --rm -ti --image=busybox -- /bin/sh +kubectl run busybox --rm -ti --image=busybox -- /bin/sh ``` In your shell, run the command: @@ -132,7 +132,7 @@ wget: download timed out You can create a Pod with the correct labels to see that the request is allowed: ```console -kubectl run --generator=run-pod/v1 busybox --rm -ti --labels="access=true" --image=busybox -- /bin/sh +kubectl run busybox --rm -ti --labels="access=true" --image=busybox -- /bin/sh ``` In your shell, run the command: