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
This document helps you get started using the Kubernetes [NetworkPolicy API](/docs/concepts/services-networking/network-policies/) to declare network policies that govern how pods communicate with each other.
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
17
13
18
-
Make sure you've configured a network provider with network policy support. There are a number of network providers that support NetworkPolicy, including:
The above list is sorted alphabetically by product name, not by recommendation or preference. This example is valid for a Kubernetes cluster using any of these providers.
The above commands create a Deployment with an nginx Pod and expose the Deployment through a Service named `nginx`. The `nginx` Pod and Deployment are found in the `default` namespace.
@@ -66,15 +62,15 @@ NAME READY STATUS RESTARTS AGE
66
62
pod/nginx-701339712-e0qfq 1/1 Running 0 35s
67
63
```
68
64
69
-
## Test the service by accessing it from another Pod
65
+
## もう1つのPodからアクセスしてServiceを検証する
70
66
71
-
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:
NetworkPolicy includes a `podSelector` which selects the grouping of Pods to which the policy applies. You can see this policy selects Pods with the label `app=nginx`. The label was automatically added to the Pod in the `nginx`Deployment. An empty `podSelector` selects all pods in the namespace.
0 commit comments