heapster

command module
v0.0.0-...-9459b36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

README

Heapster

Warning: Heapster for Kubernetes currently only works on Google Compute Engine! GCE Virtual Machines need to have at least 2 cores.

Heapster enables monitoring of Clusters using cAdvisor. It is a demo app that demonstrates one possible way of monitoring various types of Clusters using cAdvisor.

Heapster supports Kubernetes natively and collects resource usage of all the Pods running in the cluster. It was built to showcase the power of core Kubernetes concepts like labels and pods and the awesomeness that is cAdvisor.

Heapster can be used to enable cluster wide monitoring on other Cluster management solutions by running a simple cluster specific buddy container that will help heapster with discovery of hosts. For example, take a look at this guide for setting up Cluster monitoring in CoreOS.

#####How heapster works on Kubernetes:

  1. Discovers all minions in a Kubernetes cluster
  2. Collects container statistics from the cadvisors running on the minions
  3. Organizes stats into Pods
  4. Stores Pod stats in a configurable backend

Along with each container stat entry, it's Pod ID, Container name, Pod IP, Hostname and Labels are also stored. Labels are stored as key:value pairs.

Heapster currently supports in-memory and InfluxDB backends. Patches are welcome for adding more storage backends.

#####Run Heapster in a Kubernetes cluster with an Influxdb backend and Grafana

Step 1: Setup Kube cluster

Fork the Kubernetes repository and turn up a Kubernetes cluster, if you haven't already. Make sure kubecfg.sh is exported.

Step 2: Start a Pod with Influxdb, grafana and elasticsearch

$ kubecfg.sh -c influx-grafana/deploy/grafana-influxdb-pod.json create pods

Step 3: Start Influxdb service

$ kubecfg.sh -c influx-grafana/deploy/grafana-influxdb-service.json create services

Step 4: Update firewall rules

Open up ports tcp:80,8083,8086,9200.

$ gcutil addfirewall --allowed=tcp:80,tcp:8083,tcp:8086,tcp:9200 --target_tags=kubernetes-minion heapster

Step 5: Configure cluster information for heapster Pod

Open deploy/heapster-pod.json and update the following environment variables:

  • Set 'KUBE_MASTER' to the internal IP address of the master - $ gcutil listinstances | grep kubernetes-master | awk '{print $8}'
  • Set 'KUBE_MASTER_AUTH' to be the the username and password of the master. The format is username:password. - $ cat ~/.kubernetes_auth

Step 6: Start Heapster Pod

$ kubecfg.sh -c deploy/heapster-pod.json create pods

Verify that all the pods and services are up and running:

$ kubecfg.sh list pods
$ kubecfg.sh list services

To start monitoring the cluster using grafana, find out the the external IP of the minion where the 'influx-grafana' Pod is running from the Google Cloud Console or the gcutil tool, and visit http://<minion-ip>:80.

To access the Influxdb UI visit http://<minion-ip>:8083.

$ gcutil listinstances

#####Hints

  • Grafana's default username and password is 'admin'. You can change that by modifying the grafana container here
  • To enable memory and swap accounting on the minions follow the instructions here
Community

Contributions, questions, and comments are all welcomed and encouraged! Heapster and cAdvisor developers hang out in #google-containers room on freenode.net. We also have the google-containers Google Groups mailing list.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/go.net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
_workspace/src/code.google.com/p/goauth2/oauth
Package oauth supports making OAuth2-authenticated HTTP requests.
Package oauth supports making OAuth2-authenticated HTTP requests.
_workspace/src/code.google.com/p/goauth2/oauth/example
This program makes a call to the specified API, authenticated with OAuth2.
This program makes a call to the specified API, authenticated with OAuth2.
_workspace/src/code.google.com/p/goauth2/oauth/jwt
The jwt package provides support for creating credentials for OAuth2 service account requests.
The jwt package provides support for creating credentials for OAuth2 service account requests.
_workspace/src/code.google.com/p/goauth2/oauth/jwt/example
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
This program makes a read only call to the Google Cloud Storage API, authenticated with OAuth2.
_workspace/src/code.google.com/p/google-api-go-client/bigquery/v2
Package bigquery provides access to the BigQuery API.
Package bigquery provides access to the BigQuery API.
_workspace/src/code.google.com/p/google-api-go-client/googleapi
Package googleapi contains the common code shared by all Google API libraries.
Package googleapi contains the common code shared by all Google API libraries.
_workspace/src/code.google.com/p/google-api-go-client/googleapi/internal/uritemplates
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf.org/html/rfc6570).
_workspace/src/code.google.com/p/google-api-go-client/googleapi/transport
Package transport contains HTTP transports used to make authenticated API requests.
Package transport contains HTTP transports used to make authenticated API requests.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api
Package api contains the latest (or "internal") version of the Kubernetes API objects.
Package api contains the latest (or "internal") version of the Kubernetes API objects.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors
Package errors provides detailed error types for api field validation.
Package errors provides detailed error types for api field validation.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/etcd
Package etcd provides conversion of etcd errors to API errors.
Package etcd provides conversion of etcd errors to API errors.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest
Package latest defines the default output serializations that code should use and imports the required schemas.
Package latest defines the default output serializations that code should use and imports the required schemas.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/testapi
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
Package testapi provides a helper for retrieving the KUBE_API_VERSION environment variable.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2
Package v1beta2 is the v1beta2 version of the API.
Package v1beta2 is the v1beta2 version of the API.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of api objects and explaining what is wrong with them when they aren't valid.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client
Package client contains the implementation of the client side communication with the Kubernetes master.
Package client contains the implementation of the client side communication with the Kubernetes master.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache
Package cache is a client-side caching mechanism.
Package cache is a client-side caching mechanism.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/conversion
Package conversion provides go object versioning and encoding/decoding mechanisms.
Package conversion provides go object versioning and encoding/decoding mechanisms.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/labels
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
Package labels implements a simple label system, parsing and matching selectors with sets of labels.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/runtime
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are: 0.
Package runtime includes helper functions for working with API objects that follow the kubernetes API object conventions, which are: 0.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util
Package util implements various utility functions used in both testing and implementation of Kubernetes.
Package util implements various utility functions used in both testing and implementation of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/config
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/wait
Package wait provides tools for polling or listening for changes to a condition.
Package wait provides tools for polling or listening for changes to a condition.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version
Package version supplies version information collected at build time to kubernetes components.
Package version supplies version information collected at build time to kubernetes components.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
Package verflag defines utility functions to handle command line flags related to version of Kubernetes.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface.
_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/watch/json
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
Package json implements a simple encoder and decoder for streams of watch events over io.Writer/Readers
_workspace/src/github.com/fsouza/go-dockerclient
Package docker provides a client for the Docker remote API.
Package docker provides a client for the Docker remote API.
_workspace/src/github.com/fsouza/go-dockerclient/testing
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
Package testing provides a fake implementation of the Docker API, useful for testing purpose.
_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
_workspace/src/gopkg.in/v1/yaml
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
clusters

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL