首页 > TAG信息列表 > matchLabels

Kubernetes学习笔记(二十九):Network Policy

Network Policy apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: db-policy spec: podSelector: matchLabels: role: db policyTypes: - Ingress ## 设置入口规则,不会影响出口 ingress: - from: - podSelector: matchLa

CKA易错题整理:五、配置⽹络策略 NetworkPolicy

参考文档:https://kubernetes.io/zh-cn/docs/concepts/services-networking/network-policies/#networkpolicy-resource 官方截图: 三个from 代表三个策略的叠加 考题要求: 错误示范: 正确示范 点击查看 yaml 文件 apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metad