Files
website/docs/tasks/debug-application-cluster/monitor-node-health.md
T
Dominika Hodovska 1148f85e8c Move init containers to stable in v1.6 (#1939)
* Delete the parameter "--google-json-key string"

Delete the parameter "--google-json-key string"

* Fix apimachinery vendored dependencies in examples_test.

* package apt-transport-https should be installed

Ubuntu default install not include apt-transport-https. so if you want to download package from https repo, you need install apt-transport-https package first

* doc-walkthrough-content

modify

* limitrange-update

I think it's redundant that the second to ,in order to do sth and do
sth!thanks!

* fix command kubectl get svc,pod output

fix command kubectl get svc,pod output

* Fix typo: federation-controller-mananger => federation-controller-manager

* Fix typo: federation-controller-mananger => federation-controller-manager

* Clarify minimum version of kubernetes supporting PSP authz

* Provide correct location for KUBE_ETCD_SERVERS

Provide correct location for KUBE_ETCD_SERVERS configuration key. It was
previously listed as being in /etc/kubernetes/config but is actually in
/etc/kubernetes/apiserver.

Related: https://github.com/kubernetes/kubernetes.github.io/issues/1600

* Move Compute Resources topic to Concepts. (#2410)

* Delete the parameter "--google-json-key string"

“# kube-scheduler -help”can not find --google-json-key option

# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}

* Add diagnose tips when you face problem.

* Update grammar for kubeadm.md, thanks @chenopis

* Merge two pieces to one words

* add http proxy infomation in kubeadm

* Update landing pages for Tasks and Tutorials. (#2634)

* Update static-pods.md

It works. Please review it again.

* Move Guide Topic: Multi-container pods. (#2642)

* fix link to go to pod-lifecycle page

* fix the command output

fix the command output

* mirantis_logo.png

,/images/community_logos/mirantis_logo.png updated per Mirantis request

* kubeadm reference -- /

set up/manage mean set up or manage ? it's better use or?

* Prototype for deprecating User Guide topic.

* missing word

The return of the OCD.

* Move Guide topic: Using Environment Variables. (#2645)

* fix typo (#2656)

fix typo

* Move Guide topic: Using Port Forwarding. (#2661)

* Move Guide topic: Bootstrapping Pet Sets. (#2662)

* Move Guide topic: Bootstrapping Pet Sets.

* Add TOC entry.

* Move Guide topic: Connect with Proxies. (#2663)

* Move Guide topic: Connect with Proxies.

* Fix link.

* add DefaultTolerationSeconds admission controller

* getting-started-guides: add CoreOS Tectonic

* Correct the certificate name

* Update index.md

* Update installation.md

* Update validation.md

* Update backups.md

* Update backups.md

* Spell fixes

* Using it vs Juju Kubernetes

* Q1 update to k8s tech and service partner list

New partners registered to K8s Partner Ecosystem sign-up form.  Logo updates companion to this edit still WIP

* Logo file updates for new registrants

Logos for new registrants

* The attribute [allowfullscree] must have a value

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>

* Remove newline before passing to base64

* Use single quote to avoid string interpolation, update output

* Update command as files contain no newline

* Remove all dead links, use just filename

As user can guess that it is file copied from the shown content

* Fix link to dev guide.

* Add --leader-elect=false

Second scheduler could not start without disabling leader-elect.

* cluster-components-could be running

could be doing sth

* update cluster-components.md

In theory,Master components can be run....

* update cluster-components--add a space

add a space after the comma: "In theory, Master components..."

* Highlighted command --kubectl describe

In web page ,there is no space ,need some empty space,thanks!

* Revert "Highlighted command --kubectl describe"

This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1.

* Add example show how to configure proxy for kube

* Revision as the suggestion describe

* move ha-master-gce.png to images/docs

Signed-off-by: Xiuyu Li <nickleefly@gmail.com>

* use relative path for ha-master-gce image

Signed-off-by: Xiuyu Li <nickleefly@gmail.com>

* The attribute [calendarWrapper] must be unique

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>

* add required images in kubeadm init step

* Add links to Docker/rtk in cluster-intro.html

* s/acomplish/accomplish/

* Modify  the link URL of [kubelet eviction design doc]

[kubelet eviction design doc] should be linked to kubernetes.github.io
instead of community/design-proposal.

* fix CronJob object name

fix CronJob object name

* remove redundant a

Signed-off-by: Xiuyu Li <nickleefly@gmail.com>

* kubeadm reference--change any to some (#2683)

* modify one word

examples   to  example

* doc-walkthrough-content

modify

* limitrange-update

I think it's redundant that the second to ,in order to do sth and do
sth!thanks!

* cluster-components-could be running

could be doing sth

* update cluster-components.md

In theory,Master components can be run....

* update cluster-components--add a space

add a space after the comma: "In theory, Master components..."

* Highlighted command --kubectl describe

In web page ,there is no space ,need some empty space,thanks!

* Revert "Highlighted command --kubectl describe"

This reverts commit a70d0a3e3537c3f91b197b23f949e1e506c951d1.

* kubeadm reference--change any to some

kubeadm can install any  add-on ?

* Move Guide topics: Logging (#2687)

* Disallow indexing for liveness/index (#2689)

* Deprecate Guide topics. (#2691)

* Wrong label and kubectl get completed pods

The label `app=jobexample` should be `jobgroup=jobexample`.
Also, for get completed pods the flag `--show-all` is necessary.

* Update garbage-collection.md

change “any” to "every"

* Deprecate Guide topic: Persistent Volume Walkthrough. (#2692)

* Reimplement PR #2525

Fixes typo by removing the word "controller"

* remove extra space

* Update multiple-schedulers doc  (#2063)

* Update tutorial

* Fix md formatting.

* Remove extraneous space

* Deprecate Guide topic: Secrets Walkthrough. (#2695)

* Deprecate Guide topics: quick-start ... (#2696)

* Update Tasks landing page. (#2697)

* Remove redundant section in deployments

The status of the deployment is already covered in a later section in
this doc.

* Repair Spotinst logo

Corrected size

* fixed ASM blurb

* Correct ASM logo filename

* Highlighted command for `kubectl proxy`.

* Update ubuntu install instructions.

* Update local instructions to new method.

* update init-containers.md

add one word.

* Minor spelling correction -- "rtk" to "rkt"

* fixing typo

* Doc formatting update

Corrected indentation for the `nonResourcePath` and got a bit zealous with restructuring that section...

* Repair Spotinst logo

Corrected size

* fixed ASM blurb

* Correct ASM logo filename

* Update garbage-collection.md

change "any" to "every"

* Update Weave Net's title.

* fix unsupported parameter of wget command

* update to be retained

change "retain" to "to be retained".

* Update pod.md

* update init-containers.md

change "a different filesystem view" to "different filesystem views".
different init container should have different filesystem.

* Highlighted command --kubectl describe

In web page ,there is no space ,need some empty space,thanks!

* cluster-management--3

change 3 to three is better or not ?thanks!

* fix typo

1、Parameters “--allow-verification-with-non-compliant-keys” is missed.
2、Delete the parameter "--google-json-key string";

see the "# kube-controller-manager  -help"
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}

* fix typo

1、Delete the parameter "--google-json-key string";
2、Parameters "--ir-data-source string"、"--ir-dbname string"、"--ir-hawkular string"、"--ir-influxdb-host string"、"--ir-namespace-only"、"--ir-password string"、"--ir-percentile int"、"--ir-user string"  is missed.

see the "# kube-prxoy -help"
# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-23T00:04:39Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.1+82450d0", GitCommit:"f5ef9802914a47c848fd84c287333f8b4d28bbc1", GitTreeState:"dirty", BuildDate:"2017-01-22T23:56:57Z", GoVersion:"go1.7", Compiler:"gc", Platform:"linux/amd64", USEEVersion:"V1.02.01_alpha", USEEPublishDate:"2017-1-10 00:00:00"}

* Update garbage-collection.md

modify the url and link

* update garbage-collection.md

change the url to relative path.

* update out-of-resource.md

change "in cases when" to "in case that"

* update out-of-resource.md

use a shorter and simpler expression.

* update out-of-resource.md

change "support" to "supports"

* Create a top-level CN directory to hold future md files for the Chinese kubernetes site

* Removed `=` at the end of the flags.

* Remove autogenerate todo

- This should be captured via a GitHub issue
  and not a TODO in the README documentation
  which leads to confusion.

* Move Guide topics: Federation Tasks. (#2799)

* Move Guide topics: Federation tutorial and concept. (#2802)

* Move Guide topics: Federation tutorial and concept.

* Add title.

* Fix link.

* Move kubectl Concept topics to Tutorials. (#2804)

* Move kubectl Concept topics to Tutorials.

* Add redirects and update links.

* The calendarWrapper attribute should be unique

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>

* Fix links. (#2808)

* Fix link. (#2806)

* Move topic from clusters to cluster-administration. (#2812)

* Move a batch of cluster admin topics. (#2813)

* Move Guide topic: Limit storage consumption. (#2814)

* Move Guide topic: Limit storage consumption.

* Add title.

* Move Guide topic: Networking. (#2816)

* Move Guide topic: Network Plugins. (#2819)

* Move Guide topic: Network Plugins.

* Fix link.

* Move Guide topic: Static Pods. (#2820)

* User Guide content migration: post notice (#2818)

* Add User Guide content migration notice.

* Fix formatting

* Tweek formatting to block highlight text in light gray.

* Try table instead of code block

* remove extra lines

* try table format

* fix links

* incorporate @ddonnelly feedback

* Move Guide topic: Out of Resource. (#2821)

* Move Guide topic: Monitoring Node Health. (#2822)

* Move Guide topic: Monitoring Node Health.

* Move to Tasks.

* Move Guide topic: AppArmor. (#2823)

* Apparmor (#2825)

* Move Guide topic: AppArmor.

* Add included files.

* Move Guide topic: Audit. (#2824)

* Added 1.6 Upgrade notes to outline changes for etcd 3.

* Move Guide topic: Disruption Budget. (#2834)

* Move Guide topic: Limit range. (#2835)

* Quota (#2836)

* Move Guide topic: Limit range.

* Move Guide topic: Resource Quota and Limits.

* Quota2 (#2838)

* Move Guide topic: Limit range.

* Move Guide topic: Resource Quota concept.

* Dns (#2839)

* Move Guide topic: Limit range.

* Move Guide topic: DNS.

* Delete CNAME

* Create CNAME

* Delete CNAME

* Create CNAME

* Move docs/user-guide/managing-deployments.md to /docs/concepts/cluster-administration/manage-deployment.md

* add nginx-app.yaml file

* add back missing /

* fix link

* Move Guide topic: Replication Controller Operations

* Move Guide topic: Resizing a replication controller

* Concepts toc (#2840)

* Move Guide topic: Limit range.

* Adjust Concepts Overview TOC.

* Move Guide topic: Rolling Updates

* Move Kubernetes API page. (#2849)

* Move What is Kubernetes topic. (#2851)

* Move Guide topic: Rolling Update Demo (#2850)

* Move Guide topic: Rolling Update Demo

* rename file

* Move Guide topic: Configuration Best Practices

* Move Guide topic: Jobs (#2853)

* Move Guide topic: Jobs

* add job.yaml file

* change title

* Move Pod overview. (#2865)

* Move Pod overview.

* Fix redirection.

* Move Guide topic: Parallel Processing using Expansions (#2867)

* Move Guide topic: Parallel Processing using Expansions

* fix links to /docs/user-guide/jobs/

* Move Init Containers topic. (#2866)

* Move Guide topic: Coarse Parallel Processing Using a Work Queue

* Move Guide topic: Fine Parallel Processing using a Work Queue (#2870)

* Move Guide topic: Fine Parallel Processing using a Work Queue

* add migration notice

* fixed capitalization

* Rename /docs/tasks/job/work-queue-1/

* Move StatefulSets topic. (#2869)

* Move StatefulSets topic.

* Fix TOC.

* Move Guide topic: Pod Templates (#2872)

* Move Guide topic: Pod Templates

* tweak header level and capitalization

* Move PetSets topic. (#2873)

* Move Garbage Collection topic. (#2874)

* Move Garbage Collection topic.

* Fix included file.

* Move Guide topic: Prereqs

* Move Guide topic: Sharing Clusters

* Move Accessing Clusters topic to Concepts. (#2875)

* Move Accessing Clusters topic to Concepts.

* Update concepts.yml

* Move Guide topic: Kubeconfig File

* Move Guide topic: Config Provider Firewalls. (#2883)

* Move Guide topic: Federation Service Discovery. (#2884)

* Move Guide topic: Connecting Apps with Services. (#2885)

* Added example and docu for hostPort ranges

* Move Guide topic: Service. (#2891)

* Move Guide topic: Service.

* Move Guide topic: External Load Balancer.

* Fix TOC.

* Move Guide topic: Resource Monitoring. (#2895)

* docs/admin: document OpenID Connect plugin's claim prefixing

* Move Guide topic: Admin Guide

* fix the command output

fix the command output

* Update manage-compute-resources-container.md

Change "he" to "The"

* update out-of-resource.md

change "thresholds" to "threshold"

* update init-containers.md

change "apply" to "application"

* amend monitor-node-health.md

Amend the url link.

* Fix monitor-node-health.md

The url link does not exist.

* fix a typo in /docs/user-guide/configmap/index.md

change "value" to "values"

* View $PAGE on Github without forking the repo

Adding a "View docs/bla-bla.md on GitHub" button next to the
"Edit docs/bla-bla.md" button so that people can view the file
first without clicking the Edit button (which does not work without
forking the repository).

I did not need this because I was trying to do something without
forking. I just found it to be bit difficult to view source of a page
on GitHub.

I'm open to ideas, perhaps we can instead add an article footer button
named "View on GitHub" next to the "Edit this Page".

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>

* Move Guide topics: Container Lifestyle Hooks, Images, Volumes

* fix to taint the master node

* Add files via upload

* fix the link of ogging-elasticsearch-kibana.md

fix the link of url

* Remove from TOC/Search: pods/init-containers ... (#2694)

* Fix typo

* Add files via upload

* Create hyperlink

Create hyperlink for kubernetes repo link.

* updated PSP documentation with RBAC (#2552)

Added info about controller manager setup and current implementation when using PSP with RBAC support.

* Use kubectl config current-context to simplify the instructions

* fix typeo (#2856)

* fix typeo

* Update kargo.md

* Fix typo in kubectl_completion.md

evaluation --> evaluated

* Apply typo fixes from #2791 (#2949)

* Apply typo fixes from #2791

* remove style typos

* Fix the typos

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>

* Fix typo

* Fix typo (#2842)
2017-03-21 18:13:33 -07:00

7.6 KiB

assignees, title
assignees title
Random-Liu
dchen1107
Monitoring Node Health
  • TOC {:toc}

Node Problem Detector

Node problem detector is a DaemonSet monitoring the node health. It collects node problems from various daemons and reports them to the apiserver as NodeCondition and Event.

It supports some known kernel issue detection now, and will detect more and more node problems over time.

Currently Kubernetes won't take any action on the node conditions and events generated by node problem detector. In the future, a remedy system could be introduced to deal with node problems.

See more information here.

Limitations

  • The kernel issue detection of node problem detector only supports file based kernel log now. It doesn't support log tools like journald.

  • The kernel issue detection of node problem detector has assumption on kernel log format, and now it only works on Ubuntu and Debian. However, it is easy to extend it to support other log format.

Enable/Disable in GCE cluster

Node problem detector is running as a cluster addon enabled by default in the gce cluster.

You can enable/disable it by setting the environment variable KUBE_ENABLE_NODE_PROBLEM_DETECTOR before kube-up.sh.

Use in Other Environment

To enable node problem detector in other environment outside of GCE, you can use either kubectl or addon pod.

Kubectl

This is the recommended way to start node problem detector outside of GCE. It provides more flexible management, such as overwriting the default configuration to fit it into your environment or detect customized node problems.

  • Step 1: Create node-problem-detector.yaml:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: node-problem-detector-v0.1
  namespace: kube-system
  labels:
    k8s-app: node-problem-detector
    version: v0.1
    kubernetes.io/cluster-service: "true"
spec:
  template:
    metadata:
      labels:
        k8s-app: node-problem-detector
        version: v0.1
        kubernetes.io/cluster-service: "true"
    spec:
      hostNetwork: true
      containers:
      - name: node-problem-detector
        image: gcr.io/google_containers/node-problem-detector:v0.1
        securityContext:
          privileged: true
        resources:
          limits:
            cpu: "200m"
            memory: "100Mi"
          requests:
            cpu: "20m"
            memory: "20Mi"
        volumeMounts:
        - name: log
          mountPath: /log
          readOnly: true
      volumes:
      - name: log
        hostPath:
          path: /var/log/

Notice that you should make sure the system log directory is right for your OS distro.

  • Step 2: Start node problem detector with kubectl:
kubectl create -f node-problem-detector.yaml

Addon Pod

This is for those who have their own cluster bootstrap solution, and don't need to overwrite the default configuration. They could leverage the addon pod to further automate the deployment.

Just create node-problem-detector.yaml, and put it under the addon pods directory /etc/kubernetes/addons/node-problem-detector on master node.

Overwrite the Configuration

The default configuration is embedded when building the docker image of node problem detector.

However, you can use ConfigMap to overwrite it following the steps:

  • Step 1: Change the config files in config/.
  • Step 2: Create the ConfigMap node-problem-detector-config with kubectl create configmap node-problem-detector-config --from-file=config/.
  • Step 3: Change the node-problem-detector.yaml to use the ConfigMap:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: node-problem-detector-v0.1
  namespace: kube-system
  labels:
    k8s-app: node-problem-detector
    version: v0.1
    kubernetes.io/cluster-service: "true"
spec:
  template:
    metadata:
      labels:
        k8s-app: node-problem-detector
        version: v0.1
        kubernetes.io/cluster-service: "true"
    spec:
      hostNetwork: true
      containers:
      - name: node-problem-detector
        image: gcr.io/google_containers/node-problem-detector:v0.1
        securityContext:
          privileged: true
        resources:
          limits:
            cpu: "200m"
            memory: "100Mi"
          requests:
            cpu: "20m"
            memory: "20Mi"
        volumeMounts:
        - name: log
          mountPath: /log
          readOnly: true
        - name: config # Overwrite the config/ directory with ConfigMap volume
          mountPath: /config
          readOnly: true
      volumes:
      - name: log
        hostPath:
          path: /var/log/
      - name: config # Define ConfigMap volume
        configMap:
          name: node-problem-detector-config
  • Step 4: Re-create the node problem detector with the new yaml file:
kubectl delete -f node-problem-detector.yaml # If you have a node-problem-detector running
kubectl create -f node-problem-detector.yaml

Notice that this approach only applies to node problem detector started with kubectl.

For node problem detector running as cluster addon, because addon manager doesn't support ConfigMap, configuration overwriting is not supported now.

Kernel Monitor

Kernel Monitor is a problem daemon in node problem detector. It monitors kernel log and detects known kernel issues following predefined rules.

The Kernel Monitor matches kernel issues according to a set of predefined rule list in config/kernel-monitor.json. The rule list is extensible, and you can always extend it by overwriting the configuration.

Add New NodeConditions

To support new node conditions, you can extend the conditions field in config/kernel-monitor.json with new condition definition:

{
  "type": "NodeConditionType",
  "reason": "CamelCaseDefaultNodeConditionReason",
  "message": "arbitrary default node condition message"
}

Detect New Problems

To detect new problems, you can extend the rules field in config/kernel-monitor.json with new rule definition:

{
  "type": "temporary/permanent",
  "condition": "NodeConditionOfPermanentIssue",
  "reason": "CamelCaseShortReason",
  "message": "regexp matching the issue in the kernel log"
}

Change Log Path

Kernel log in different OS distros may locate in different path. The log field in config/kernel-monitor.json is the log path inside the container. You can always configure it to match your OS distro.

Support Other Log Format

Kernel monitor uses Translator plugin to translate kernel log the internal data structure. It is easy to implement a new translator for a new log format.

Caveats

It is recommended to run the node problem detector in your cluster to monitor the node health. However, you should be aware that this will introduce extra resource overhead on each node. Usually this is fine, because:

  • The kernel log is generated relatively slowly.
  • Resource limit is set for node problem detector.
  • Even under high load, the resource usage is acceptable. (see benchmark result)