我在IBM云中有一个kubernetes集群,其中有一个守护程序集和后端pod。我已经设置了一个网络策略,后端服务可以接受守护程序请求。但是,当向后端Pod发送请求时,守护程序集显示Connection Refused
错误。
有想法吗?
Daemonset Yaml
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: ds-network-policy
spec:
podSelector:
matchLabels:
component: ds
policyTypes:
- Ingress
后端Yaml
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: backend-network-policy
spec:
ingress:
- from:
- podSelector:
matchLabels:
component: ds
podSelector:
matchLabels:
component: backend
policyTypes:
- Ingress