Skip to content

Commit

Permalink
Merge pull request #2697 from /issues/2693-npc-log-instructions
Browse files Browse the repository at this point in the history
Fix instructions to view npc logs when >1 pod exists
  • Loading branch information
awh committed Jan 9, 2017
2 parents 2ae2d52 + 0338d45 commit 4e74073
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions site/kube-addon.md
Expand Up @@ -81,10 +81,21 @@ definition](http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitio

###<a name="blocked-connections"></a> Troubleshooting Blocked Connections

If you suspect that legitimate traffic is being blocked by the Weave Network Policy Controller, check the `weave-npc` container's logs:
If you suspect that legitimate traffic is being blocked by the Weave Network Policy Controller, the first thing to do is check the `weave-npc` container's logs.

To do this, first you have to find the name of the Weave Net pod running on the relevant host:

```
$ kubectl get pods -n kube-system -o wide | grep weave-net
weave-net-08y45 2/2 Running 0 1m 10.128.0.2 host1
weave-net-2zuhy 2/2 Running 0 1m 10.128.0.4 host3
weave-net-oai50 2/2 Running 0 1m 10.128.0.3 host2
```

Select the relevant container, for example, if you want to look at host2 then pick `weave-net-oai50` and run:

```
$ kubectl logs $(kubectl get pods --all-namespaces | grep weave-net | awk '{print $2}') -n kube-system weave-npc
$ kubectl logs <weave-pod-name-as-above> -n kube-system weave-npc
```

When the Weave Network Policy Controller blocks a connection, it logs the following details about it:
Expand Down

0 comments on commit 4e74073

Please sign in to comment.