Last active
February 8, 2020 15:28
-
-
Save hiyosi/09e9c6ab69f802102ad77f65c8943881 to your computer and use it in GitHub Desktop.
list 381
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: test-policy | |
namespace: default | |
spec: | |
# ポリシを適用するPodをselectorで指定 | |
podSelector: | |
# IngressとEgressを両方またはいずれか指定 | |
policyTypes: | |
- Ingress | |
- Egress | |
# 通信を許可する送信元ピアの情報とポート情報を定義 | |
ingress: | |
- from: | |
- ipBlock: | |
cidr: 172.17.0.0/16 | |
ports: | |
- protocol: TCP | |
port: 6379 | |
# 通信を許可する送信先ピアの情報とポート情報を定義 | |
egress: | |
- to: | |
- ipBlock: | |
cidr: 10.0.0.0/24 | |
ports: | |
- protocol: TCP | |
port: 5978 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment