I have a pod A, I run kubectl exec -it pod_a_name /bin/bash
from there I can not ping pod B.
I can not ping 8.8.8.8, apt-get update doesn't work as well. So I suggest that something blocks the outgoing traffic.
I can acceess a pod A and pod B from external services but not vice a versa.
I use a default weave-net as CNI: curl -L https://github.com/weaveworks/weave/releases/download/latest_release/weave-daemonset-k8s-1.11.yaml | kubectl apply -f -
the network policy is applied to allow all the traffic.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"networking.k8s.io/v1","kind":"NetworkPolicy","metadata":{"annotations":{},"name":"allow-all-traffic-in-namespace","namespace":"default"},"spec":{"egress":[{}],"ingress":[{}],"podSelector":{},"policyTypes":["Ingress","Egress"]}}
creationTimestamp: "2023-12-28T14:45:36Z"
generation: 1
name: allow-all-traffic-in-namespace
namespace: default
resourceVersion: "940016"
uid: ****-af46-****-a619-****
spec:
egress:
- {}
ingress:
- {}
podSelector: {}
policyTypes:
- Ingress
- Egress
I am running out of idea what else I can do. I have to reach my database running on another server from my k8s pod but I can not even send a simple ping request....
I tried to allow all the ingress, egress traffic.
