[Kubernetes (K8S)] Deploy Weave Scope to provide a visualization and monitoring tool for Kubernetes (K8S)

Weave Scope

Weave Scope - https://www.weave.works/oss/scope/ is a visualization and monitoring tool for Docker and Kubernetes. It provides a top down view into your app as well as your entire infrastructure, and allows you to diagnose any problems with your distributed containerized app, in real time, as it is being deployed to a cloud provider.

Weave Scope help you to understand your application quickly by seeing it in a real time interactive display, with zero configuration or integration required — just launch and go.

Weave Scope automatically detects processes, containers, hosts. No kernel modules, no agents, no special libraries, no coding. Seamless integration with Docker, Kubernetes, DCOS and AWS ECS.

This article is about how to use kubectl to deploy Weave Scope on Kubernetes (K8S).

Prerequisites

  • Kubernetes (K8S)
    Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

    For more information about installing and using Kubernetes (K8s), see the Kubernetes (K8s) Docs.

Installation

A simple way to get Scope running in a Kubernetes setting is to

Clone the Scope repo:

1
2
3
$ git clone https://github.com/weaveworks/scope

$ cd scope

Run

1
$ kubectl apply -f examples/k8s

to deploy Scope to your cluster.

See pods about weave.

1
2
3
4
5
$ kubectl get pods -n weave
NAME READY STATUS RESTARTS AGE
weave-scope-agent-5vmfn 1/1 Running 1 84m
weave-scope-agent-7hs9p 1/1 Running 0 84m
weave-scope-cluster-agent-65d685466c-txgg6 1/1 Running 0 37m

Port-forward to access weave-scope-app:

1
$ kubectl port-forward svc/weave-scope-app -n weave 4040:80

Point your browser to http://127.0.0.1:4040.


Note: Do not expose the Scope service to the Internet, e.g. by changing the type to NodePort or LoadBalancer, or with Ingress. Scope allows anyone with access to the user interface control over your hosts and containers.


References

[1] Installing Weave Scope - https://www.weave.works/docs/scope/latest/installing/#k8s

[2] Weave Scope - https://www.weave.works/oss/scope/

[3] Kubernetes - https://kubernetes.io/