Kubernetes: Weave Scope with Minikube


Weave 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.

Create

kubectl apply -f 'https://cloud.weave.works/k8s/scope.yaml' -n weave
namespace/weave created
serviceaccount/weave-scope created
clusterrole.rbac.authorization.k8s.io/weave-scope created
clusterrolebinding.rbac.authorization.k8s.io/weave-scope created
deployment.apps/weave-scope-app created
service/weave-scope-app created
daemonset.extensions/weave-scope-agent created

Get

kubectl get all -n weave
NAME READY STATUS RESTARTS AGE
pod/weave-scope-agent-59d2m 1/1 Running 0 33s
pod/weave-scope-app-5989b9c6d7-c2qkr 1/1 Running 0 33s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/weave-scope-app ClusterIP 10.103.242.70 80/TCP 33s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/weave-scope-agent 1 1 1 1 1 33s
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/weave-scope-app 1 1 1 1 33s
NAME DESIRED CURRENT READY AGE
replicaset.apps/weave-scope-app-5989b9c6d7 1 1 1 33s

Edit Service

Edit the service to change ClusterIP to NodePort. Change type: ClusterIP to type: NodePort.

kubectl edit svc weave-scope-app -n weave
service/weave-scope-app edited

Deployment

Create an example deployment.

kubectl run --image=weaveworks/hello-world hello

View Service

You should see that a random NodePort has been assigned for external access.

kubectl get svc -n weave
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
weave-scope-app NodePort 10.103.242.70 80:31871/TCP 5m46s

Launch in browser

minikube service weave-scope-app -n weave
,