You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
70
70
71
71
```console
72
-
kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
72
+
kubectl run busybox --rm -ti --image=busybox -- /bin/sh
73
73
```
74
74
75
75
In your shell, run the following command:
@@ -112,7 +112,7 @@ networkpolicy.networking.k8s.io/access-nginx created
112
112
When you attempt to access the `nginx` Service from a Pod without the correct labels, the request times out:
113
113
114
114
```console
115
-
kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
115
+
kubectl run busybox --rm -ti --image=busybox -- /bin/sh
116
116
```
117
117
118
118
In your shell, run the command:
@@ -131,7 +131,7 @@ wget: download timed out
131
131
You can create a Pod with the correct labels to see that the request is allowed:
132
132
133
133
```console
134
-
kubectl run busybox --rm -ti --labels="access=true" --image=busybox:1.28 -- /bin/sh
134
+
kubectl run busybox --rm -ti --labels="access=true" --image=busybox -- /bin/sh
0 commit comments