From bb1a373272620b98bf774c3cad23eb431ebb2486 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 12 Jul 2018 08:53:02 +0000 Subject: [PATCH 1/3] Add instructions to check weave-kube logs "Check it is running" and "check the logs" are important steps when troubleshooting. --- site/kubernetes/kube-addon.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index e508eac2..cce5d191 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -186,12 +186,42 @@ definition](https://v1-7.docs.kubernetes.io/docs/api-reference/v1.7/#networkpoli ## Troubleshooting +The first thing to check is whether the Weave Net software is up and +running. The `kubectl apply` command you use to install only +_requests_ that it be downloaded and started; if anything goes wrong +at startup the details will only be visible in the logs of the container(s). + +To check what is running: + +``` +$ kubectl get pods -n kube-system -l name=weave-net +NAME READY STATUS RESTARTS AGE +weave-net-1jkl6 2/2 Running 0 1d +weave-net-bskbv 2/2 Running 0 1d +weave-net-m4x1b 2/2 Running 0 1d +``` + +You should see one line for each node in your cluster; each line +should have STATUS "Running", and READY should be 2 out of 2. + +If you see a STATUS like "Error" or "CrashLoopBackoff", look in the +logs. Pick one of the pods with that status from the list and ask for +the logs like this: + +``` +$ kubectl logs -n kube-system weave-net-1jkl6 weave +``` + +You can pipe the output into a file for easier viewing, especially if +it is long. + Many Kubernetes network issues occur at a higher level than Weave Net. The [Kubernetes Service Debugging Guide] (https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/) has a detailed step-by-step guide. -The status of Weave Net can be checked by running its CLI commands. This can be done in various ways: +Once it is up and running, the status of Weave Net can be checked by +running its CLI commands. This can be done in various ways: 1\. [Install the `weave` script](/site/installing-weave.md) and run: From ac9f47783cabe621218471cc598bffbc7cab213c Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 17 Jul 2018 10:24:26 +0100 Subject: [PATCH 2/3] Review feedback --- site/kubernetes/kube-addon.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index cce5d191..f468ba9b 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -15,6 +15,7 @@ The following topics are discussed: * [Pod Network](#pod-network) * [Network Policy](#npc) * [Troubleshooting](#troubleshooting) + * [Reading the logs](#logs) * [Troubleshooting Blocked Connections](#blocked-connections) * [Things to watch out for](#key-points) * [Changing Configuration Options](#configuration-options) @@ -186,10 +187,11 @@ definition](https://v1-7.docs.kubernetes.io/docs/api-reference/v1.7/#networkpoli ## Troubleshooting -The first thing to check is whether the Weave Net software is up and -running. The `kubectl apply` command you use to install only +The first thing to check is whether Weave Net is up and +running. The `kubectl apply` command you used to install it only _requests_ that it be downloaded and started; if anything goes wrong -at startup the details will only be visible in the logs of the container(s). +at startup, those details will only be visible in the [logs](#logs) of +the container(s). To check what is running: @@ -202,17 +204,20 @@ weave-net-m4x1b 2/2 Running 0 1d ``` You should see one line for each node in your cluster; each line -should have STATUS "Running", and READY should be 2 out of 2. +should have STATUS "Running", and READY should be 2 out of 2. If you +see a STATUS like "Error" or "CrashLoopBackoff", look in the logs of +the container with that status. -If you see a STATUS like "Error" or "CrashLoopBackoff", look in the -logs. Pick one of the pods with that status from the list and ask for -the logs like this: +### Reading the logs + +Pick one of the pods from the list output by `kubectl get pods` and +ask for the logs like this: ``` $ kubectl logs -n kube-system weave-net-1jkl6 weave ``` -You can pipe the output into a file for easier viewing, especially if +For easier viewing, pipe the output into a file , especially if it is long. Many Kubernetes network issues occur at a higher level than Weave Net. From ea8f041a202b9ce98bf827e758d42130af1d23fc Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 17 Jul 2018 10:40:39 +0100 Subject: [PATCH 3/3] Fix indentation of TOC --- site/kubernetes/kube-addon.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index f468ba9b..5e09a777 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -7,17 +7,17 @@ search_type: Documentation The following topics are discussed: * [Installation](#install) - * [Upgrading Kubernetes to version 1.6](#kube-1.6-upgrade) - * [Upgrading the Daemon Sets](#daemon-sets) - * [CPU and Memory Requirements](#resources) - * [Pod Eviction](#eviction) + * [Upgrading Kubernetes to version 1.6](#kube-1.6-upgrade) + * [Upgrading the Daemon Sets](#daemon-sets) + * [CPU and Memory Requirements](#resources) + * [Pod Eviction](#eviction) * [Features](#features) - * [Pod Network](#pod-network) - * [Network Policy](#npc) + * [Pod Network](#pod-network) + * [Network Policy](#npc) * [Troubleshooting](#troubleshooting) - * [Reading the logs](#logs) - * [Troubleshooting Blocked Connections](#blocked-connections) - * [Things to watch out for](#key-points) + * [Reading the logs](#logs) + * [Troubleshooting Blocked Connections](#blocked-connections) + * [Things to watch out for](#key-points) * [Changing Configuration Options](#configuration-options)