时间:2020-03-25来源:电脑系统城作者:电脑系统城
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: test-network-policy 5 namespace: default 6 spec: 7 podSelector: 8 matchLabels: 9 role: db 10 policyTypes: 11 - Ingress 12 - Egress 13 ingress: 14 - from: 15 - ipBlock: 16 cidr: 172.17.0.0/16 17 except: 18 - 172.17.1.0/24 19 - namespacesSelector: 20 matchLabels: 21 project: mopoject 22 - podSelector: 23 matchLabels: 24 role: frontend 25 ports: 26 - protocol: TCP 27 port: 6379 28 egress: 29 - to: 30 - ipBlock: 31 cidr: 10.0.0.0/24 32 ports: 33 - protocol: TCP 34 port: 5978
1 - from: 2 - namespacesSelector: 3 matchLabels: 4 project: mopoject 5 - podSelector: 6 matchLabels: 7 role: frontend
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: default-deny 5 spec: 6 podSelector: {} 7 policyTypes: 8 - Ingress
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: allow-all 5 spec: 6 podSelector: {} 7 ingress: 8 - {} 9 policyTypes: 10 - Ingress
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: default-deny 5 spec: 6 podSelector: {} 7 policyTypes: 8 - Egress
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: allow-all 5 spec: 6 podSelector:{} 7 egress: 8 - {} 9 policyTypes: 10 - Egress
1 apiVersion: networking.k8s.io/v1 2 kind: NetworkPolicy 3 metadata: 4 name: default-deny 5 spec: 6 podSelector: {} 7 policyTypes: 8 - Ingress 9 - Egress
2024-07-20
Windows10系统中gpedit.msc找不到怎么解决2024-07-18
windows10系统错误代码0xc0000001怎么解决2024-07-17
windows10系统安装失败怎么修复windows 10 无法更新的原因包括网络连接问题、存储空间不足、防病毒软件冲突、损坏的系统文件和第三方应用程序冲突。修复方法包括检查网络连接、清理存储空间、禁用防病毒软件、运行系统文件检查器、检查第三方应用...
2024-07-16
wsl 可以让你访问 windows 上的 linux bash shell,在 上一篇文章 中,我们讨论过关于 windows 的子系统 linuxwindows subsystem for linux(wsl)的目标用户,本文,我们将在 windows 10 的设备上,开启 wsl 的旅程。...
2024-07-16