This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
NetPol issue affecting pods in different namespaces across different hosts #3633
Closed
Description
What you expected to happen?
Create k8s network policy "ALLOW all traffic from a namespace" to share a pods app across the cluster.
What happened?
The connection requests are dropped from weave npc, if the source pod is located on a different host than the target pod.
2019/04/22 10:10:57.664451 TCP connection from 10.46.0.0:32812 to 10.40.0.3:9273 blocked by Weave NPC
How to reproduce it?
- minimal k8s cluster with 1 master and 2 worker nodes
- create deployment and service "nginx1" in namespace "application" with affinity to node1
- create deployment and service "nginx2" in namespace "application" with affinity to node2
- create instant pod in different namespace on any node and try to access the two services
kubectl run test-$RANDOM --rm -it --image=alpine -- sh
apk add --no-cache curl
curl nginx1.application.svc.cluster.local
curl nginx2.application.svc.cluster.local
- import network policy and re-run the tests
Anything else we need to know?
- pharos-cluster 2.3.6 with weave enabled
- service_cidr: 10.96.0.0/12
- pod_network_cidr: 10.32.0.0/12
- kube-proxy
clusterCIDR: 10.32.0.0/12
masqueradeAll: false
mode: iptables
Versions:
$ weave version
2.5.1
$ docker version
18.06.1-ce
$ uname -a
Linux 4.15.0-47-generic #50-Ubuntu SMP
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"archive", BuildDate:"2019-03-01T20:58:08Z", GoVersion:"go1.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5", GitCommit:"2166946f41b36dea2c4626f90a77706f426cdea2", GitTreeState:"clean", BuildDate:"2019-03-25T15:19:22Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Logs:
$ kubectl logs -n kube-system <weave-net-pod> weave
Network:
$ ip route
$ ip -4 -o addr
$ sudo iptables-save
Activity